Hello, Support
I understand it uses additional linkerscript files under this folder, but the file name is bss.ldt, data.ldt and main_text.ldt . while the automatic generated linker file is *.ld. What is the difference between them, how can they not in conflict with the managed ones please?
I am intended to create a small section of my own linker script which I can put some variables there in fixed RAM address with NoInit attribute, but I am not sure how to do it, a simple example could help please.
Regards!
Ping
Solved! Go to Solution.
Hi Ping,
Yes, that's correct. If you want to place something at a specific address then you can split the RAM as you mentioned before. Regarding the smallest unit that you can split the RAM, please see the image below.
Regards,
Victor
Hello Ping,
The following community document explains how to achieve this.
Relocating Code and Data Using the MCUXpresso IDE
Also, in chapter 17 of MCUXpresso IDE User Guide, you'll find information on how to achieve this as well.
Regards,
Victor
Thank you, Victor
If I need to add some variables at a fixed RAM address, will I need to add a .ldt file in Linkscript folder? Can i add all sections and memory information i need into 1 file?
Many posts suggests using link script is the only way to do this, and gives some scripts, but I don't really know where to put them and how to let it work with auto generated .ld files.
Regards!
Ping
Hello Ping,
If you want to place variables in a fixed RAM address, the best approach is to use the Macros. To see how this works, please refer to section 17.13.2 of the MCUXpresso User Guide.
Regards,
Victor
Hi, Victor
Thanks you for your support, I use Macro to put some variables in a specific RAM region, if more variables are used, probably need to divide up the RAM region into many small areas? what is the smallest unit a RAM can be divided to ?
Regards!
Ping
Hello Ping,
There's no need to divide the RAM region into many small areas. You can put different variables into the same region of RAM without problems.
Regards,
Victor
Hi, Victor
Thanks for reply!
If I put many variables into same RAM, the absolute address of these variables will be randomly arranged then I have no control over their addresses, is that right?
Regards!
Ping
Hi Ping,
Yes, that's correct. If you want to place something at a specific address then you can split the RAM as you mentioned before. Regarding the smallest unit that you can split the RAM, please see the image below.
Regards,
Victor