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.

update code on TM4C123G

I am new to embedded programming and this forum, as far as posting is concerned but have used it a lot to debug my code and get used to the tiva environment. I thank everyone who have contributed. 
I have a question now, was not able to find a solution so thought of posting it here.

Initially i can burn a code onto the board, but after that when i send a command to update, to the board.
It must be able to receive the compiled code via uart1 or spi1, or for the sake of simplicity let us assume that a compiled code is available on the SD card that is plugged in.
Now it must update the code so that it can, from now on run the new compiled code.
Is it possible ? If yes how ?

And also after updating it must start running the new code. How is that to be done ?
Should it be reset oris there any other way ?

As i said, i am new to embedded programming, so a simple explanation accompanying a complicated explanation (if any) would greatly help.

Thanks in  advance..

  • Hello Abhilash,

    What you are planning to do is called a custom flash based boot loader. On the TM4C123 there are examples to do the same. The examples are kept in TivaWare installation as boot_serial and the secondary code that will be updated over UART-0 as boot_demo1 and boot_demo2.

    You would need to modify the same for UART-1. It is not going to be easy as there would be some subtleties of the peripheral, but the forum is here to support.

    Regards

    Amit

  • @Amit Ashara

    Thanks for the information.

    I will try it out and get back.

  • Hello Abhilash,

    Do remember that the code is for DK-TM4C123 and not EK-TM4C123. The original code uses grlib for display which may give some problems on the EK-TM4C123...

    Regards

    Amit

  • abilash rs said:
    I am new to embedded programming

    May I offer a suggestion intended to "save you" from intense pain/suffering?  Do not be in such rush to, "update your board" via the (always) complicated means of, "boot-loader."

    The "appeal" of - and "rush" to attempt such - lands almost each/every new user (and quite a few experienced ones) upon the hostile, MCU rocks!  That's not good - and to my group's mind & long observation - retards your proper MCU learning & experimentation.  (you will likely "bog down" w/in the great complexity of the boot-loader - and for what?)

    Hundreds of applications exist successfully w/out any boot-loader - especially those not intended for wide, commercial deployment. 

    Simple "risk-reward" dictates that you build your skills across multiple ARM peripherals - gain experience & confidence - and only then hoist sails & chart course toward isle, "boot-loader."   (be sure you bring swim-fins/life-jacket - Amit's cell #...)

    And...duly noted is your care/effort in producing a detailed narrative.  Far more compelling than "usual" "I wanna..." (who cares?)

  • @cb1_mobile


    Thanks for the warning .