Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

RM4x Hercules MCU Bootloader

From Texas Instruments Wiki
Jump to: navigation, search

The Texas Instruments® Hercules Safety MCU boot loader is a small piece of code that can be programmed at the beginning of flash to act as an application loader as well as an update mechanism for applications running on a Hercules ARM® Cortex™-R4-based microcontroller. The boot loader can be built to use either the UART, SPI, CAN, Ethernet, or USB ports to update the code on the microcontroller. The boot loader is customizable via source code modifications, or simply deciding at compile time which routines to include. Since full source code is provided, the boot loader can be completely customized.

After HDK reset, the start-up code copies the Flash API of boot loader from flash to SRAM, and execute the boot loader in Flash.

First, it will checks to see if the GPIO_A7 pin is pulled low by calling CheckForceUpdate(). If GPIO_A7 is pulled LOW, the application code is forced to be updated. The GPIO pin check can be enabled with ENABLE_UPDATE_CHECK in the bl_config.h header file, in which case an update can be forced by changing the state of a GPIO pin ( with the push button S1 on HDK ).

Then, it will check the update status flag at 0x0007FC0. If the flag is a valid number, the bootloader will jump to the application code at 0x00020000. If the flag is not the valid number, it will configure the peripherals, then start to update the application code by calling UpdaterCan(), or UpdateSPI(), or UpdateUart(). After all the application code is programmed successfully, the status flag is also updated.


HDK BootLoader Sample Code

PC-side VC++ example project for SPI-Slave Bootloader: RM4x_SPI_Bootloader_Test.zip

This project works for RM48, RM46, and RM42 devices by adding preprocessor directive #define at the begining of the C++ file..

                   SPI Test.jpg

PC-side VC++ example project for CAN Bootloader: RM4x_CAN_Bootloader_Test.zip

This project works for RM48, RM46, and RM42 devices by adding preprocessor directive #define at the begining of the C++ file.. 

                   SPI Test.jpg  

Support

Post questions to the Hercules Forum

Important Links

  • Visit the RM4x Homepage www.ti.com/rm4 for the latest information on upcoming products and RM4x announcements.