RTEMS Coldfire Development Environment on the CESR Control System
Instrumentation in the CESR control system frequently uses the RTEMS operating system running on the uCdimm Coldfire module uC5282 by Arcturus Networks
It is based on a Freescale Coldfire MFC5282 processor and integrates RAM, Flash, Ethernet and CAN
The operating system and BSP used is RTEMS
and the toolchain is provided by GNU gcc suite
including gdb, binutils and newlib.
The following sections explain how to use the RTEMS development environment to build an example application which can be loaded to the uCdimm module and eventually flashed to ROM.
Note, that currently several versions of RTEMS are installed:
RTEMS 4.9.3 is used for the coldfire modules.
RTEMS 4.10 is used for the MVME5500 boards.
Other versions have not been fully configured and should not be used.
Location of RTEMS installation and setup
The RTEMS toolchains for version 4.9.3 are installed on nodes CESRnnn in the following location:
To set your environment run the following command, which will source the setup files (or just copy the contents into your personal environment setup) assuming bash shell usage.
For c shell variants the corresponding setup scripts are provided, too.
This will add the path:
All executables of the toolchain for the corresponding architecture are in those bin directories and will follow other GNU tools in the path order.
Building applications with RTEMS
For compiling programs for RTEMS 4.9.3 there is an example in
which will compile a runnable RTEMS image to be loaded into RAM or being flashed into ROM on the uCdimm Coldfire module.
Copy that directory and its contents into your work area. After sourcing the setup script as mentioned above, the command
should produce the sub-directory 'o-optimize' containing the following files:
hello.ralf will be the application image to be uploaded.
The relevant libraries and include files for compiling and linking an RTEMS application for the uCdimm module are located in
Building the cbi_net server with RTEMS
User and reference guides for RTEMS
Essential for porting or creating code is the application user guide of the RTEMS project using C language.
For RTEMS version 4.9.3, all user guides and documentation has been installed in
The networking guide, which is focusing on driver development, can be found here:
BSP User Guides
BSP and architecture specific user guides can be found here:
DIMM Module Environment Variables
The DIMM module needs to be configured for TCP/IP applications.
The TCP/IP parameters are initialized with environment variables and then used by the 'rtems_nvram' function.
The board must be configured by using appropriate values in the following set of commands:
setenv HOSTNAME cbi-cf07
setenv IPADDR0 192.168.1.196
setenv GATEWAY 192.168.1.210 ! use 172.17.0.1 for ERL subnet
setenv NETMASK 255.255.255.0 ! use 255.255.0.0 for ERL subnet
setenv SERVER 192.168.1.80 ! BOOTP server?
setenv NAMESERVER 22.214.171.124 ! or 126.96.36.199
setenv NTPSERVER 188.8.131.52 ! or 184.108.40.206 or 220.127.116.11
setenv BOARD_TYPE 6048-013A ! or 7104-016A
setenv AUTOBOOT 5 !automatically start the application from FLASH after 5 seconds
CESR no longer supports EPICS with RTEMS.
For CBI_NET applications, if the BOARD_TYPE environment variable is not set, it will default to 6048-113, which is the BPM/BSM/XBSM/FLM digital board.
The current valid choices are:
6048-113 for the BPM/BSM/XBSM/FLM DSP Board
7104-016A for the ERL RF DSP Board
The compiled and linked executable is placed in the
subdirectory, with a ".ralf" extension.
This file needs to be transferred to the RAM of the uCdimm module and either flashed to the program ROM or just started from the RAM area.
The easiest way is to do this by using a
The bootloader on the uCdimm is able to run a tftp daemon, started by just typing
at the boot prompt
From the development host - say "cesr105" - one then starts a tftp client connected to the uCdimm module eg
user@cesr105> tftp 192.168.1.196
tftp> put hello.ralf
After successful transfer, hit
for the tftp daemon on the uCdimm module to disconnect, and "quit" on the tftp client will close the other side.
After that, one can either just start the transferred application from the default RAM address by typing:
or flash the program ROM with the application executable:
Now the application can be started with
Setting up Coldfire for a CBPM module
- 24 July 2014