Part Number: TM4C129DNCPDT
Tool/software: TI C/C++ Compiler
Hello everyone,
I'm developing a custom bootloader for the TM4C129DNCPDT. We need to perform code updates using UART1, and because Tiva's built-in bootloader can't be used on that UART channel, we need to build our own (if it can be used, please point me in the direction of the documentation, my understanding is you can only use it with UART0 or USB). For what it's worth, I'm using TI-RTOS in addition to the TivaWare library.
In addition to this, we want to have a special setup in the flash. We want two locations where our program will live. The idea is that we always have a working version of code in the flash, so that if a code update fails, or the file is corrupted, we can fall back onto the original code, and the processor continues to function. What this means, however, is that we need a second location in flash to place firmware.
I have a few questions regarding all this:
- The FlashProgram function will place bytes directly into Flash. If I use the .bin file generated from calling "tiobj2bin" and use FlashProgram to place the .bin file into Flash, will my code run as expected? If not, what do I need to do so that FlashProgram will properly put my code into Flash?
- Is the addressing of functions relative or absolute? Meaning, if I have code at location 0x00000000 and a new version of code Flashed at 0x00050000, will my new set of code just jump/branch back to the old code when a function is called? Or would the function calls jump to the new code locations? Could this be a linker setting?
- How might I limit the available Flash to my program, to avoid overrun? I believe it's through the .cmd file, but I haven't had to do this before, so I just want to make sure.
I hope this makes sense, I know this is fairly complex and different from Tiva's general bootloader. If some of my questions would be answered via documentation, please point me in the document's direction. Thank you for your time.
- Tom