我用的是ARM11的板子,我用RVDS写了一段裸板的LED全亮的程序,最后编译时出错,求大神指教。启动代码和C函数都是我自己写的
启动代码:
IMPORT main
AREA Example,CODE,READWRITE
ENTRY
CODE32
START
ldr r0,=0x70000000
orr r0,r0,#0x13
mcr p15,0,r0,c15,c2,4
ldr r0,=0x7E004000
mov r1,#0
str r1,[r0]
ldr sp, =8*1024
bl main
halt b halt
END
C函数:
int main(void)
{
volatile unsigned long *gpkcon0 = (volatile unsigned long*)0x7F008800;
volatile unsigned long *gpkdat = (volatile unsigned long*)0x7F008808;
*gpkcon0 = (*gpkcon0 & 0xffff) | 0x11110000;
while(1)
{
*gpkdat = *gpkdat | 0x0111;
}
}
最后编译时出这个错,不知道为什么。是不是我代码有问题,还是进行链接配置时,没配置对?
错误:
Error:object file for file:one led .o could not be retrieved.Recompile file |