SPNA243 June 2020 TM4C1236D5PM , TM4C1236D5PM , TM4C1236E6PM , TM4C1236E6PM , TM4C1236H6PM , TM4C1236H6PM , TM4C1237D5PM , TM4C1237D5PM , TM4C1237D5PZ , TM4C1237D5PZ , TM4C1237E6PM , TM4C1237E6PM , TM4C1237E6PZ , TM4C1237E6PZ , TM4C1237H6PGE , TM4C1237H6PGE , TM4C1237H6PM , TM4C1237H6PM , TM4C1237H6PZ , TM4C1237H6PZ , TM4C123FE6PM , TM4C123FE6PM , TM4C123FH6PM , TM4C123FH6PM , TM4C123GE6PM , TM4C123GE6PM , TM4C123GE6PZ , TM4C123GE6PZ , TM4C123GH6PGE , TM4C123GH6PGE , TM4C123GH6PM , TM4C123GH6PM , TM4C123GH6PZ , TM4C123GH6PZ , TM4C123GH6ZRB , TM4C123GH6ZRB , TM4C123GH6ZXR , TM4C123GH6ZXR
This example application behaves the same way as a bootloader. It resides at the beginning of flash, and will read a binary file from a USB memory stick and program it into another location in flash. Once the user application has been programmed into flash, this program will always start the user application until requested to load a new application.
When this application (usb_stick_update) starts, if there is a user application (usb_stick_demo) already in flash (at APP_START_ADDRESS), then it will just run the user application. It will attempt to load a new application from a USB memory stick under the following conditions:
When this application is attempting to perform an update, it will wait indefinitely for a USB memory stick to be plugged in. Once a USB memory stick is found, it will search the root directory for a specific file name, which is FIRMWARE.BIN by default. This file must be a binary image of the program you want to load (the .bin file), linked to run from the correct address, at APP_START_ADDRESS.
NOTE
This example only supports the 8.3 filename naming scheme (also called a short filename or SFN). The name of the file must be 11 characters total, 8 for the base name and 3 for the extension. If the actual file name has fewer characters then it must be padded with spaces. By default, the file name is defined in the directive in the usb_stick_update.c as follows: #define USB_UPDATE_FILENAME "FIRMWAREBIN".
The USB memory stick must be formatted as a FAT16 or FAT32 file system (the normal case), and the binary file must be located in the root directory. Other files can exist on the memory stick but they will be ignored.
NOTE
The APP_START_ADDRESS for the user application is currently defined as 0x4800 in this example. However, this can be changed to any address that is aligned to the flash page size which is 0x400 for the TM4C123 MCU.