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: Running 2nd program in flash

Part Number: TM4C123GH6PM
Other Parts Discussed in Thread: LMFLASHPROGRAMMER

Hi Folks,

I need some suggestions.  I have two program files (.bin).  Either I can use LMFlashProgrammer and run on my custom board with a TM4C123GH6PM chip setting the offset location to 0x0000.

For simplicity call them programA.bin and programB.bin

Using LMFlashProgrammer I can successfully put ProgramA @ 0x0  and ProgramB @ 0x20000   (128K location.)   Both programs are very similar and created using CSS.

I would like to have Program A have the logic to load Program B at runtime.  (Program B will act as if it were programmed at 0x0000 and the system was booting up fresh.  Program B will not exit or return to Program A.)

Are there any function calls I can use for this?  (Basically Run the .bin file loaded at 0x20000 location.   I thought about calling 0x20001 from Program A, but I think there is overhead information at the beginning of the .bin file that will not execute.  I need to look into this more.)

thanks much for any suggestions, links or examples.   Note the binary is already in flash so I think trying to go the ROM Bootloader route is overkill.

Bob

  • Hello Bob,

    We basically demonstrate this already with our Flash boot loader and the boot_demo1 / boot_demo2 example projects.

    The Flash boot loader, boot_serial, is loaded into memory at location 0x0000 and then you can set the APP_START_ADDRESS to be 0x20000 which is a valid choice that is at a page boundary. The boot loader will then be able to program your main application, which for this example, we'll say is boot_demo1 to the memory location 0x20000. The only thing you'd do different from this demo is you'd remove the ability to jump back into the boot loader which is totally fine, that's just to show you can.

    With those two files loaded, now the device will always power up, initially start the boot loader, and it will immediately call your main application at 0x20000 every time just like you want.

    Best Regards,

    Ralph Jacobi

  • Thanks.  I think I was missing setting the APP_START_ADDRESS.

    Bob