RAM MPC5744P

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

RAM MPC5744P

1,703 Views
金翅大鹏鸟
Contributor II

Do anyone know how to put the variables into fixed areas on the chip MPC5744P?

0 Kudos
Reply
4 Replies

1,603 Views
cholland
Contributor V

There is an example "Run From RAM"  HOWTO: Run a routine from RAM in S32 Design Studio  

You have to set the memory allocations using the linker and attributes.

The example shows how to run a function from ram, but you should be able to figure out how to set variable in ram.

HTH,

0 Kudos
Reply

1,603 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

Could you please explain what you mean by "fixed areas" ?

You can preserve data by using core registers, or EEPROM.

See core reference manual:

pastedImage_1.png

regards,

Peter

0 Kudos
Reply

1,603 Views
金翅大鹏鸟
Contributor II

I do not know how to set in S32DS

0 Kudos
Reply

1,603 Views
金翅大鹏鸟
Contributor II

I want to put  the variables(

INT16 g_iTcMot1SpdReq = 0;
INT16 g_iTcMot1TqReq = 0;
UINT8 g_byTcMot2CtrlMod = 0;
INT16 g_iTcMot2SpdReq = 0;
INT16 g_iTcMot2TqReq = 0;
INT16 g_iTcTotaltqCmd = 0;
UINT8 g_byTcmot1LimtSts = 0;
INT16 g_iTcmot1TqCmd = 0;
INT16 g_iTcmot1TqMax = 0;
INT16 g_iTcmot1TqMin = 0;
UINT8 g_byTcmot2LimtSts = 0;
INT16 g_iTcmot2TqCmd = 0;
INT16 g_iTcmot2TqMax = 0;
INT16 g_iTcmot2TqMin = 0;
BYTE g_byTcuCanLossFlag = 0;
UINT8 g_byTcuErrCod = 0;
UINT8 g_byTcuErrLvl = 0;
UINT8 g_byTcuOperatMode = 0;
BYTE g_byTcuchkokflg1 = 0;
BYTE g_byTcuchkokflg2 = 0;
BYTE g_byTcuchkokflg3 = 0;
BYTE g_byTcuchkokflg4 = 0;
BYTE g_byTcuchkokflg5 = 0;
UINT8 g_byTculivcnt1 = 0;
UINT8 g_byTculivcnt2 = 0;
UINT8 g_byTculivcnt3 = 0;
UINT8 g_byTculivcnt4 = 0;)

at a address start from 0x40000100 to 0x40000400

0 Kudos
Reply