Explain the linkscripts used in flexspi_nor_polling_tranfer example please?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Explain the linkscripts used in flexspi_nor_polling_tranfer example please?

ソリューションへジャンプ
2,982件の閲覧回数
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

 

タグ(1)
0 件の賞賛
返信
1 解決策
2,916件の閲覧回数
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 件の賞賛
返信
7 返答(返信)
2,967件の閲覧回数
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 件の賞賛
返信
2,956件の閲覧回数
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 件の賞賛
返信
2,948件の閲覧回数
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 件の賞賛
返信
2,944件の閲覧回数
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 件の賞賛
返信
2,927件の閲覧回数
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 件の賞賛
返信
2,923件の閲覧回数
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 件の賞賛
返信
2,917件の閲覧回数
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 件の賞賛
返信