1, the initialization of global variables.
2. Cases not found yet.
/*************************************************/
First on connection file SCT
Lr_rom1 0x30000000 0x00010000 { ; Load Region size_region Er_rom1 0x30000000 0x00010000 { ; Load address = execution Address *.o (RESET, +first) * (inroot$ $Sections) . Any (+ro) } rw_ram1 0x30010000 0x02000000 { ; RW Data . Any (+RW +zi) } rw_iram1 0x40000000 0x00001000 { . Any (+RW +zi) }}
1, the initialization of global variables.
The initialization of the initialized global variable is not MDK itself.
It can't be used.
Code:
intGr_a =1 ;intGr_b;intConst GR_C = One;Staticintgr_s = A;void Variable_Test () {uart_printf ("int gr_a = 1; gr_a =%d\n", gr_a);uart_printf ("int gr_b; gr_b =%d\n", gr_a);uart_printf ("int const gr_c; gr_c =%d\n", Gr_c);uart_printf ("static int gr_s; gr_s =%d\n", gr_s);uart_printf ("&gr_a =%08x\n", &gr_a);uart_printf ("&gr_b =%08x\n", &gr_b);uart_printf ("&gr_c =%08x\n", &gr_c);uart_printf ("&gr_s =%08x\n", &gr_s);}
Jlink run-time phenomenon (not always different, specific reasons can not be found):
int gr_a = 1; gr_a = 0int gr_b; gr_b = 0int Const gr_c; gr_c = 11static int gr_s; gr_s = 0 &gr_a = 30010038 &gr_b = 30010064 &gr_c = 30009244//.ro &gr_s = 3001003c
Burn Write run-time behavior: Initialized global and static variables are set to ~0.
int gr_a = 1; gr_a = 1 &gr_a = 30010038 &gr_b = 30010064 &gr_c = 30009244 &gr_s = 3001003c
Arm:jlink Debug and direct burn-write operation different [MDK s3c2440]