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:

  1. Make sure your TFTP server runs with the '-s /afs/slac/package/rtems/4.6.2' option.
  2. Use the SMON 'config' command and provide
  3. Load and execute the 'reflash' script:
    1. loadEB "ssrlApps/powerpc-rtems/svgm/img/" "reflash"
    2. execEB "reflash"
    3. reboot

Starting the Bootloader

You are now all set to start the bootloader

Coredump Utility

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:

  1. DONT hit the reset switch.
  2. 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 flash/rom.
  3. Hit reset. Fdiag comes up, your crashed app is still in memory.
  4. Issue 'execEB "coredump"' at the Fdiag prompt.
  5. The 'coredump' utility boots up and lets you specify a filename on a TFTP server.
  6. 'coredump' dumps the entire memory contents to the server.
  7. 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.
  8. 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.