Manage specific data in specific memory MPC5745R

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

Manage specific data in specific memory MPC5745R

981 Views
raghurajappa
Contributor IV

I have asked a question - https://community.nxp.com/thread/499913 

But have a follow up question that I thought fitted in this community more.

I use simulink to generate code (in the form of .c and .h files). Then I use Linker files to divide the data segment (SRAM) into, let's say, 4 segments to prevent/protect against overwriting of specific data. 

Now the question is - How do I instruct the linker to link specific data files to specific memory segments? I know it's possible to have compiler instructions to indicate specific variables to be mapped to specific mem segment (like __attribute__((section .... bla bla)). But I don't know how to map specific file scope data to memory segments. Any light upon this?? I ask this because the code is generated from Simulink and there are few tweaks possible in Simulink but not to the extent that I can indicate unsupported microcontrollers' memory segments. Atleast I am not aware of such possibilities. 

Btw I use WindRiver Diab compiler but tips for even the Code warrior GCC is fine. 

For ARM based processors, I could create my mem section (example .myMemSection) and map object files (.o files) to this mem segment. But I don't know how this would work for PowerPC based compilers for MPC5745R.

  .myMemSection 0x<some number>:
  {
      <filename1>.o(*);
      <filename2>.o(*);
  } > m_data

Also I have already read https://community.nxp.com/thread/389100 

https://community.nxp.com/thread/389099

Kind Regards,
Raghu

0 Kudos
Reply
1 Reply

828 Views
martin_kovar
NXP Employee
NXP Employee

Hello Raghu,

from my point of view, the link below could help you to resolve your problem.

https://community.nxp.com/message/1125081 

Regards,

Martin

0 Kudos
Reply