ARM executable image file

Publisher:温馨时光Latest update time:2016-08-01 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Use ADS to compile and generate .axf file, and use ARM fromELF to extract executable file .bin------>can be directly written into Flash:

The structure of bin file is RO+RW+ZI, where the address in RO is the same as the address of the symbol, but RW and ZI are different, so RW and ZI must be moved to the actual address before using them. You can refer to the source code of 44binit.s:

      ;****************************************************** *******
      ;* Copy and paste RW data/zero initialized data *
      ;****************************** ****************************
      LDR r0, =|Image

RO
Limit| ; Get pointer to ROM data
      LDR r1, =|Image
R W
Base| ; and RAM copy
      LDR r3, =|Image
ZI
Base| 
;Zero init base => top of initialised data
   
      CMP r0, r1 ; Check that they are different, determine if RW needs to be moved
      BEQ %F1
0  
      CMP r1, r3 ; Copy init data
      LDRCC r2, [r0], #4 ;--> LDRCC r2, [r0] + ADD r0, r0, #4   
      STRCC r2, [r1], #4 ;--> STRCC r2, [r1] + ADD r1, r1, #4
      BCC %B0
1  
      LDR r1, =|Image
ZI
Limit| ; Top of zero init segment
      MOV r2, #0
2  
      CMP r3, r1 ; Zero init
      STRCC r2, [r3], #4
      BCC %B2

 

All ARM source code must be run before using the RW and ZI domains 

Keywords:ARM Reference address:ARM executable image file

Previous article:ARM instruction set - coprocessor instructions
Next article:ARM instruction addressing problem

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号