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.
Tool/software: Code Composer Studio
Dear TI-Team,
I just created a plain project for the TM4C129ENCPDT in CCSv8. I jusr added an while(1) in the main.
Using the actual GNU compiler (v7.2.1 Linaro) and the default linker script.
Now i want to shrink my FLASH in the linkerscript.
FLASH (RX) : ORIGIN = 0x00004000, LENGTH = 0x000FC000
and set
PROVIDE (_intvecs_base_address = 0x00004000);
Why is GNU filling the flash until the 0x00004000 address with 0x00? I know the default fillingoption for sections starting with '.' of the gnu linker is 0x00, but why is there code previous of the 0x00004000 address?
This basic question appeared since the TI compiler is leaving this space as it is and therefore isn't overwriting for e.g a bootloader.
Can you help me to understand this behaviour? Thanks in advance.
regards
Lukas
Hi Lukas,
Let me try to understand your question. You created a new project and this project will start at 0x4000. How did you program this new project into the flash? Did you program this project via the JTAG interface or this application project is programmed by the bootloader who is sitting at 0x0?
If you were to use the JTAG to program your firmware image (starting at 0x4000) you will need to make sure that the bootloader is not overwritten. I don't know which IDE/tool you use to program the application image. If you use CCS then please make sure you don't select the "Entire Flash". The default is selecting the radio button "Use the Erase Options Specified Below" and the option that will be selected is "Entire Flash". With the default setting, the CCS will program your application at 0x4000. However, everything from 0x0 to 0x4000 will also be erased. I'm not sure if this is the issue you are asking. If not please clarify your question for me. If you are using the GNU tool chain to program the flash then the tool should have options that is similar to CCS, I hope , to allow you not erase a certain range of the memory. I have no experience with GNU tool chain. You will need to ask the GNU for support if this is the issue you are asking to resolve.
For experiment, can you try other debug probes such as XDS100v2, XDS200, or XDS110?
Another thing is for you to find out from GNU if somehow the prefill of 0x0 can be disabled. I hope there are some switches that comes with the GNU to do so.
This is my nearly default linkerscript. There are also bootdemos with gcc in the TivaC but i didn't get them to work.
TI compiler: skips the memoryarea which isn't mentioned by the .cmd file
GNU compiler: zeropads the unmentioned memory as shown below.
So my question is: Why and how is the TI compiler doing that in the right way?
regards,
Lukas