How to integrate library file in a specific RAM area

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

How to integrate library file in a specific RAM area

480 Views
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 Kudos
1 Reply

453 Views
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 Kudos