Explain the linkscripts used in flexspi_nor_polling_tranfer example please?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Explain the linkscripts used in flexspi_nor_polling_tranfer example please?

Jump to solution
1,642 Views
ping1
Contributor V

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

 

Tags (1)
0 Kudos
1 Solution
1,576 Views
victorjimenez
NXP TechSupport
NXP TechSupport

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. 

victorjimenez_0-1616795069288.png

Regards,
Victor 

View solution in original post

0 Kudos
7 Replies
1,627 Views
victorjimenez
NXP TechSupport
NXP TechSupport

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 

0 Kudos
1,616 Views
ping1
Contributor V

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

0 Kudos
1,608 Views
victorjimenez
NXP TechSupport
NXP TechSupport

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 

0 Kudos
1,604 Views
ping1
Contributor V

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

0 Kudos
1,587 Views
victorjimenez
NXP TechSupport
NXP TechSupport

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

0 Kudos
1,583 Views
ping1
Contributor V

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 

0 Kudos
1,577 Views
victorjimenez
NXP TechSupport
NXP TechSupport

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. 

victorjimenez_0-1616795069288.png

Regards,
Victor 

0 Kudos