Here I describe the instructions on how to build RTEMS for a Leon2 CPU, how to build the required RTEMS tools to run test cases and a coverage analysis on RTEMS for these tests, and how to build the Couverture-QEMU emulator which is required to obtain the coverage results.
Most of the instructions were already explained in the former blog post describing the instructions for a PC386 CPU. In this post are only the instructions listed, which differ to the instructions for a PC386 CPU where the numbers of the instructions are equivalent.
6. Change to the rtems directory (given that you are still in rtems-source-builder directory) and build a toolset for the SPARC architecture:
cd rtems
../source-builder/sb-set-builder --log=l-sparc.txt --prefix=$HOME/development/rtems/4.11 4.11/rtems-sparc
../source-builder/sb-set-builder --log=l-sparc.txt --prefix=$HOME/development/rtems/4.11 4.11/rtems-sparc
10. Change to a directory in which you create a new directory that contains the built binaries of rtems for a Leon2 CPU:
cd ~/development/rtems
mkdir b-leon2
(b- for build)
11. Change to the directory which you created for the binaries of rtems for a Leon2 CPU and run configure and make:
cd b-leon2
../src/rtems/configure --target=sparc-rtems4.11 --enable-rtemsbsp=leon2 --enable-tests=yes --disable-posix
make
sudo PATH=/opt/rtems/4.11/bin:${PATH} make install
../src/rtems/configure --target=sparc-rtems4.11 --enable-rtemsbsp=leon2 --enable-tests=yes --disable-posix
make
sudo PATH=/opt/rtems/4.11/bin:${PATH} make install
15. Configure and make Couverture-QEMU for emulation of a sparc architecture (requires additional binaries, run to install: sudo apt-get install pkg-config libglib2.0-dev):
./configure --prefix=$HOME/qemu/install --target-list=sparc-softmmu --disable-virtfs --disable-werror --disable-docs
make
make install
(could require to install: sudo apt-get install pkg-config libglib2.0-dev)
make
make install
24. In file symbolSets.config ensure that the path to the static libraries which are analyzed is correct; the path has to look like:
$HOME/development/rtems/b-leon2/sparc-rtems4.11/c/leon2/cpukit/score/libscore.a
26. Execute rtems-test (enable coverage reports by --coverage):
$HOME/development/rtems/src/rtems-tools/tester/rtems-test --rtems-bsp=leon2 --coverage --log=log-leon2.log --rtems-tools=$HOME/development/rtems/4.11 $HOME/development/rtems/b-leon2/testsuites/
No comments:
Post a Comment