<div dir="ltr">Hi Joel and Chris, <br><br>Yes, and I will be working on the rsb patch for renode installation next.<br><br>Regards,<br>Mazaya<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jun 28, 2023 at 12:34 PM Chris Johns <<a href="mailto:chrisj@rtems.org">chrisj@rtems.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I am as well<br>
<br>
Chris<br>
<br>
On 28/6/2023 12:25 am, Joel Sherrill wrote:<br>
> I'm OK with this patch.<br>
> <br>
> Is it assuming that you installed renode on your own -- not using the RSB?<br>
> <br>
> --joel<br>
> <br>
> On Mon, Jun 26, 2023 at 5:37 PM Muhammad Sulthan Mazaya<br>
> <<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</a> <mailto:<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</a>>> wrote:<br>
> <br>
>     Hi Chris,<br>
> <br>
>     Yes they are the same. I thought there was an email error, so I re-send it<br>
>     twice.<br>
> <br>
>     On Tue, 27 Jun 2023, 07:46 Chris Johns, <<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a><br>
>     <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>>> wrote:<br>
> <br>
>         Hi Muhammad,<br>
> <br>
>         The patch looks good, thanks.<br>
> <br>
>         Are the 3 posted patches the same version?<br>
> <br>
>         Chris<br>
> <br>
>         On 26/6/2023 2:17 pm, Muhammad Sulthan Mazaya wrote:<br>
>         > Patch for the implementation of renode on rtems-test. Currently, renode<br>
>         > installation has not been implemented in rsb. Thus, for testing, you can<br>
>         > install renode by referring to the documentation link below.<br>
>         ><br>
>         > Downloads for debian, fedora, arch, macOS, and windows:<br>
>         > <a href="https://renode.io/#downloads" rel="noreferrer" target="_blank">https://renode.io/#downloads</a> <<a href="https://renode.io/#downloads" rel="noreferrer" target="_blank">https://renode.io/#downloads</a>><br>
>         ><br>
>         > Alternatively, you can access Renode's GitHub releases:<br>
>         > <a href="https://github.com/renode/renode/releases/tag/v1.13.3" rel="noreferrer" target="_blank">https://github.com/renode/renode/releases/tag/v1.13.3</a><br>
>         <<a href="https://github.com/renode/renode/releases/tag/v1.13.3" rel="noreferrer" target="_blank">https://github.com/renode/renode/releases/tag/v1.13.3</a>><br>
>         ><br>
>         > You can also build it from source:<br>
>         ><br>
>         <a href="https://renode.readthedocs.io/en/latest/advanced/building_from_sources.html#building-from-source" rel="noreferrer" target="_blank">https://renode.readthedocs.io/en/latest/advanced/building_from_sources.html#building-from-source</a> <<a href="https://renode.readthedocs.io/en/latest/advanced/building_from_sources.html#building-from-source" rel="noreferrer" target="_blank">https://renode.readthedocs.io/en/latest/advanced/building_from_sources.html#building-from-source</a>><br>
>         ><br>
>         > This patch consists of changes to test kendrytek210 using renode. To<br>
>         > test it, you can build the kendrytek210 test suite as instructed in the<br>
>         > rtems-docs (Alan's patch here:<br>
>         <a href="https://lists.rtems.org/pipermail/devel/2023-April/074838.html" rel="noreferrer" target="_blank">https://lists.rtems.org/pipermail/devel/2023-April/074838.html</a><br>
>         <<a href="https://lists.rtems.org/pipermail/devel/2023-April/074838.html" rel="noreferrer" target="_blank">https://lists.rtems.org/pipermail/devel/2023-April/074838.html</a>>).<br>
>         > Then, use the following command to run the test suite.<br>
>         ><br>
>         > rtems-test --rtems-bsp=kendrytek210-renode [test-suite-path]<br>
>         ><br>
>         > ---<br>
>         >  .../testing/bsps/kendrytek210-renode.ini      | 38 +++++++++++<br>
>         >  tester/rtems/testing/renode.cfg               | 64 +++++++++++++++++++<br>
>         >  .../testing/renode_scripts/kendrytek210.resc  | 53 +++++++++++++++<br>
>         >  3 files changed, 155 insertions(+)<br>
>         >  create mode 100644 tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
>         >  create mode 100644 tester/rtems/testing/renode.cfg<br>
>         >  create mode 100644 tester/rtems/testing/renode_scripts/kendrytek210.resc<br>
>         ><br>
>         > diff --git a/tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
>         b/tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
>         > new file mode 100644<br>
>         > index 0000000..95850c5<br>
>         > --- /dev/null<br>
>         > +++ b/tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
>         > @@ -0,0 +1,38 @@<br>
>         > +#<br>
>         > +# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a> <<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>>)<br>
>         > +# Copyright 2010-2014 Chris Johns (<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a><br>
>         <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>>)<br>
>         > +# All rights reserved.<br>
>         > +#<br>
>         > +# This file is part of the RTEMS Tools package in 'rtems-tools'.<br>
>         > +#<br>
>         > +# Redistribution and use in source and binary forms, with or without<br>
>         > +# modification, are permitted provided that the following conditions<br>
>         are met:<br>
>         > +#<br>
>         > +# 1. Redistributions of source code must retain the above copyright<br>
>         notice,<br>
>         > +# this list of conditions and the following disclaimer.<br>
>         > +#<br>
>         > +# 2. Redistributions in binary form must reproduce the above<br>
>         copyright notice,<br>
>         > +# this list of conditions and the following disclaimer in the<br>
>         documentation<br>
>         > +# and/or other materials provided with the distribution.<br>
>         > +#<br>
>         > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br>
>         "AS IS"<br>
>         > +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED<br>
>         TO, THE<br>
>         > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
>         PURPOSE<br>
>         > +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR<br>
>         CONTRIBUTORS BE<br>
>         > +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
>         > +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
>         > +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR<br>
>         BUSINESS<br>
>         > +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
>         > +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
>         > +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED<br>
>         OF THE<br>
>         > +# POSSIBILITY OF SUCH DAMAGE.<br>
>         > +#<br>
>         > +<br>
>         > +#<br>
>         > +# The Kendrytek210 Renode BSP<br>
>         > +#<br>
>         > +[kendrytek210-renode]<br>
>         > +bsp             = kendrytek210-renode<br>
>         > +arch            = riscv<br>
>         > +tester          = %{_rtscripts}/renode.cfg<br>
>         > +bsp_resc_script = %{_rtscripts}/renode_scripts/kendrytek210.resc<br>
>         > diff --git a/tester/rtems/testing/renode.cfg<br>
>         b/tester/rtems/testing/renode.cfg<br>
>         > new file mode 100644<br>
>         > index 0000000..49e84a5<br>
>         > --- /dev/null<br>
>         > +++ b/tester/rtems/testing/renode.cfg<br>
>         > @@ -0,0 +1,64 @@<br>
>         > +#<br>
>         > +# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a> <<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>>)<br>
>         > +# Copyright 2010-2014 Chris Johns (<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a><br>
>         <mailto:<a href="mailto:chrisj@rtems.org" target="_blank">chrisj@rtems.org</a>>)<br>
>         > +# All rights reserved.<br>
>         > +#<br>
>         > +# This file is part of the RTEMS Tools package in 'rtems-tools'.<br>
>         > +#<br>
>         > +# Redistribution and use in source and binary forms, with or without<br>
>         > +# modification, are permitted provided that the following conditions<br>
>         are met:<br>
>         > +#<br>
>         > +# 1. Redistributions of source code must retain the above copyright<br>
>         notice,<br>
>         > +# this list of conditions and the following disclaimer.<br>
>         > +#<br>
>         > +# 2. Redistributions in binary form must reproduce the above<br>
>         copyright notice,<br>
>         > +# this list of conditions and the following disclaimer in the<br>
>         documentation<br>
>         > +# and/or other materials provided with the distribution.<br>
>         > +#<br>
>         > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS<br>
>         "AS IS"<br>
>         > +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED<br>
>         TO, THE<br>
>         > +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR<br>
>         PURPOSE<br>
>         > +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR<br>
>         CONTRIBUTORS BE<br>
>         > +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR<br>
>         > +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF<br>
>         > +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR<br>
>         BUSINESS<br>
>         > +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN<br>
>         > +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)<br>
>         > +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED<br>
>         OF THE<br>
>         > +# POSSIBILITY OF SUCH DAMAGE.<br>
>         > +#<br>
>         > +<br>
>         > +#<br>
>         > +# Renode<br>
>         > +#<br>
>         > +# Use a renode command to run the executable in the renode simulator.<br>
>         > +#<br>
>         > +<br>
>         > +%include %{_configdir}/base.cfg<br>
>         > +%include %{_configdir}/checks.cfg<br>
>         > +<br>
>         > +#<br>
>         > +# Console.<br>
>         > +#<br>
>         > +%define console_telnet<br>
>         > +%include %{_configdir}/console.cfg<br>
>         > +<br>
>         > +#<br>
>         > +# RTEMS version<br>
>         > +#<br>
>         > +%include %{_rtdir}/rtems/version.cfg<br>
>         > +<br>
>         > +<br>
>         > +#<br>
>         > +# Renode executable<br>
>         > +#<br>
>         > +%define renode_cmd renode --hide-monitor<br>
>         > +%define binary_opts -e $bin?=@%{test_executable}<br>
>         > +%define start_opts -e "s @%{bsp_resc_script}"<br>
>         > +%define trim_command sed 's/.*\[output\] //'<br>
>         > +<br>
>         > +<br>
>         > +#<br>
>         > +# Executable<br>
>         > +#<br>
>         > +%execute %{renode_cmd} %{binary_opts} %{start_opts} | %{trim_command}<br>
>         > diff --git a/tester/rtems/testing/renode_scripts/kendrytek210.resc<br>
>         b/tester/rtems/testing/renode_scripts/kendrytek210.resc<br>
>         > new file mode 100644<br>
>         > index 0000000..fe13aa8<br>
>         > --- /dev/null<br>
>         > +++ b/tester/rtems/testing/renode_scripts/kendrytek210.resc<br>
>         > @@ -0,0 +1,53 @@<br>
>         > +using sysbus<br>
>         > +using monitor<br>
>         > +<br>
>         > +mach create "K210"<br>
>         > +<br>
>         > +machine LoadPlatformDescription @platforms/cpus/kendryte_k210.repl<br>
>         > +<br>
>         > +path add @/<br>
>         > +<br>
>         > +showAnalyzer "uartAnalyzer" uart<br>
>         Antmicro.Renode.Analyzers.LoggingUartAnalyzer<br>
>         > +uartAnalyzer TimestampFormat None<br>
>         > +<br>
>         > +set report_repeating_line """<br>
>         > +from Antmicro.Renode.Logging import ConsoleBackend<br>
>         > +ConsoleBackend.Instance.ReportRepeatingLines = True<br>
>         > +"""<br>
>         > +<br>
>         > +set add_hook """<br>
>         > +def match(line):<br>
>         > +    ok_to_kill_lines = [<br>
>         > +        '*** TEST STATE: USER_INPUT',<br>
>         > +        '*** TEST STATE: BENCHMARK',<br>
>         > +        '*** END OF TEST ',<br>
>         > +        '*** FATAL ***'<br>
>         > +    ]<br>
>         > +    return any(l in line for l in ok_to_kill_lines)<br>
>         > +<br>
>         > +def hook(line):<br>
>         > +    monitor.Parse("q")<br>
>         > +<br>
>         ><br>
>         +Antmicro.Renode.Hooks.UartHooksExtensions.AddLineHook(monitor.Machine["sysbus.uart"], match, hook)<br>
>         > +"""<br>
>         > +<br>
>         > +python $add_hook<br>
>         > +<br>
>         > +python $report_repeating_line<br>
>         > +<br>
>         > +sysbus Tag <0x50440000 0x10000> "SYSCTL"<br>
>         > +sysbus Tag <0x50440018 0x4> "pll_lock" 0xFFFFFFFF<br>
>         > +sysbus Tag <0x5044000C 0x4> "pll1"<br>
>         > +sysbus Tag <0x50440008 0x4> "pll0"<br>
>         > +sysbus Tag <0x50440020 0x4> "clk_sel0"<br>
>         > +sysbus Tag <0x50440028 0x4> "clk_en_cent"<br>
>         > +sysbus Tag <0x5044002c 0x4> "clk_en_peri"<br>
>         > +<br>
>         > +# enable uart tx<br>
>         > +uart WriteDoubleWord 0x8 0x1<br>
>         > +<br>
>         > +macro reset<br>
>         > +"""<br>
>         > +    sysbus LoadELF $bin<br>
>         > +"""<br>
>         > +runMacro $reset<br>
>         _______________________________________________<br>
>         devel mailing list<br>
>         <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a> <mailto:<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a>><br>
>         <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
>         <<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a>><br>
> <br>
>     _______________________________________________<br>
>     devel mailing list<br>
>     <a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a> <mailto:<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a>><br>
>     <a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a><br>
>     <<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a>><br>
> <br>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div>