64-bit Global Variable Memory Issue

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

64-bit Global Variable Memory Issue

3,772 次查看
ISLEMTRIKII
Contributor II

In my application, I needed to extend a global variable from 32 bits to 64 bits using MPC5644A.

unsigned long long extendedVar1 = 0x0ULL;

void function (unsigned long long var2 )

{

extendedVar1 |= var2;

}

The program builds every time, but sometimes it  fails to be flashed to the ecu, the flash memory is not fully used, but still this problem occurs when it's extended to 64 bits.

I tried an absolute addressing for this variable at the end of the flash and everything went well.

 

please find attached 2 screenshots from the memory allocations logs:

1- Problem has been solved with absolute memory allocation (mem.txt)

2- The same globale variable declared with no absolute memory allocation. (mem.txt)

 

Thank you!

0 项奖励
回复
3 回复数

3,750 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you please specify used compiler?

0 项奖励
回复

3,745 次查看
ISLEMTRIKII
Contributor II

it's a : gcc (x86_64-posix-seh-rev0, Built by MinGW-W64 project) 8.1.0

  Thanks for your quick response!

0 项奖励
回复

3,678 次查看
davidtosenovjan
NXP TechSupport
NXP TechSupport

I see but it is not NXP software. It should discuss it is over particular provider's communities or other forums. Thanks for understanding

0 项奖励
回复