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.
Hello all,
Currently, i'm working on the flash based ethernet bootloader for the TIVA launchpad (TM4C1294xl). I have managed to program the bootloader and the demo app that is provided by TI (on their latest tivaware release) and i have seen the LED blinking on the board (which is what i expected). Also, i have managed to successfully update the board using the LM Flash Programmer. At the top of that, i have managed to also update the board with the demo app, using my own script that written in Python.
Although, since i'm trying to move away from the demo app, i have tried to program another example on the launchpad when using the flash based ethernet bootloader. I've tried to program the blinky example in order to check if the bootloader is still working. However, when programmed the blinky at 0x4000 i wasn't able to see the on-board LED blinking.
Therefore, i suspected that there is difference between the demo emac flash and the blinky apps.
My question is, which is that difference that i cannot spot between those two apps? Why the demo emac works absolutely fine when programmed at 0x4000 and the blinky app is not working at all when programmed at the exact same flash address? Of course when i'm programming both of the aforementioned apps on the board, i have ticked the option "Erase Necessary Pages - (slower)" within the LM Flash Programmer. The IDE i'm using is KEIL μVision 5.29.
Thank you in advance for your help
An application that is to be programmed by the flash bootloader must be linked so that it starts at location 0x4000. It is not sufficient to take an application such as blinky and relocate the .bin file it to address 0x4000 because absolute addresses used in the code will be wrong. Starting with, the reset vector which got moved to address 0x4004 is pointing to the wrong spot so the blinky code will not even start.
Note that in the link command file for blinky the flash starts at 0x0000, but the link command file for boot_demo1 starts at 0x4000.
First of all, thank you Bob for your quick reply. Much appreciated.
Before marking the post as resolved, i have one more question. Indeed, i've noticed that the blinky app is a bit different than the demo mac app. Although, as mentioned in my initial post, i couldn't spot where are these difference (in the source code i mean).
Now, you mentioned about the linker script, i've located the scatter file of both apps and i've seen the differences.
Boot demo emac flash --> 0x00004000
Blinky app --> 0x00000000
I have changed the start address of the blinky app within the scatter file in order to start from 0x00004000 and it now works as expected and i can see the on-board LED blinking. Although, now i have another question. Is it safe to change the app start address within the scatter file manually? In other words, if i want to transfer the bootloader to a custom made PCB (that has, of course, the TM4C1924NCPDT) and write my own application/firmware, can i just edit the scatter file and give it the app start address manually? Is that safe to do?
Thank you in advance!
I have to start with a disclaimer. I do not use the Keil tools so I am extrapolating my answer from the way it works on TI Code Composer Studio. Since the .sct files are provided by TI in the examples routines, I suspect that they are not generated or modified by the Keil GUI. Therefore a manual change to the start address in the .sct file should work.
Perhaps some community member who uses the Keil tools can confirm or correct my statement.
I'm still keeping this post unlocked since nobody answered yet. Will mark it as resolved once someone from TI verifies that modifying the scatter file is safe.
What i've done in the meantime, i found that within the project options in Keil (within the 'Target'tab), we can change the application start address without touching the scatter file. So, i would assume that the manual configuration of the scatter file is not a big deal as long as we don't touch anything else apart from the application start address.
Based on this information from ARM, modifying the .scf file is safe. If you need further assistance with the ARM/Keil tools, please contact them.
https://www.keil.com/support/man/docs/armlink/armlink_pge1362075656353.htm
Thank you for your reply Bob. Much appreciated. Your first reply resolved my issue.