Notes for writing arm Assembler

Source: Internet
Author: User

09:54:32

Just now, I added an assembly macro to nboot, resulting in a large area of error. As follows:

; Turn on all LEDs.
Macro
Pled_on $ data

LDR r0, = gpfcon
LDR R1, = 0x55aa
STR R1, [R0]
LDR r0, = gpfup
LDR R1, = 0xff
STR R1, [R0]
LDR r0, = gpfdat
LDR R1, = $ data
STR R1, [R0]
B.; programme is dead here

Mend

 

Build: [01: 0000000025: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (75): Error a0051: Unknown opcode: pled_on
Build: [01: 0000000027: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (77): Error a0064: code inside Data Section
Build: [01: 0000000029: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (78): Error a0064: code inside Data Section
Build: [01: 0000000031: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (79): Error a0064: code inside Data Section
Build: [01: 0000000033: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (80): Error a0064: code inside Data Section
Build: [01: 0000000035: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (81): Error a0064: code inside Data Section
Build: [01: 0000000037: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (82): Error a0064: code inside Data Section
Build: [01: 0000000039: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (83): Error a0064: code inside Data Section
Build: [01: 0000000041: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (84): Error a0064: code inside Data Section
Build: [01: 0000000043: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (84): Error a0017: Illegal $ substitution, non assembler variable
Build: [01: 0000000045: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (84): Error a0227: syntax error in Expression
Build: [01: 0000000047: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (85): Error a0064: code inside Data Section
Build: [01: 0000000049: errore] C:/wince500/platform/smdk2440a/src/bootloader/stepldr/startup. S (86): Error a0064: code inside Data Section

 

Later I found that it was a problem caused by macro freezing. Just indent it.

; Turn on all LEDs.
Macro
Pled_on $ data

LDR r0, = gpfcon
LDR R1, = 0x55aa
STR R1, [R0]
LDR r0, = gpfup
LDR R1, = 0xff
STR R1, [R0]
LDR r0, = gpfdat
LDR R1, = $ data
STR R1, [R0]
B.; programme is dead here

Mend

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.