AnsweredAssumed Answered

Allocating in Flash [SOLVED]

Question asked by Luiz Carlos Stevanatto on May 2, 2014
Latest reply on May 6, 2014 by Luiz Carlos Stevanatto

Hi, I have a CW 5.9.0 to compile PPC MPC5633M.

Some problem with fixed variable allocation. I have a program that run in RAM target but doesn't run in FLASH taget. What am I wrong ?

The code:

#pragma push #pragma section ".myFlash" ".myFlash" __declspec(section ".myFlash") const int var1[1]; #pragma pop  int main(void) {     int var2 = var1[0];     while(1); } 

In my .lcf  I inserted

my_flash: org = 0x00100000, len = 0x00080000 

and

GROUP : {     .myFlash : {} } > my_flash 

Then I get a exception while run the program and processor does not reach main() .

Outcomes