Name

BootUp Integration — Detail

BootUp

The BootUp support for this platform is primarily implemented in the sama5d3xpld_misc.c file. The functions are only included when the CYGPKG_BOOTUP package is being used to construct the actual BootUp loader binary.

The BootUp code is designed to be very simple, and it is envisaged that once an implementation has been defined the binary will only need to be installed onto a device once. Its only purpose is to allow the startup of the main ROMRAM application.

This platform specific documentation should be read in conjunction with the generic BootUp package documentation.

The BootUp package provides a basic but fully functional implementation for the platform. It is envisaged that the developer will customize and further extend the platform side support to meet their specific application identification and update requirements.

The BootUp binary can be installed on any SAMA5D3x bootable media, and is not restricted to being placed into NAND flash.

On execution BootUp will copy the ROMRAM configured final application from its Non-Volatile-Memory (NVM) location. The configuration option CYGIMP_BOOTUP_SAMA5D3_SOURCE selects where the second-level BootUp code will look for the final application image. At present only NAND Flash is supported.

The SAMA5D3x-MB (MotherBoard) documentation provides more detail about the SAMA5D3 BootUp world, including secure boot functionality.

Building BootUp

Building a BootUp loader image is most conveniently done at the command line. The steps needed to rebuild the SRAM version of BootUp are:

$ mkdir bootup_SRAM
$ cd bootup_SRAM
$ ecosconfig new sama5d3xpld minimal
$ ecosconfig import $ECOS_REPOSITORY/packages/hal/arm/cortexa/sama5d3/sama5d3xpld/current/misc/bootup_SRAM.ecm
$ ecosconfig resolve
$ ecosconfig tree
$ make

The resulting install/bin/bootup.bin binary can then be programmed into a suitable non-volatile memory as supported by the SAMA5D3 on-chip RomBOOT. e.g. NAND Flash.

The example bootup_SRAM.ecm is configured to expect to find the ROMRAM application stored in the NAND Flash at offset CYGNUM_BOOTUP_SAMA5D3_SOURCE_OFFSET. It is also configured with application encryption support (CYGFUN_BOOTUP_SAMA5D3_SOURCE_SECURE option) to allow decryption of the stored application to its final RAM destination.

[Note]Note

The application image to be loaded does not need to be encrypted. The BootUp code uses binary identity markers to check for the presence of a plaintext (unencrypted) image; if not present, a check for encrypted markers is made.

Whether or not encryption is in use, the application image must be installed to offset CYGNUM_BOOTUP_SAMA5D3_SOURCE_OFFSET in the source NVM.

Installing BootUp

How the second-level BootUp loader is placed into bootable memory in a production environment is beyond the scope of this document. However, for the sama5d3xpld target platform, several solutions are available.

The simplest may be to use the on-chip SAM-BA support via a USB CDC-ACM host connnection to J6. This procedure is documented in the Setup section, which may also be used to install your choice of ROMRAM eCos application onto the target hardware.

Alternatively, a suitable hardware debugger (JTAG) configuration could directly update the relevant memories via suitable host-based debugger software features, or configuration script sequence. At its simplest the JTAG interface could be used to load a ROMRAM application that performs the necessary update of the boot NVM memory, either from embedding the required binaries in the application image, or (ideally) loading data from a suitable network location via the Ethernet interfaces J12/J13.