This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TM4C123GH6PM: Issues with bootloader

Part Number: TM4C123GH6PM

Hi,

in one of our current projects we're using the TM4C123GH6PM uC. To enable the customer to do easy firmware updates I would like to implement the TivaWare bootloader along with my custom application. The application provides an UART interface for the customer to interact with the entire hardware. What I really would like to do is to use the same UART port for the firmware update using the bootloader. Any hints and instructions are appreciated.

Thanks!

  • Mathias,
    We do something similar, with the following strategy:
    - There is an "updating API" which resides in the main application. When it receives update messages via UART, it stores the new code in a separate memory location. If all the packages arrive properly, if sets a flag on eeprom, so that our own bootloader knows that there is new firmware available.
    - Then the board is reset, and the bootloader copies the new stored code into the default running location in flash memory - after having made a backup copy of the old one into somewhere else.
    - Bootloader is as small as possible, and resides on the 0x00 location, separate from the main application. In "normal circumstances", it starts running, verifies that there is no update in memory, and detours code execution to the beginning of the main app.
    - There is a watchdog as part of the "updating API" - if the new code does not properly feed the dog, the next time the bootloader runs it will restore back the previous firmware, to avoid permanent bricking.
    - The port we use is not hooked for updates only, it servers as one of the "normal communication channels" of the application - and the updating messages have to follow a certain protocol, so that they are identified as such.
    - Because the update transfer actually happens in the main app, any connection to the MCU can be used (uart, spi, bluetooth, ethernet, whatever).
    - There is a small external program used to send the .bin to the MCU encapsulated by such protocol - and we use such either in Windows or in Android.
    That being said, it is much easier said than done - but it shall be on the category "any hints" that you described.
    Cheers
    Bruno
  • Hi,

      This app note http://www.ti.com/lit/an/spma074a/spma074a.pdf will be a good starting point for you to develop a UART based bootloader. The app note contains example projects that you can reference.

  • Hi,
    In additiona, in TivaWare you can also find bootloader example project under examples->boards->ek-tm4c129exl->boot_serial.