S32K144-How to remap Flash address to Ram?

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

S32K144-How to remap Flash address to Ram?

2,777 Views
cqhcau
Contributor I

In automotive ECU development,we use CCP/XCP to calibrate Engine parameter.

In order to  achieve calibration online,we need  remap Flash address to Ram.

In S12XEP100-We can use RELOCATE_TO in CodeWarrior to achieve this ;

In MPC57xx- We can use Overlay Ram to achieve this;

In e200 series-- We can use MMU to achieve this;

So how to achieve this in S32K144(ARM Cotex M4F)?

Labels (1)
0 Kudos
5 Replies

2,096 Views
leo_cheng
Contributor I

You can refer to AN11983- Using the S32K1xx EEPROM Functionality. You can access EEPROM with ram address directly.

http://www.nxp.com/docs/en/application-note/AN11983.pdf 

0 Kudos

2,096 Views
cqhcau
Contributor I

Anyone who knows?

0 Kudos

2,096 Views
dianabatrlova
NXP TechSupport
NXP TechSupport

Hello,

If you want to place the function into RAM you can use, for example:

__attribute__ ((section(".code_ram"))) // place the code below into .code_ram section
void MyFunc(void);

I hope it helps.

Best Regards,

Diana

0 Kudos

2,096 Views
cqhcau
Contributor I

Thanks.

I use the  Keil MDK IDE. By edit the ".sct" file ,it seems solve my problem. But int the ".map" file,it just display the Exec Addr of one particular constant,did not display the Load Addr.The test project as below.

In the .sct file,I add one section "const_section":

pastedImage_2.png

I define the constants and variables as below.

pastedImage_3.png

The code in the for loop as below.

pastedImage_4.png

In the .map file.

pastedImage_5.png

pastedImage_6.png

In the debug interface.

pastedImage_7.png

I edit aaa[0] to 0x11, and it works.

pastedImage_8.png

Now there's one problem-in the .map file I can not find the address of aaa or bbb in flash(just the address in ram).So is there a way to solve it ,or I need to calculate the flash address of aaa and bbb by myself?

Thanks.

0 Kudos

1,983 Views
caijiachao
Contributor I

hello, how about this problem later?

0 Kudos