|
在lumit的网站上下载的ADS1.2,新建了一个工程,包括了两个文件,一个Init.s,一个main.c,但是编译的时候提示我Init.s文件有错误,不知道为什么,大家帮我看看
Init.s
[code:1]
IMPORT Main
AREA Init,CODE,READONLY
ENTRY
LDR R0, =0x3FF0000
LDR R1, =0xE7FFFF80
STR R1, [R0]
LDR SP, =0x3FE1000
BL Main
B .
END
[/code:1]
main.c
[code:1]
#define IOPMOD (*(volatile unsigned *)0x03FF5000)
#define IOPDATA (*(volatile unsigned *)0x03FF5008)
void Delay(unsigned int);
int Main()
{
unsigned long LED;
IOPMOD = 0xFFFFFFFF;
IOPDATA = 0x01;
while(1)
{
LED = IOPMOD;
LED = (LED<<1);
IOPDATA = LED;
Delay(10);
if(!(IOPDATA & 0x0F))
IOPDATA = 0x01;
}
return(0);
}
void Delay(unsigned int x)
{
unsigned int i, j, k;
for(i=0; i<x; i++)
for(j=0; j<0xFF; j++)
for(k=0; k<0xFF; k++)
;
}
[/code:1]
提示的错误是:
Error:All63E: Unknow opcode Init.s line 1
1 00000000 IMPORT Main
Error:All63E: Unknow opcode Init.s line 2
2 00000000 AREA Init,CODE,READONLY
ErrorFatal)Al355U: A Label was found which was in no Init.s line 3
3 00000000 ENTRY
3 Errors, 0 Warnings
谢谢了 |
|