<div dir="ltr">Oh sorry I miss that, yes I have a stale directory of renode_scripts in my rtems repo locally</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Aug 18, 2023 at 10:23 PM Gedare Bloom <<a href="mailto:gedare@rtems.org">gedare@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">On Sun, Aug 6, 2023 at 11:05 PM Muhammad Sulthan Mazaya<br>
<<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</a>> wrote:<br>
><br>
> Add gpl to the prom binary file name + include the leon3 prom assembly<br>
> source with licensing commented<br>
><br>
> ---<br>
> .../testing/bsps/kendrytek210-renode.ini | 38 ++++<br>
> tester/rtems/testing/bsps/leon3-renode.ini | 37 ++++<br>
> tester/rtems/testing/renode.cfg | 64 ++++++<br>
> tester/rtems/testing/renode/kendrytek210.resc | 86 ++++++++<br>
> tester/rtems/testing/renode/leon3-prom-gpl.S | 205 ++++++++++++++++++<br>
> .../rtems/testing/renode/leon3-prom-gpl.bin | Bin 0 -> 529 bytes<br>
> tester/rtems/testing/renode/leon3.resc | 82 +++++++<br>
> 7 files changed, 512 insertions(+)<br>
> create mode 100644 tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
> create mode 100644 tester/rtems/testing/bsps/leon3-renode.ini<br>
> create mode 100644 tester/rtems/testing/renode.cfg<br>
> create mode 100644 tester/rtems/testing/renode/kendrytek210.resc<br>
> create mode 100644 tester/rtems/testing/renode/leon3-prom-gpl.S<br>
> create mode 100755 tester/rtems/testing/renode/leon3-prom-gpl.bin<br>
> create mode 100644 tester/rtems/testing/renode/leon3.resc<br>
><br>
> diff --git a/tester/rtems/testing/bsps/kendrytek210-renode.ini b/tester/rtems/testing/bsps/kendrytek210-renode.ini<br>
> new file mode 100644<br>
> index 0000000..8f7f673<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>)<br>
> +# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</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 are met:<br>
> +#<br>
> +# 1. Redistributions of source code must retain the above copyright notice,<br>
> +# this list of conditions and the following disclaimer.<br>
> +#<br>
> +# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
> +# this list of conditions and the following disclaimer in the documentation<br>
> +# and/or other materials provided with the distribution.<br>
> +#<br>
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 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 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 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>
This file / directory doesn't exist. I think you mean renode/<br>
If this works for you, I'm guessing you have a stale directory of<br>
renode_scripts in your rtems-tools repo locally.<br>
<br>
> diff --git a/tester/rtems/testing/bsps/leon3-renode.ini b/tester/rtems/testing/bsps/leon3-renode.ini<br>
> new file mode 100644<br>
> index 0000000..d5f7c17<br>
> --- /dev/null<br>
> +++ b/tester/rtems/testing/bsps/leon3-renode.ini<br>
> @@ -0,0 +1,37 @@<br>
> +#<br>
> +# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
> +# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</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 are met:<br>
> +# # 1. Redistributions of source code must retain the above copyright notice,<br>
> +# this list of conditions and the following disclaimer.<br>
> +#<br>
> +# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
> +# this list of conditions and the following disclaimer in the documentation<br>
> +# and/or other materials provided with the distribution.<br>
> +#<br>
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 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 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 OF THE<br>
> +# POSSIBILITY OF SUCH DAMAGE.<br>
> +#<br>
> +<br>
> +#<br>
> +# The Leon3 Renode BSP<br>
> +#<br>
> +[leon3-renode]<br>
> +bsp = leon3-renode<br>
> +arch = sparc<br>
> +tester = %{_rtscripts}/renode.cfg<br>
> +bsp_resc_script = %{_rtscripts}/renode_scripts/leon3.resc<br>
> diff --git a/tester/rtems/testing/renode.cfg b/tester/rtems/testing/renode.cfg<br>
> new file mode 100644<br>
> index 0000000..c7fee25<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>)<br>
> +# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</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 are met:<br>
> +#<br>
> +# 1. Redistributions of source code must retain the above copyright notice,<br>
> +# this list of conditions and the following disclaimer.<br>
> +#<br>
> +# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
> +# this list of conditions and the following disclaimer in the documentation<br>
> +# and/or other materials provided with the distribution.<br>
> +#<br>
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 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 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 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 add_path -e "path add @%{_rttesting}/renode"<br>
> +%define trim_command sed 's/.*\[output\] //'<br>
> +<br>
> +#<br>
> +# Executable<br>
> +#<br>
> +%execute %{renode_cmd} %{binary_opts} %{add_path} %{start_opts} | %{trim_command}<br>
> diff --git a/tester/rtems/testing/renode/kendrytek210.resc b/tester/rtems/testing/renode/kendrytek210.resc<br>
> new file mode 100644<br>
> index 0000000..e214aec<br>
> --- /dev/null<br>
> +++ b/tester/rtems/testing/renode/kendrytek210.resc<br>
> @@ -0,0 +1,86 @@<br>
> +#<br>
> +# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
> +# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</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 are met:<br>
> +#<br>
> +# 1. Redistributions of source code must retain the above copyright notice,<br>
> +# this list of conditions and the following disclaimer.<br>
> +#<br>
> +# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
> +# this list of conditions and the following disclaimer in the documentation<br>
> +# and/or other materials provided with the distribution.<br>
> +#<br>
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 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 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 OF THE<br>
> +# POSSIBILITY OF SUCH DAMAGE.<br>
> +#<br>
> +<br>
> +<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 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>
> +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>
> +machine StartGdbServer 3333<br>
> +<br>
> +macro reset<br>
> +"""<br>
> + sysbus LoadELF $bin<br>
> +"""<br>
> +# runMacro $reset<br>
> diff --git a/tester/rtems/testing/renode/leon3-prom-gpl.S b/tester/rtems/testing/renode/leon3-prom-gpl.S<br>
> new file mode 100644<br>
> index 0000000..91dc3bc<br>
> --- /dev/null<br>
> +++ b/tester/rtems/testing/renode/leon3-prom-gpl.S<br>
> @@ -0,0 +1,205 @@<br>
> +/*<br>
> + * From <a href="https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S" rel="noreferrer" target="_blank">https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S</a><br>
> + *<br>
> + * GPL license, version unknown<br>
> + */<br>
> +<br>
> +/* Template boot-code for LEON3 test benches */<br>
> +<br>
> +#include "prom.h"<br>
> +<br>
> +#ifndef STACKSIZE<br>
> +#define STACKSIZE 0x00020000<br>
> +#endif<br>
> +<br>
> +<br>
> + .seg "text"<br>
> + .proc 0<br>
> + .align 4<br>
> + .global start<br>
> +start:<br>
> +<br>
> + flush<br>
> + set 0x10e0, %g1 ! init IU<br>
> + mov %g1, %psr<br>
> + mov %g0, %wim<br>
> + mov %g0, %tbr<br>
> + mov %g0, %y<br>
> + mov %g0, %asr16<br>
> + nop<br>
> + set 0x81000f, %g1<br>
> + sta %g1, [%g0] 2<br>
> + mov %g0, %g2<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + or %g2, %g2, %g0<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> +#ifdef DSUADDR<br>
> + set DSUADDR, %g2<br>
> + st %g0, [%g2]<br>
> + st %g0, [%g2+0x08]<br>
> + st %g0, [%g2+0x20]<br>
> + st %g0, [%g2+0x24]<br>
> + st %g0, [%g2+0x40]<br>
> + st %g0, [%g2+0x44]<br>
> + st %g0, [%g2+0x50]<br>
> + st %g0, [%g2+0x54]<br>
> + st %g0, [%g2+0x58]<br>
> + st %g0, [%g2+0x5C]<br>
> + st %g0, [%g2+0x54]<br>
> +#endif<br>
> +<br>
> +2:<br>
> + mov %asr17, %g3<br>
> + and %g3, 0x1f, %g3<br>
> + mov %g0, %g4<br>
> + mov %g0, %g5<br>
> + mov %g0, %g6<br>
> + mov %g0, %g7<br>
> +1:<br>
> + mov %g0, %l0<br>
> + mov %g0, %l1<br>
> + mov %g0, %l2<br>
> + mov %g0, %l3<br>
> + mov %g0, %l4<br>
> + mov %g0, %l5<br>
> + mov %g0, %l6<br>
> + mov %g0, %l7<br>
> + mov %g0, %o0<br>
> + mov %g0, %o1<br>
> + mov %g0, %o2<br>
> + mov %g0, %o3<br>
> + mov %g0, %o4<br>
> + mov %g0, %o5<br>
> + mov %g0, %o6<br>
> + mov %g0, %o7<br>
> + subcc %g3, 1, %g3<br>
> + bge 1b<br>
> + save<br>
> +<br>
> + mov 2, %g1<br>
> + mov %g1, %wim<br>
> + set 0x10e0, %g1 ! enable traps<br>
> + mov %g1, %psr<br>
> + nop; nop; nop;<br>
> +<br>
> + mov %psr, %g1<br>
> + srl %g1, 12, %g1<br>
> + andcc %g1, 1, %g0<br>
> + be 1f<br>
> + nop<br>
> +<br>
> + set _fsrxx, %g3<br>
> + ld [%g3], %fsr<br>
> + ldd [%g3], %f0<br>
> + ldd [%g3], %f2<br>
> + ldd [%g3], %f4<br>
> + ldd [%g3], %f6<br>
> + ldd [%g3], %f8<br>
> + ldd [%g3], %f10<br>
> + ldd [%g3], %f12<br>
> + ldd [%g3], %f14<br>
> + ldd [%g3], %f16<br>
> + ldd [%g3], %f18<br>
> + ldd [%g3], %f20<br>
> + ldd [%g3], %f22<br>
> + ldd [%g3], %f24<br>
> + ldd [%g3], %f26<br>
> + ldd [%g3], %f28<br>
> + ldd [%g3], %f30<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + faddd %f0, %f2, %f4<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + nop<br>
> + ba 1f<br>
> + nop<br>
> +<br>
> +<br>
> +.align 8<br>
> +_fsrxx:<br>
> + .word 0<br>
> + .word 0<br>
> +<br>
> +1:<br>
> + mov %asr17, %g3<br>
> + srl %g3, 28, %g3<br>
> + andcc %g3, 0x0f, %g3<br>
> + bne 1f<br>
> + nop<br>
> +<br>
> +#ifdef L2MCTRLIO<br>
> + set L2MCTRLIO, %g1<br>
> + set MCFG1, %g2<br>
> + st %g2, [%g1]<br>
> + set MCFG2, %g2<br>
> + st %g2, [%g1+4]<br>
> + set MCFG3, %g2<br>
> + st %g2, [%g1+8]<br>
> +#endif<br>
> +! set IRQCTRL, %g1<br>
> +! set 0x0ffff, %g2<br>
> +! st %g2, [%g1+0x10]<br>
> +<br>
> +#ifdef UARTADDR<br>
> + set UARTADDR, %g1<br>
> + st %g0, [%g1+0xC]<br>
> + set 3, %g2<br>
> + st %g2, [%g1+0x8]<br>
> +#endif<br>
> +<br>
> +#ifdef DDR2CTRLIO<br>
> + set DDR2CTRLIO, %g1<br>
> + set DDR2CFG4, %g2<br>
> + st %g2, [%g1+12]<br>
> +#endif<br>
> +<br>
> +#ifdef ASDCFG<br>
> +#ifndef SDCTRLPNP<br>
> +#define SDCTRLPNP 0xFFFFF860<br>
> +#endif<br>
> + set SDCTRLPNP, %g1<br>
> + ld [%g1], %g2<br>
> + srl %g2, 12, %g2<br>
> + set 0x01009, %g1<br>
> + subcc %g1, %g2, %g0<br>
> + bne 1f<br>
> +<br>
> + set ASDCFG, %g1<br>
> + set DSDCFG, %g2<br>
> + st %g2, [%g1]<br>
> +#endif<br>
> +<br>
> + ! %g3 = cpu index<br>
> +1: set STACKSIZE, %g2<br>
> + mov %g0, %g1<br>
> +2: subcc %g3, 0, %g0<br>
> + be 3f<br>
> + nop<br>
> + add %g1, %g2, %g1<br>
> + ba 2b<br>
> + sub %g3, 1, %g3<br>
> +<br>
> +<br>
> +3: set RAMSTART+ RAMSIZE-32, %fp<br>
> + sub %fp, %g1, %fp<br>
> + sub %fp, 96, %sp<br>
> +<br>
> + set RAMSTART, %g1<br>
> +<br>
> + jmp %g1<br>
> + nop<br>
> +<br>
> +.align 32<br>
> diff --git a/tester/rtems/testing/renode/leon3-prom-gpl.bin b/tester/rtems/testing/renode/leon3-prom-gpl.bin<br>
> new file mode 100755<br>
> index 0000000000000000000000000000000000000000..a42628906b6915c589f6be96fe5de82a940c6529<br>
> GIT binary patch<br>
> literal 529<br>
> zcmYk&F-yZh6bJBsQma+O9uC$)FhikhM;GxB2R}yq7LJ!#(<mZEM2ZwSt%!*D2?}kc<br>
> z4h|h01RaFy;NT$Q;2>1uKedqte%#A@3Gco0o*blrF<-dG3t@Q`z^jr1PRRmTcO>iC<br>
> zTMbzff4Mk6N(p6;z9(^cO(Mvc#gPB)(jM)TrZYOH3%aB$x~3bd&;cFN5mo7!YIH(@<br>
> zHr8A-`tS_k3&-Z%*61Ed|M=Wmr=mNpLf5ht@^Nm00@2%SXIf~_w{S=I)TIY{q-T1e<br>
> z9=*~Vz0)Us(Kr3jXs;yR(V5jGPEMhaPGYtnJn{XMi)JARO?FmcCa(Kp$?ZU5yQrs!<br>
> zJ54GrZPv$AD}B~Ckj{rrNz}U?M<NX<pLe3P0rwm9@F8u{jQW9NtmRx3HF9;+C@8B|<br>
> S&~A#~dM!DadpO4bG4%^DAaPm%<br>
><br>
> literal 0<br>
> HcmV?d00001<br>
><br>
> diff --git a/tester/rtems/testing/renode/leon3.resc b/tester/rtems/testing/renode/leon3.resc<br>
> new file mode 100644<br>
> index 0000000..3196775<br>
> --- /dev/null<br>
> +++ b/tester/rtems/testing/renode/leon3.resc<br>
> @@ -0,0 +1,82 @@<br>
> +#<br>
> +# RTEMS Tools Project (<a href="http://www.rtems.org/" rel="noreferrer" target="_blank">http://www.rtems.org/</a>)<br>
> +# Copyright (C) 2023, 2023 Muhammad Sulthan Mazaya (<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</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 are met:<br>
> +#<br>
> +# 1. Redistributions of source code must retain the above copyright notice,<br>
> +# this list of conditions and the following disclaimer.<br>
> +#<br>
> +# 2. Redistributions in binary form must reproduce the above copyright notice,<br>
> +# this list of conditions and the following disclaimer in the documentation<br>
> +# and/or other materials provided with the distribution.<br>
> +#<br>
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"<br>
> +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE<br>
> +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE<br>
> +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR 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 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 OF THE<br>
> +# POSSIBILITY OF SUCH DAMAGE.<br>
> +#<br>
> +<br>
> +using sysbus<br>
> +using monitor<br>
> +<br>
> +mach create "leon3"<br>
> +<br>
> +machine LoadPlatformDescription @platforms/boards/leon3.repl<br>
> +<br>
> +path add @/<br>
> +<br>
> +showAnalyzer "uartAnalyzer" uart 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 my_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 my_hook(line):<br>
> + print line<br>
> + monitor.Parse("q")<br>
> +<br>
> +Antmicro.Renode.Hooks.UartHooksExtensions.AddLineHook(monitor.Machine["sysbus.uart"], my_match, my_hook)<br>
> +"""<br>
> +<br>
> +python $add_hook<br>
> +<br>
> +python $report_repeating_line<br>
> +<br>
> +macro reset<br>
> +"""<br>
> + # The leon3-prom-gpl.bin is built using Antmicro's script from their<br>
> + # example of how to use renode to test rtems leon3 using renode-test<br>
> + # <a href="https://github.com/antmicro/renode-rtems-leon3/blob/main/build-prom.sh" rel="noreferrer" target="_blank">https://github.com/antmicro/renode-rtems-leon3/blob/main/build-prom.sh</a><br>
> + # The source of the assembly file itself is from Gaisler<br>
> + # <a href="https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S" rel="noreferrer" target="_blank">https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S</a><br>
> + sysbus LoadBinary @leon3-prom-gpl.bin 0x0<br>
> + sysbus LoadELF $bin<br>
> +<br>
> + cpu PC 0<br>
> +"""<br>
> +<br>
> +runMacro $reset<br>
> --<br>
> 2.34.1<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><br>
</blockquote></div>