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.

Multiple applications/binaries in flash in Tiva C

Hello everyone,

                        I am working on TM4C129, i have two binaries(around 300KB size) flashed at different locations in flash(say at 0th location and at 512KB location). How to jump from one binary to another binary with soft reset. I have tried changing BOOTCFG, FMC registers, but since RVP register is read only iam not able to change it. I have tried flashing binary at non-zero location in flash using LM flasher and the device is not working.

As an other experiment i tried changing _c_int00 at 0x00000004 location in flash which points to _c_int00 in second binary, but that didn't worked.

Is it possible to jump from one binary to other binary in flash in Tiva C?

Regards,

Suresh

  • Hello Suresh,

    What is the condition to decide which is the image to use at Soft Reset?

    The CPU does not know which image is valid. The software needs to tell that to the CPU else it will always execute from 0x4

    Regards

    Amit

  • Hi Amit,

               Thanks for the quick response.

    My actual requirement is to do firmware upgrade via BT chip connected to it. Initially i will boot from image1(which is at 0th location) and when i receive new firmware i will place it at 512KB location and from then onwards want to boot from that location(i will maintain a flag in EEPROM). once again if i receive new firmware i will place it at 0th location and want to boot from 0th location(ping-pong implementation). 

    I have referred this post:

    http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/t/317657.aspx

    and came to know that for my firmware to run at 512KB location, i have to keep complete code from 512KB in flash in linker command file and generate a binary. Please let me know if my understanding is wrong. Please let me know if there is any option to do this?

    My last option is to maintain a function in RAM which will replace the image1(at 0th address) in flash with image2(512KB address).

    Regards,

    Suresh

  • Hello Suresh,

    Your understanding is correct. However based on the requirement you mentioned, I would first understand how do you plan to upload the code from the BT chip. That will help forum (and me) assess if the ROM Boot loaders may be used, customized flash boot loader may be used.

    Regards

    Amit

  • Hi Amit,

     We are using UART for data transfer from BT to TIVA.

    Regards,

    Suresh

  • Hello Suresh,

    When you send the new firmware over UART, do you have a custom code running in the main application code. I am asking this question as the ROM Based UART Boot loader requires a format in which data is sent to it. If the BL IC can send the data in the same format, it would greatly simplify your application.

    The whole pretext is based on the fact that the same can be done in the BT IC.

    Regards

    Amit

  • Hi Amit,

                Sorry for the late reply. Yes we have custom code running in the main application. We have solved firmware upgrade issue by keeping a function in flash at a particular location which replace the old firmware with new firmware and then reboots.

    Regards,

    Suresh

  • Hello Suresh,

    That is what the Flash Boot loader example code which come as part of the TivaWare will do.

    Regards

    Amit