<div dir="ltr"><div>Just a reminder, it's almost been a week since I sent the patch. I also</div><div>sent it a month ago, but it slipped from everyone's eyes.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Jan 2, 2020 at 9:45 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">looks good to me.<br>
<br>
On Fri, Dec 27, 2019 at 5:02 AM G S Niteesh <<a href="mailto:gsnb.gn@gmail.com" target="_blank">gsnb.gn@gmail.com</a>> wrote:<br>
><br>
> ---<br>
> user/start/bsp-test.rst | 4 +-<br>
> user/tools/tester.rst | 144 ++++++++++++++++++++++++++++++++++++----<br>
> 2 files changed, 132 insertions(+), 16 deletions(-)<br>
><br>
> diff --git a/user/start/bsp-test.rst b/user/start/bsp-test.rst<br>
> index 5278375..aefeeb9 100644<br>
> --- a/user/start/bsp-test.rst<br>
> +++ b/user/start/bsp-test.rst<br>
> @@ -21,7 +21,7 @@ Just run this command:<br>
> .. code-block:: none<br>
><br>
> cd $HOME/quick-start/build/b-erc32<br>
> - rtems-test --rtems-bsp=erc32 --rtems-tools=$HOME/quick-start/rtems/5 .<br>
> + rtems-test --rtems-bsp=erc32-sis --rtems-tools=$HOME/quick-start/rtems/5 .<br>
><br>
> This command should output something like this (omitted lines are denoted by<br>
> ...). In this output the base directory :file:`$HOME/quick-start` was replaced<br>
> @@ -30,7 +30,7 @@ by ``$BASE``.<br>
> .. code-block:: none<br>
><br>
> RTEMS Testing - Tester, 5.0.not_released<br>
> - Command Line: $BASE/rtems/5/bin/rtems-test --rtems-bsp=erc32 --rtems-tools=$BASE/rtems/5 .<br>
> + Command Line: $BASE/rtems/5/bin/rtems-test --rtems-bsp=erc32-sis --rtems-tools=$BASE/rtems/5 .<br>
> Python: 2.7.15 (default, Jan 10 2019, 01:14:47) [GCC 4.2.1 Compatible FreeBSD Clang 6.0.1 (tags/RELEASE_601/final 335540)]<br>
> Host: FreeBSD-12.0-RELEASE-p2-amd64-64bit-ELF (FreeBSD Build_FreeBSD12 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 GENERIC amd64 amd64)<br>
> [ 1/589] p:0 f:0 u:0 e:0 I:0 B:0 t:0 i:0 W:0 | sparc/erc32: dhrystone.exe<br>
> diff --git a/user/tools/tester.rst b/user/tools/tester.rst<br>
> index 609384b..c3c3fe2 100644<br>
> --- a/user/tools/tester.rst<br>
> +++ b/user/tools/tester.rst<br>
> @@ -109,39 +109,155 @@ the tests. Using the run with the ERC32 BSP the command is:<br>
><br>
> The run command is the GDB simulator without the GDB part.<br>
><br>
> -Running the example using GDB:<br>
> +Running the example using SIS:<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + $ sparc-rtems5-sis sparc-rtems5/c/erc32/testsuites/samples/hello/hello.exe<br>
> + SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019<br>
> + Bug-reports to <a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</a><br>
> + ERC32 emulation enabled<br>
> +<br>
> + Loaded sparc-rtems5/c/erc32/testsuites/samples/hello.exe, entry 0x02000000<br>
> +<br>
> + sis> run<br>
> +<br>
> +<br>
> + *** BEGIN OF TEST HELLO WORLD ***<br>
> + *** TEST VERSION: 5.0.0.c6d8589bb00a9d2a5a094c68c90290df1dc44807<br>
> + *** TEST STATE: EXPECTED-PASS<br>
> + *** TEST BUILD: RTEMS_POSIX_API<br>
> + *** TEST TOOLS: 7.5.0 20191114 (RTEMS 5, RSB 83fa79314dd87c0a8c78fd642b2cea3138be8dd6, Newlib 3e24fbf6f)<br>
> + Hello World<br>
> +<br>
> + *** END OF TEST HELLO WORLD ***<br>
> +<br>
> +<br>
> + *** FATAL ***<br>
> + fatal source: 0 (INTERNAL_ERROR_CORE)<br>
> + fatal code: 5 (INTERNAL_ERROR_THREAD_EXITTED)<br>
> + RTEMS version: 5.0.0.c6d8589bb00a9d2a5a094c68c90290df1dc44807<br>
> + RTEMS tools: 7.5.0 20191114 (RTEMS 5, RSB 83fa79314dd87c0a8c78fd642b2cea3138be8dd6, Newlib 3e24fbf6f)<br>
> + executing thread ID: 0x08a010001<br>
> + executing thread name: UI1<br>
> + cpu 0 in error mode (tt = 0x101)<br>
> + 116401 02009ae0: 91d02000 ta 0x0<br>
> +<br>
> + sis> q<br>
> +<br>
> +The examples can also be run using GDB with SIS as the backend. SIS can be connected to<br>
> +gdb through a network socket using the gdb remote interface.<br>
> +<br>
> +Either start SIS with ``-gdb``, or issue the ``gdb`` command inside SIS, and connect<br>
> +gdb with ``target remote:1234``. The default port is ``1234``, the port can be changed<br>
> +using the ``-port`` option.<br>
> +<br>
> +Open a terminal and issue the command:<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + $ sparc-rtems5-sis -gdb<br>
> + SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019<br>
> + Bug-reports to <a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</a><br>
> + ERC32 emulation enabled<br>
> +<br>
> + gdb: listening on port 1234<br>
> +<br>
> +Now open another terminal and issue the command:<br>
><br>
> .. code-block:: none<br>
><br>
> $ sparc-rtems5-gdb sparc-rtems5/c/erc32/testsuites/samples/hello/hello.exe<br>
> - GNU gdb (GDB) 7.12<br>
> - Copyright (C) 2016 Free Software Foundation, Inc.<br>
> + GNU gdb (GDB) 8.3<br>
> + Copyright (C) 2019 Free Software Foundation, Inc.<br>
> License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>
> This is free software: you are free to change and redistribute it.<br>
> - There is NO WARRANTY, to the extent permitted by law. Type "show copying"<br>
> - and "show warranty" for details.<br>
> + There is NO WARRANTY, to the extent permitted by law.<br>
> + Type "show copying" and "show warranty" for details.<br>
> This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-rtems5".<br>
> Type "show configuration" for configuration details.<br>
> For bug reporting instructions, please see:<br>
> <<a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/bugs/</a>>.<br>
> Find the GDB manual and other documentation resources online at:<br>
> - <<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/documentation/</a>>.<br>
> + <<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/documentation/</a>>.<br>
> +<br>
> For help, type "help".<br>
> Type "apropos word" to search for commands related to "word"...<br>
> - Reading symbols from<br>
> - sparc-rtems5/c/erc32/testsuites/samples/hello/hello.exe...done.<br>
> - (gdb) target sim<br>
> - Connected to the simulator.<br>
> + Reading symbols from sparc-rtems5/c/erc32/testsuites/samples/hello.exe...<br>
> + (gdb) target remote:1234<br>
> +<br>
> +The ``target remote:1234`` will tell gdb to connect to the sis simulator. After this<br>
> +command the output of the first terminal will change to<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + $ sparc-rtems5-sis -gdb<br>
> + SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019<br>
> + Bug-reports to <a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</a><br>
> + ERC32 emulation enabled<br>
> +<br>
> + gdb: listening on port 1234 connected<br>
> +<br>
> +Before running the executable, it must be loaded, this is done using the<br>
> +``load`` command in gdb, and to run, issue ``continue`` command.<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + $ sparc-rtems5-gdb sparc-rtems5/c/erc32/testsuites/samples/hello/hello.exe<br>
> + GNU gdb (GDB) 8.3<br>
> + Copyright (C) 2019 Free Software Foundation, Inc.<br>
> + License GPLv3+: GNU GPL version 3 or later <<a href="http://gnu.org/licenses/gpl.html" rel="noreferrer" target="_blank">http://gnu.org/licenses/gpl.html</a>><br>
> + This is free software: you are free to change and redistribute it.<br>
> + There is NO WARRANTY, to the extent permitted by law.<br>
> + Type "show copying" and "show warranty" for details.<br>
> + This GDB was configured as "--host=x86_64-linux-gnu --target=sparc-rtems5".<br>
> + Type "show configuration" for configuration details.<br>
> + For bug reporting instructions, please see:<br>
> + <<a href="http://www.gnu.org/software/gdb/bugs/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/bugs/</a>>.<br>
> + Find the GDB manual and other documentation resources online at:<br>
> + <<a href="http://www.gnu.org/software/gdb/documentation/" rel="noreferrer" target="_blank">http://www.gnu.org/software/gdb/documentation/</a>>.<br>
> +<br>
> + For help, type "help".<br>
> + Type "apropos word" to search for commands related to "word"...<br>
> + Reading symbols from sparc-rtems5/c/erc32/testsuites/samples/hello.exe...<br>
> + (gdb) target remote:1234<br>
> + Remote debugging using :1234<br>
> + 0x00000000 in ?? ()<br>
> (gdb) load<br>
> - (gdb) r<br>
> - Starting program: sparc-rtems5/c/erc32/testsuites/samples/hello/hello.exe<br>
> + Loading section .text, size 0x17170 lma 0x2000000<br>
> + Loading section .rtemsroset, size 0x40 lma 0x2017170<br>
> + Loading section .data, size 0x600 lma 0x20181c0<br>
> + Start address 0x2000000, load size 96176<br>
> + Transfer rate: 4696 KB/sec, 270 bytes/write.<br>
> + (gdb) continue<br>
> + Continuing.<br>
> +<br>
> +You can see your executable running in the first terminal.<br>
> +<br>
> +.. code-block:: none<br>
> +<br>
> + SIS - SPARC/RISCV instruction simulator 2.20, copyright Jiri Gaisler 2019<br>
> + Bug-reports to <a href="mailto:jiri@gaisler.se" target="_blank">jiri@gaisler.se</a><br>
> +<br>
> + ERC32 emulation enabled<br>
> +<br>
> + gdb: listening on port 1235 connected<br>
> + X2000000,0:#40<br>
><br>
><br>
> *** BEGIN OF TEST HELLO WORLD ***<br>
> + *** TEST VERSION: 5.0.0.c6d8589bb00a9d2a5a094c68c90290df1dc44807<br>
> + *** TEST STATE: EXPECTED-PASS<br>
> + *** TEST BUILD: RTEMS_POSIX_API<br>
> + *** TEST TOOLS: 7.5.0 20191114 (RTEMS 5, RSB 83fa79314dd87c0a8c78fd642b2cea3138be8dd6, Newlib 3e24fbf6f)<br>
> Hello World<br>
> +<br>
> *** END OF TEST HELLO WORLD ***<br>
> - [Inferior 1 (process 42000) exited normally]<br>
> - (gdb) q<br>
> +<br>
> + ^Csis> q<br>
> +<br>
> +<br>
> +For more information on the sis simulator refer to this doc: <a href="https://gaisler.se/sis/sis.pdf" rel="noreferrer" target="_blank">https://gaisler.se/sis/sis.pdf</a><br>
><br>
> The command ``r`` is used to debug set break points before issuing the GDB<br>
> ``run`` command.<br>
> --<br>
> 2.17.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></div>