How to make function run in RAM

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

How to make function run in RAM

1,745 Views
yuehedeng
Contributor III

My platform is MPC574x + S32DS.

My question is that how to copy a function into RAM and run after ECU start up. I search NXP community and found an example which may work in code warrior. But the S32 DS seems didn't support it.

Below is the function I want to run in RAM, but gets warnings during compiling.

RAM.PNG

Below is part of my ld file:

/**************** RAM function Section *******************/
.runInRam :
{
__RAMFUNC_START = .;
*(.runInRam)
*(.runInRam.*)
__RAMFUNC_END = .;
} > ramfunc_ram AT>Z4_APP_RAMFunc_text

Tags (2)
5 Replies

1,270 Views
stanish
NXP Employee
NXP Employee

Hi,

The #pragma section you are using in the source code is available in CodeWarrior MPC5xxx compiler only.

S32 Design Studio for Power compiler is based on gcc and therefore these pragmas are ignored.

I'd suggest you to read this document:HOWTO: Run a routine from RAM in S32 Design Studio  

Hope it helps.

Stan

0 Kudos

1,270 Views
yuehedeng
Contributor III

Same to me when I try to open the link:

Unauthorized

This place or content does not exist or access to it is restricted. If you think this is a mistake, please contact your administrator or the person who directed you here.

0 Kudos

1,270 Views
martin_kovar
NXP Employee
NXP Employee

Hello Guys,

I approved the article in internal community system. Could you please try to look once again and let me know, if you see the content?

Regards,

Martin

1,270 Views
yuehedeng
Contributor III

Yes, I can open the link and see the content now. Thanks very much.

I will try the solution shown in the page.

1,270 Views
nxppower912935
Contributor IV

Hi Stan,

I would be interested in that document, however I'm unauthorized. Is that so or limited user circle?

Regards

0 Kudos