How to integrate library file in a specific RAM area

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to integrate library file in a specific RAM area

993 次查看
WeoWang
NXP Employee
NXP Employee

Hi Dear Colleagues,

There is a requirement from my customer.

Their end customer gave them a library:

WeoWang_0-1675755062351.png

 

And required them to put the library into a specific RAM area,  then, use MPU to protect this area.

How to realize this requirement?

Best Regards

Weiyou Wang

0 项奖励
回复
1 回复

966 次查看
stanish
NXP Employee
NXP Employee

Hello Weiyou,

If the library source code has been compiled with custom sections attributes, then they can easily place these sections  (e.g. myLibConst) into custom memory space.

Anyway, gcc linker allows placement of any object code (.text) into a custom section. This way they could force to place library code/data/consts into a specitic memory custom sections even if the library object code was NOT compiled with specific placement for code/data/const.

see e.g.

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Run-a-routine-from-RAM-in-S32-De...

https://community.nxp.com/t5/S32-Design-Studio-Knowledge-Base/HOWTO-Execute-a-library-function-from-...

 

Hope it helps.

Stan

0 项奖励
回复