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.

How to update firmware for Tiva TM4C

Hi all,
I want to update application code for Tiva TM4C
1. Is it possible for a normal application running on TM4C to replace (over-write) itself (in flash)? If yes, how to do that? Is there any document for that?
2. If #1 above is not possible, I have to use ROM Bootloader. In the document about ROM Bootloader (SPMU301a.pdf), I know that I can use UART0 for serial update. I also found a CCS example project that calls ROM_UpdateUART(). But that's all I have, I don't have source code for ROM_UpdateUART(). So, what is the protocol to talk to ROM_UpdateUART() ? What address on ROM to write application binary to?
    BTW, I don't want to use LM Flash Programmer, I want to write our code to talk to ROM Bootloader via Tiva's UART0.

Thanks,

Viet Hoang.

  • Hi Viet,

    What you are looking for is a bootloader. It's a program that is the flash that always runs first. In case a update event happens (you set if it's from UART, SPI, I2C, USB) it programs the rest of the flash without erasing itself but it erases the rest of the flash. If it doesn't run a update the bootloader will just go into the "normal" code.
    Check out Tivaware documentations (not sure if there's examples) for that and this:
    www.ti.com.cn/.../spmu301a.pdf

    This is to what you referred and I am pretty sure it refers also to a bootloader in flash.


    Now if you need a application that completely erases itself like a one time bootloader I'm sure that's possible. I think it already loads most of itself to SRAM at startup to program the flash so you would just need to make the bootloader start programming the flash from the top.
  • Hi Luis,

    Thanks for your answer and sorry for my late reply, I was quite busy.

    Yes, I read that document about ROM Bootloader. I also found a C source file name sflash.c that talk to ROM Bootloader from PC via UART. So basically I knew the prototcol to talk to ROM Bootloader. But I still can't find the answer for my remaining question: Which address ( of Tiva's flash) I should write my application binary to?

    Do you / Or does any one have any information about that address?

    Thanks,

    Viet Hoang.