64-bit Global Variable Memory Issue

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

64-bit Global Variable Memory Issue

905 Views
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 Kudos
3 Replies

884 Views
davidtosenovjan
NXP TechSupport
NXP TechSupport

Could you please specify used compiler?

0 Kudos

879 Views
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 Kudos

812 Views
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 Kudos