Codewarrior and 64-bits local variables

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

Codewarrior and 64-bits local variables

2,376 次查看
MPC_user
Contributor I
Hi !!

I used a MPC5554 with CodeWarrior v4.2 build 130 and WinIDEA as debugger.

I have some problems with 64 bits local variables.

In a function, I declare 2 local variables f type "unsigned long long"
The first one is located into stack (internal ram)
The second one is located at 0x00000000 (internal flash). The area is unmodifiable.

Is there any configuration of MPC or compiler/linker option to solve this problem ?
Have you already see that phenomenon ?

Thanks for answers



Message Edited by MPC_user on 2009-02-03 02:36 PM
标签 (1)
标记 (1)
0 项奖励
回复
1 回复

1,430 次查看
stanish
NXP Employee
NXP Employee
Hello,

I'd suspect this might be the result of compiler code optimization. Is the second variable used by the function? You can try to add "volatile" modifier to the definition of the local variable.

Stanish

0 项奖励
回复