embeddedrtems

Rtems 5 BSP Test Failing


I am trying to install rtems 5 on my ubuntu-19.04 machine, using the instructions in QuickStart, everything is ok until section 2.7, when it appears that the gdb that was built is missing the "sim" target.

The complete sequence of commands is :

 2022  mkdir -p $HOME/quick-start/src
 2023  cd $HOME/quick-start/src
 2024  git clone git://git.rtems.org/rtems-source-builder.git rsb
 2025  git clone git://git.rtems.org/rtems.git
 2026  cd $HOME/quick-start/src/rsb/rtems
 2027  ../source-builder/sb-set-builder --source-only-download 5/rtems-sparc
 2028  cd $HOME/quick-start/src/rsb/rtems
 2029  ../source-builder/sb-set-builder --prefix=$HOME/quick-start/rtems/5 5/rtems-sparc
 2030  $HOME/quick-start/rtems/5/bin/sparc-rtems5-gcc --version --verbose
 2031  cd $HOME/quick-start/src/rtems
 2032  export PATH=$HOME/quick-start/rtems/5/bin:"$PATH"
 2033  ./bootstrap -c
 2034  $HOME/quick-start/src/rsb/source-builder/sb-bootstrap
 2035  mkdir -p $HOME/quick-start/build/b-erc32
 2036  cd $HOME/quick-start/build/b-erc32
 2037  export PATH=$HOME/quick-start/rtems/5/bin:"$PATH"
 2038  $HOME/quick-start/src/rtems/configure     --prefix=$HOME/quick-start/rtems/5     --enable-maintainer-mode     --target=sparc-rtems5     --enable-rtemsbsp=erc32     --enable-tests
 2039  cd $HOME/quick-start/build/b-erc32
 2040  make
 2041  cd $HOME/quick-start/build/b-erc32
 2042  make install
 2043  cd $HOME/quick-start/build/b-erc32
 2044  rtems-test --rtems-bsp=erc32 --rtems-tools=$HOME/quick-start/rtems/5 .

A check of the source builder says OK:

user@machine:~/quick-start/build/b-erc32$ $HOME/quick-start/src/rsb/source-builder/sb-check 
RTEMS Source Builder - Check, 5 (4a6f476c14aa)
Environment is ok

The Actual test & output:

user@machine:~/quick-start/build/b-erc32$ rtems-test --rtems-bsp=erc32 --rtems-tools=$HOME/quick-start/rtems/5 .
RTEMS Testing - Tester, 5.0.not_released
 Command Line: /home/user/quick-start/rtems/5/bin/rtems-test --rtems-bsp=erc32 --rtems-tools=/home/user/quick-start/rtems/5 .
 Host: Linux machine 5.0.0-31-generic #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019 x86_64
 Python: 3.7.3 (default, Aug 20 2019, 17:04:43) [GCC 8.3.0]
Host: Linux-5.0.0-31-generic-x86_64-with-Ubuntu-19.04-disco (Linux machine 5.0.0-31-generic #33-Ubuntu SMP Mon Sep 30 18:51:59 UTC 2019 x86_64 x86_64)
[  1/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: dhrystone.exe
[  4/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: fsbdpart01.exe
[  2/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: linpack.exe
[  3/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: whetstone.exe
[  6/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: fsdosfsformat01.exe
[  5/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: fsclose01.exe
[  7/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: fsdosfsname01.exe
[  8/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: fsdosfsname02.exe
[  1/601] p:0   f:0   u:0   e:0   I:0   B:0   t:0   i:0   W:0   | sparc/erc32: dhrystone.exe
Result: invalid    Time: 0:00:03.029451 dhrystone.exe
=>  gdb: /home/user/quick-start/rtems/5/bin/sparc-rtems5-gdb -i=mi --nx --quiet ./sparc-rtems5/c/erc32/testsuites/benchmarks/dhrystone.exe
=>  Reading symbols from ./sparc-rtems5/c/erc32/testsuites/benchmarks/dhrystone.exe...
=>  target sim
=>  Undefined target command: "sim".  Try "help target".
=>  quit
[SNIP]
[601/601] p:1   f:0   u:0   e:0   I:0   B:0   t:0   i:593 W:0   | sparc/erc32: tmtimer01.exe
Result: invalid    Time: 0:00:03.006092 tmtimer01.exe
=>  gdb: /home/user/quick-start/rtems/5/bin/sparc-rtems5-gdb -i=mi --nx --quiet ./sparc-rtems5/c/erc32/testsuites/tmtests/tmtimer01.exe
=>  Reading symbols from ./sparc-rtems5/c/erc32/testsuites/tmtests/tmtimer01.exe...
=>  target sim
=>  Undefined target command: "sim".  Try "help target".
=>  quit

Passed:          1
Failed:          0
User Input:      0
Expected Fail:   0
Indeterminate:   0
Benchmark:       0
Timeout:         0
Invalid:       600
Wrong Version:   0
Wrong Build:     0
Wrong Tools:     0
------------------
Total:         601

Does anyone more experienced with rtems know how to build the sparc-rtems5-gdb properly so this can be corrected ?


Solution

  • The SIS (Software Instruction Simulator) has been removed from GDB and is now available as a separate command called sis. Please check if this command has been built and installed with your RTEMS tool set. If present please use --rtems-bsp=erc32-sis as the test command BSP:

    rtems-test --rtems-bsp=erc32-sis --rtems-tools=$HOME/quick-start/rtems/5 .
    

    The SIS simulator in GDB was being maintained as a patch to GDB in the RTEMS tools and this created work everytime we updated the GDB version. A separate program is simpler to maintain and can be used with GDB via the remote protocol so everything we had with the patch is still present but we do not need to keep a patch hang around. The new sis command also supports RISCV simulation as well.