You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Installation on Host Linux

The SDK comes in four flavors, one for each of the "architectures". These flavors are:

  1. arm-rtems-rceCA9 – target specific code for RTEMS
  2. arm-linux-rceCA9 – target specific code for ArchLinux
  3. i86-linux-32 – Host tools for 32-bit linux
  4. i86-linux-64 – Host tools for 64-bit linux

To retrieve the SDK from SLAC, execute the following command on your host:

git clone http://www.slac.stanford.edu/projects/CTK/SDK/<architecture>.git <install_path>

This will place the most recent tag of the SDK into <install_path>

If you wish a different tag, you may add the "-b <os>-<tag>" option to git clone.    os is either linux or rtemstag is of the format VX.Y.Z

Then finalize the installation by executing:

<install_path>/tools/install-sdk.sh

The git clone option "-b" causes several "detached HEAD" warning messages.  These are benign, but if you wish to suppress them, you may modify your global git configuration with:

git config --global advice.detachedHead false

Installation on the Target

We use tools in the host linux SDK to install the target RTEMS SDK. You will need the following available:

  1. the i86-linux SDK appropriate to your host machine
  2. the arm-rtems-rceCA9 SDK
  3. The location of your target in "shelf/slot/bay/rce" space (like "katahdin/12/0/2")
  4. Optionally:  the location of your new FPGA bitstream

RTEMS Core

Package the RTEMS SDK into a tarball like so:

<i86_linux_SDK_path>/tools/packageSDK <RTEMS_SDK_path> ~/foo.tar

Then, install the tarball onto your target at <location> with:

<i86_linux_SDK_path>/tools/updateRCE <location> ~/foo.tar

This script logs its progress, so you can see where it is.

Note: prior to V0.4.0, the updateRCE command had the argument order <tarball> <location>.

Linux Core

Package the arm-linux-rceCA9 SDK like you would for RTEMS, substituting the path to the arm-linux SDK for the RTEMS SDK.  Install as above.

Bootstrap

The bootstrap is dependent on the type of board you are updating.  (dpm/dtm/zed/zc70x)

<i86_linux_SDK_path>/tools/updateBOOTSTRAP <location> <RTEMS_SDK_path> [dpm|dtm|zed|zc70x]

FPGA bitstream

The user has control of the FPGA bitstream, however a copy known to work with the RTEMS core is included with the RTEMS SDK.

<i86_linux_SDK_path>/tools/updateFPGA <location> <bitstream_path>

Troubleshooting and recovery

 

You've corrupted something, and you're stuck with a non-booting RCE

In most cases, it is best to use the updateFOO scripts above to recover, but if the RCE is stuck in an infinite boot loop, they won't work.

You can replace the RTEMS core libraries, the RTEMS APP libraries, as well as the bootloader and the FPGA bitstream from an SD reader.   The RTEMS APP area is most likely, since it is the only core partition writable from RTEMS.

  1.  Put the SD card in a reader, and observe that devices are created for the partitions SD card in /dev/sdXN (where X is a letter, and N is [1-7]).  If you need, you can use "partprobe -s" to list them as well.
  2. RTEMS APP libraries and SVTs:
    The RTEMS APP partition is /dev/sdX6.  Mount it.  Copy all files in SDK/tgt/rtemsapp/config to /mnt/config.  Sync the partition and eject.
  3. RTEMS Libraries:
    The RTEMS partition is /dev/sdX5.  Mount that partition.  Copy all the files in SDK/tgt/rtems/* to that mount point.  Sync the partition and eject.
  4.  Bootloader/FPGA bitstream
    The BOOT partition is /dev/sdX1.  Mount it.  Copy either boot.bin or fpga.bit from SDK/tgt/boot/dpm to that point.  Sync and eject.

This will leave you with a system which boots the core code, but your user code won't run automatically.  You'll have to reinstall your own code.

  • No labels