MDK编译器报错
下面是代码head.s内容如下:IMPORTMainAREAInit,CODE,READONLYENTRY_startMOVsp,#0x33000000BMain;/*跳...
下面是代码
head.s内容如下:
IMPORT Main
AREA Init,CODE,READONLY
ENTRY
_start
MOV sp, #0x33000000
B Main ;/*跳转到C语言程序*/
END
main.c内容如下:
#define rWATCNT (*(volatile unsigned short int *)(0x53000008))
#define rWATCON (*(volatile unsigned int *)(0x53000000))
#define rWATDAT (*(volatile unsigned short int *)(0x53000004))
int Main()
{
rWATCON = 0x8039;
rWATCNT = 0x0800;
rWATDAT = 0x0800;
while(1)
{
// rWATCNT=0x0800;
}
return 0;
}
但是MDK报错
testled.s(1): error: A1163E: Unknown opcode Main , expecting opcode or Macro
Main.c(29): warning: #111-D: statement is unreachable
Main.c(31): warning: #1-D: last line of file ends without a newline 展开
head.s内容如下:
IMPORT Main
AREA Init,CODE,READONLY
ENTRY
_start
MOV sp, #0x33000000
B Main ;/*跳转到C语言程序*/
END
main.c内容如下:
#define rWATCNT (*(volatile unsigned short int *)(0x53000008))
#define rWATCON (*(volatile unsigned int *)(0x53000000))
#define rWATDAT (*(volatile unsigned short int *)(0x53000004))
int Main()
{
rWATCON = 0x8039;
rWATCNT = 0x0800;
rWATDAT = 0x0800;
while(1)
{
// rWATCNT=0x0800;
}
return 0;
}
但是MDK报错
testled.s(1): error: A1163E: Unknown opcode Main , expecting opcode or Macro
Main.c(29): warning: #111-D: statement is unreachable
Main.c(31): warning: #1-D: last line of file ends without a newline 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询