Booting RTEMS/GeSys on a Synergy VGM Series Board
Although the SMON firmware can be used for booting it is not quite as
powerful as it is desirable. Therefore, a dedicated bootloader (which is
itself a RTEMS application) was written. The bootloader is programmed into
flash memory where it could coexist with vxworks bootrom code (even this is
not used at SSRL). In addition to the bootloader, there are a few SMON
scripts for flash programming and starting the bootloader itself. Booting
using vxbootrom code is not supported.
Programming the Flash
Prior to booting RTEMS, the bootloader must be programmed into Flash:
- Make sure your TFTP server runs with the '-s
- Use the SMON 'config' command and provide
- Enable SMON boot --> 'Y'
- Target IP address --> Board's IP address
- Host IP address --> TFTP server address
- Netmask and gateway as needed
- Load and execute the 'reflash' script:
- loadEB "ssrlApps/powerpc-rtems/svgm/img/reflash.st"
- execEB "reflash"
Starting the Bootloader
You are now all set to start the bootloader
- Execute the "rtems" script. Simply issue a 'execEB
"rtems"' command at the SMON prompt.
- The "rtems" script can also be automatically executed at
startup. Create or edit the "startup" script and enable it
(SMON 'config' command). The "startup" script
needs a single line: 'execEB "rtems";'. This extra
indirection allows for easily switching between multiple systems (e.g.,
linux vs. rtems). Consult the SMON documentation for more information
about scripts and SMON commands.
The "reflash" script also burns a 'coredump' utility
into flash and loads a "coredump" script. This is another RTEMS
application designed to directly run out of flash memory and use little
memory. It's sole purpose is dumping raw memory contents to the host. It is
very useful to analyze a crashed application. If your application ever
crashes or freezes, perform the following steps:
- DONT hit the reset switch.
- Program the user, DIP switches to the '0xfe' pattern. This causes the
board to come up in 'Fdiag' mode after resetting. In this mode, the
original memory contents are preserved since Fdiag executes out of
- Hit reset. Fdiag comes up, your crashed app is still in memory.
- Issue 'execEB "coredump"' at the Fdiag prompt.
- The 'coredump' utility boots up and lets you specify a
filename on a TFTP server.
- 'coredump' dumps the entire memory contents to the
- On the development host, use the 'gencore' utility to
convert the raw memory image into a 'core' file that 'gdb' is
able to understand. 'gencore', with the help of RTEMS/Gesys,
is also able to write register contents into the core file for
'gdb' to be picked up. For that purpose, it needs the address
of the register block in memory. This README.gdb describes how
to generate the core file.
- Use 'gdb' with the RTEMS/GeSys ELF file 'rtems.nxe' and the 'core'
file. It is even possible to analyze loaded modules in this way. Contact
me for more information about how to do that.