各位大侠,你们好!
今天用汇编写一个GPIO的程序段(不折不扣的菜鸟),可是编译有错误,不知问题出在什么地方,望指教!
硬件:LPC2103
编译软件:Keil MDK
错误提示:
Build target 'Target 1'
assembling 01GPIO.s...
linking...
01GPIO.sct(7): error: L6236E: No section matches selector - no section to be FIRST/LAST.
"01GPIO.axf" - 1 Error(s), 0 Warning(s).
程序如下:
PINSEL0 EQU 0xE002C000
IOCLR EQU 0xE002800C
IODIR EQU 0xE0028008
IOPIN EQU 0xE0028000
IOSET EQU 0xE0028004
AREA GPIO,CODE,READONLY
ENTRY
CODE32
START LDR R0,=PINSEL0 ; 装载寄存器地址,PINSEL0
MOV R1,#0xFFFFFF3F
STR R1,[R0]
LDR R0,=IODIR
MOV R1,#0x00000008
STR R1,[R0]
LDR R0,=IOCLR
MOV R1,#0x00000008
STR R1,[R0]
END |