This project provides a starting point or example of how to configure an RTEMS application for your project. There are many ways to configure an RTEMS application, this project is just something I have done to help me run on various targets. It is put together from different examples I have found, most of which have been contributed by RTEMS developers.
Note
|
I have tested this on the Raspberry Pi and the SPARC/sis simulator with RTEMS 4.11. I have not tested this project with RTEMS 4.10. I am not sure the RAM disk code will compile and run on RTEMS 4.10. |
This project configuration provides:
-
RAM Disk setup
-
NVRAM Disk setup
-
Network setup ( if the target supports it )
-
Shell setup and shell startup script
-
Example shell commands including whetstone and dhrystone benchmarks
-
Makefiles for a couple of targets ( ARM/Raspberry Pi and SPARC/sis simulator )
Each target can be configured and compiled separately.
For the Raspberry Pi, enter the build-arm-rpi subdirectory. For the SPARC/sis simulator target, enter the build-sparc-sis directory.
## ## paths for the RTEMS tools and RTEMS BSP ## RTEMS_TOOL_BASE=/home/alan/Projects/rtems/4.11 RTEMS_BSP_BASE=/home/alan/Projects/rtems/4.11
In addition to the build environment, you can also configure many of the options in the RKI. Take a close look at the following files:
-
rtems_config.h
-
rki_config.h
-
rtems_net_config.h
-
arm-rtems4.11 and/or sparc-rtems4.11 tools installed
-
arm/raspberrypi and or sparc/sis BSP compiled and installed
-
The paths in the makefile set to the tools and BSP
You should be able to just type
$ make
to build the executable.
Here is how to run the rki program on the SPARC/sis simulator:
$ make # build the image $ ./run-sis.sh (gdb) target sim (gdb) load (gdb) run
And the Raspberry Pi:
$ make # build the image $ cp rki.bin kernel.img ( Now copy the kernel.img to your Raspberry Pi SD card. Be sure to back up the old kernel.img! )
When you run the application on a target, you should get the shell prompt. Try some of these commands:
# task
# sema
# dhrystone
# whetstone
# taskdemo
There are quite a few more commands to run, just type
# help
You can also add your own commands, and include a startup script
Check out what the startup script is doing by typing:
# cat shell-init
In the case of the Raspberry Pi BSP, it formats a 64 Megabyte RAM disk with the RTEMS file system, then mounts the disk on /ram.