简单启动代码Startup.s程序如下: IMPORT |Image$$RO$$Limit| IMPORT |Image$$RW$$Base| IMPORT |Image$$ZI$$Base| IMPORT |Image$$ZI$$Limit|
IMPORT Main
AREA Start,CODE,READONLY ENTRY CODE32 Reset LDR SP, =0x40003F00 LDR R0, =|Image$$RO$$Limit| LDR R1, =|Image$$RW$$Base| LDR R3, =|Image$$ZI$$Base| CMP R0,R1 BEQ LOOP1 LOOP0 CMP R1,R3 LDRCC R2, [R0],#4 STRCC R2, [R1],#4 BCC LOOP0 LOOP1 LDR R1,=|Image$$ZI$$Limit| MOV R2,#0 LOOP2 CMP R3,R1 STRCC R2,[R3],#4 BCC LOOP2 B Main END
C程序如下: #define uint8 unsigned char #define uint32 unsigned int
#define N 100
uint32 sum;
void Main(void) { uint32 i; sum = i; for (i=0;i<N;i++) { sum += i; } while (1); }
设置都是按书上设置好的。编译后怎么出现这样问题呢?(未知代码IMPORT) Error : A1163E: Unknown opcode Startup.S line 5
5 00000000 IMPORT |Image$$RO$$Limit|
Error : A1163E: Unknown opcode Startup.S line 6
6 00000000 IMPORT |Image$$RW$$Base|
Error : A1163E: Unknown opcode Startup.S line 7
7 00000000 IMPORT |Image$$ZI$$Base|
Error : A1163E: Unknown opcode Startup.S line 8
8 00000000 IMPORT |Image$$ZI$$Limit|
Error : A1163E: Unknown opcode Startup.S line 10
10 00000000 IMPORT Main
5 Errors, 0 Warnings 谁知道问题在哪?帮忙提示一下,谢谢!
|