Arm:jlink Debug and direct burn-write operation different [MDK s3c2440]

Source: Internet
Author: User
Tags jlink

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]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.