mirror of
https://github.com/t-crest/rtems.git
synced 2025-11-16 12:34:47 +00:00
f6962ce139379b87ad250edffd2ba432a0672928
Improved startup code.
…
…
…
=======================
Installing RTEMS 4.10.2
=======================
In this installation guide we present the steps to install RTEMS 4.10.2 for the
Patmos Pasim BSP. Additionally, for testing/comparison purposes, we present the
same install process for the SPARC Leon3 BSP.
Currently, only the Leon3 BSP is completely functional.
Documentation on RTEMS can be found on:
http://www.rtems.org/onlinedocs/releases/
Documentation on version 4.10.2 of RTEMS can be found on:
http://www.rtems.org/onlinedocs/releases/rtemsdocs-4.10.2/share/rtems/html/
==================================
Installing RTEMS 4.10.2 for Patmos
==================================
Installing the Patmos compiler
==============================
In order to compile the RTEMS 4.10.2 OS for Patmos, we need to install the
Patmos compiler tool chain in a slightly different manner than the usual.
Assuming that we are using the Build Script to build the Tool Chain:
(a) Download/Checkout the build script:
'git clone https://github.com/t-crest/patmos-misc.git misc'
(b) 'cd misc'
(c) 'cp build.cfg.dist build.cfg', then edit build.cfg to:
(c.1) set ROOT_DIR
(c.2) change TARGET="patmos-unknown-unknown-elf" to
TARGET="patmos-unknown-rtems"
(c.3) uncomment GOLD_CXXFLAGS="-Wno-narrowing"
(d) edit build.sh to:
(d.1) change TARGET="patmos-unknown-unknown-elf" to
TARGET="patmos-unknown-rtems"
(d.2) change GOLD_ARGS="$GOLD_ARGS --target=patmos-unknown-unknown-elf" to
GOLD_ARGS="$GOLD_ARGS --target=patmos-unknown-rtems"
(d.3) uncomment GOLD_CXXFLAGS="-Wno-narrowing"
The RTEMS build system requires compiler, assembler and linker tools to be
compliant with the target of the installation (CPU-Vendor-OS). Therefore,
the Patmos executables created in this installation must be renamed or copied
under different names. E.g. the patmos-clang compiler tool will have to be
renamed to patmos-unknown-rtems-clang:
'cp patmos-clang patmos-unknown-rtems-clang'
In this folder there is a script ('target-change.sh') to be placed in the misc directory, that
copies all the patmos tools to the required nomenclature.
Finally, the Patmos executables must be added to the path environment variable
(e.g. 'export PATH=${PATH}:/ROOT_DIR/local/bin').
Installing RTEMS 4.10.2
=======================
Use the command 'git clone https://github.com/t-crest/rtems rtems-4.10.2' to
download the build files of RTEMS 4.10.2. Prior to the installation process, it
is necessary to run the bootstrap script. The bootstrap script found in the
top level directory of the RTEMS source tree is executed to produce the
automatically generated files. The bootstrap command is usually invoked in one
of the following manners:
(a) bootstrap to regenerate all files that are generated by
autoconf and automake.
(b) bootstrap -c to remove all files generated by autoconf and automake.
(c) bootstrap -p to regenerate preinstall.am files.
Once the RTEMS 4.10.2 is bootstraped, the configure script should run. The
configure process specializes the Makefile.in files at the time that RTEMS is
configured for a specific development host and target.
Configure for Patmos Pasim
--------------------------
Prior to configuring RTEMS with the Pasim BSP, create and go to the
configuration directory:
'mkdir ~/rtems-4.10.2-build'
'cd ~/rtems-4.10.2-build'
To configure RTEMS using the Patmos Pasim BSP, use the following command:
'~/rtems-4.10.2/configure --target=patmos-unknown-rtems --disable-posix
--disable-networking --disable-cxx --enable-rtemsbsp=pasim --prefix=INSTALL-DIR'
It is assumed that the source files for the installation are placed at
'~/rtems-4.10.2' directory, and the variable INSTALL-DIR should be replaced by
the installation directory (e.g. '~/rtems-4.10.2-install'). The script shoud be
executed from the configuration directory (e.g. '~/rtems-4.10.2-build').
Finish installation
-------------------
After configuring RTEMS for the specific CPU and board target, use
'make install' to install RTEMS 4.10.2. Next, set the path to the RTEMS
specific installation. Assuming 'INSTALL-DIR=~/rtems-4.10.2-install':
'export RTEMS_MAKEFILE_PATH=~/rtems-4.10.2-install/patmos-unknown-rtems/pasim'
Test installation
-----------------
To test installation, to check if the OS is working properly,
checkout the RTEMS Classic API examples at Github, using
'git clone https://github.com/RTEMS/examples-v2 ~/rtems-examples'. Then:
(a) go to the triple period example, using
'cd ~/rtems-examples/classic_api/triple_period'
(b) use 'make' to create the executable
(c) run the executable, using 'pasim o-optimize/triple_period.exe'
=================================
Installing RTEMS 4.10.2 for SPARC
=================================
Installing SPARC-RTEMS4.10 tools
================================
To install sparc-rtems4.10 tools, go to
http://www.rtems.org/ftp/pub/rtems/linux/4.10/ and download the appropriate
files. E.g. for the Fedora distribution of Linux, go to
http://www.rtems.org/ftp/pub/rtems/linux/4.10/fedora/17/x86_64/, and download:
(a) rtems-4.10-release-0.20130314.0-1.fc17.noarch.rpm
(b) rtems-4.10-yum-conf-0.20130314.0-1.fc17.noarch.rpm
Next, execute the following commands:
'sudo rpm -ivh rtems-4.10-release-0.20130314.0-1.fc17.noarch.rpm'
'sudo rpm -ivh rtems-4.10-yum-conf-0.20130314.0-1.fc17.noarch.rpm'
'sudo yum install rtems-4.10-sparc-rtems4.10-*'
Installing Leon3 Simulator
==========================
To install the Leon3 simulator, go to
http://www.gaisler.com/index.php/downloads/simulators?task=view&id=157, and
download file 'tsim-leon3-2.0.24.tar.gz'. Then, just use command
'tar tsim-leon3-2.0.24.tar.gz' to untar the file, and run
'export PATH=$PATH:/opt/rtems-4.10/bin' to make the tsim-leon3 simulator
available for use.
Installing RTEMS 4.10.2
=======================
Use the command 'git clone https://github.com/t-crest/rtems rtems-4.10.2' to
download the build files of RTEMS 4.10.2. Prior to the installation process, it
is necessary to run the bootstrap script. The bootstrap script found in the
top level directory of the RTEMS source tree is executed to produce the
automatically generated files. The bootstrap command is usually invoked in one
of the following manners:
(a) bootstrap to regenerate all files that are generated by
autoconf and automake.
(b) bootstrap -c to remove all files generated by autoconf and automake.
(c) bootstrap -p to regenerate preinstall.am files.
Once the RTEMS 4.10.2 is bootstraped, the configure script should run. The
configure process specializes the Makefile.in files at the time that RTEMS is
configured for a specific development host and target.
Configure for SPARC Leon3
-------------------------
Prior to configuring RTEMS with the Leon3 BSP, create and go to the
configuration directory:
'mkdir ~/rtems-4.10.2-build'
'cd ~/rtems-4.10.2-build'
To configure RTEMS using the SPARC Leon3 BSP, use the following command:
'~/rtems-4.10.2/configure --target=sparc-rtems4.10 --disable-posix
--disable-networking --disable-cxx --enable-rtemsbsp=leon3 --prefix=INSTALL-DIR'
It is assumed that the source files for the installation are placed at
'~/rtems-4.10.2' directory, and the variable INSTALL-DIR should be replaced by
the installation directory (e.g. '~/rtems-4.10.2-install'). The script shoud be
executed from the configuration directory (e.g. '~/rtems-4.10.2-build').
Finish installation
-------------------
After configuring RTEMS for the specific CPU and board target, use
'make install' to install RTEMS 4.10.2. Next, set the path to the RTEMS
specific installation. Assuming 'INSTALL-DIR=~/rtems-4.10.2-install':
'export RTEMS_MAKEFILE_PATH=~/rtems-4.10.2-install/sparc-rtems4.10/leon3'
Test installation
-----------------
To test installation, to check if the OS is working properly,
checkout the RTEMS Classic API examples at Github, using
'git clone https://github.com/RTEMS/examples-v2 ~/rtems-examples'. Then:
(a) go to the triple period example, using
'cd ~/rtems-examples/classic_api/triple_period'
(b) use 'make' to create the executable
(c) run the executable, using 'tsim-leon3 o-optimize/triple_period.exe'
Description
Languages
C
87%
Assembly
4.3%
Ada
2.9%
Makefile
1.6%
C++
1.2%
Other
2.8%