NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.
TMS570 Hercules MCU Bootloader
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[edit]
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.
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..
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..
== Support ==
- Post questions to the TMS570 Forum
Important Links[edit]
- Visit the TMS570 Homepage www.ti.com/tms570 for the latest information on upcoming products and TMS570 announcements.