爱为所有 发表于 2014-7-26 21:03:43

keilMDK编译出现一大堆的错误

新手第一次用mdk,但出现了一大推的错误,不知道怎么解决,求大神帮忙解决下



这是我使用的程序:
#include<S3C2440.h>
void delay()
{
int i, j;
for(i = 0; i < 10000; i ++)
for(j = 0; j < 50; j ++);
}
int main()
{
GPBCON = 0x155555;//配置 protB 的所有引脚为输出
while(1)
{
//点亮第一个小灯
GPBDAT |= 0x1E0;
GPBDAT &= 0x1C0;
delay();
//点亮第二个小灯
GPBDAT |= 0x1E0;
GPBDAT &= 0x1A0;
delay();
//点亮第三个小灯
GPBDAT |= 0x1E0;
GPBDAT &= 0x160;
delay();
//点亮第四个小灯
GPBDAT |= 0x1E0;
GPBDAT &= 0x0E0;
delay();
}
return 0;
}


编译是出现的错误
Rebuild target 'Target 1'
assembling S3C2440.s...
compiling led.c...
led.c(30): warning:#111-D: statement is unreachable
led.c(31): warning:#1-D: last line of file ends without a newline
linking...
led.axf: Warning: L6373W: libattrs.map file not found in System Library directory C:\Program Files\ARM\ADSv1_2\LIB\armlib\. Library selection may be impaired.
led.axf: Error: L6242E: Cannot link object __main.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object stkheap2.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object kernel.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object libspace.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object exit.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object lib_init.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object sys_exit.o as its attributes are incompatible with the image attributes.
led.axf: Error: L6242E: Cannot link object use_semi.o as its attributes are incompatible with the image attributes.
Target not created

wbz073 发表于 2014-7-28 09:23:28

你应该是 Makefile除了问题
页: [1]
查看完整版本: keilMDK编译出现一大堆的错误