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.

advanced linking question



Hello!

 

I have two questions about linking issues. Also reading the processor wiki and manuals provided by TI didn't solv the problems.

 

1. There is a manual and example project about OTP programming. In the example linker file the .text section is linked to the OTP. If I try to compile the project with code composer I get the error message that no main functions exists. Well, of course, I can add this function. But then if have to linking options.  Because of the normal code is always linked into the .text section I need to create a new secition linked to the flash and use a PRAGMA derictive to link the main function into the new section because I want the main function to be in the flash, not in the OTP. A other way is it to link the .text section to the flash while using a additional section which is linked to the OTP. In this case I will use the PRAGMA derictive to link the boot functions into the new OTP section. My question is what way will be the better solution. Did somebody faced the same problem or is there a option to compile the boot code without a main function. I searched in the code composer manuals but i didn't find a solution.

 

2. My second question is about the stack. I saw that it is possible to link variables and constants with the help of a PRAGMA derictive to another section than .ebss. If I add the boot code to my project I will have the following problem: the normal program uses a different memory area for the stack and variables than the OTP boot code (refering to the example project provided by TI). I can link the boot code variables to a different section but is there also a way to use two different stacks, one for the boot code and one for the program code? I also searched the manuals and the E2E community but I didn't find an answer

Thanks for your consideration!