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.

TMS570 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

HDK Bootloader CCS5.x Project (SPI, CAN, UART):  Hercules_MCU_Bootloader.zip    

The zip file contains six device folders: TMS570LS31x, TMS570LS12x, TMS570LS04x, RM48, RM46, and RM42. Each device folder has 3 bootloader folders which contains CCS5.2 project, bootloader configure file, and cmd file. All the source C and assembly code are located in \src folder, and all the header files are in \inc folder, please copy flash API library to \lib folder if you want to use the default project settings.   

                 Projects Structure.jpg  Projects Structure2.jpg     Projects Structure3.jpg

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

This project works for TMS570LS31, TMS570LS12, and TMS570LS04 devices by adding preprocessor directive #define at the begining of the C++ file..

                   SPI Test.jpg

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

This project works for TMS570LS31, TMS570LS12, and TMS570LS04 devices by adding preprocessor directive #define at the begining of the C++ file.. 

                   SPI Test.jpg  


== Support ==


Important Links

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