MPC5748g allocate variables to RAM

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

MPC5748g allocate variables to RAM

504 次查看
jiajian_qiu
Contributor II

Hi:

      I want to assign variables to RAM, and I know use the way as below:(MPC5748G on Power PC V1.2)

      uint32_t __attribute__ ((section(".data"))) var = 0;

      

      But now I have a lot of variables , so how ‘’__attribute__ ’ all variables at once, Thanks.

      Best regards.

标记 (2)
0 项奖励
1 回复

449 次查看
martin_kovar
NXP Employee
NXP Employee

Hello,

unfortunately, there is no way, how to place variables in RAM together. Only possibility is add __attribute__ to every single variable. I know, this is not comfort way, unfortunately this is only way.

Sorry for any inconvenience.

Regards,

Martin

0 项奖励