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
-
Common Makefile for a couple of targets ( ARM/Raspberry Pi and SPARC/sis simulator )
Each target can be configured and compiled separately.
You can 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
You then need to type, replacing the paths and ARCH/BSP appropriately
$ make ARCH=sparc-rtems4.11 BSP=sis RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11
to build the executable.
Here is how to run the rki program on the SPARC/sis simulator:
$ make ARCH=sparc-rtems4.11 BSP=sis RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11 # build the image $ sparc-rtems4.11-gdb legacy-build/sparc-rtems4.11-sis/rki.elf (gdb) target sim (gdb) load (gdb) run
And the Raspberry Pi:
$ make ARCH=arm-rtems4.11 BSP=raspberrypi RTEMS_TOOL_BASE=/home/cdesai/rtems/tools RTEMS_BSP_BASE=/home/cdesai/rtems/4.11 # build the image $ cp legacy-build/arm-rtems4.11-raspberrypi/rki.bin legacy-build/arm-rtems4.11-raspberrypi/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.