S3C6410 led 裸机程序用rvd2.2 无法编译 帮忙看一下本帖最后由 zzfzzf68 于 2012-11-20 14:34:04 编辑这是
S3C6410 led 裸机程序用rvd2.2 无法编译 帮忙看一下
本帖最后由 zzfzzf68 于 2012-11-20 14:34:04 编辑 这是初始化启动汇编代码:
IMPORT main
AREA Init,CODE,READONLY
ENTRY
LDRR0, =0x7E004000
LDRR1, =0x0
STRr1, [r0]
LDRSP,=0x0FFFFFFF
BLmain@ μ÷ó?C3ìDò?Dμ?mainoˉêy
B.
END
这是main函数:
#define rGPKCON0 (*(volatile unsigned *)(0x7F008800))//rGPKCON0
#define rGPKDATA (*(volatile unsigned *)(0x7F008808))//rGPKDATA
void Delay(unsigned int x)
{
unsigned int a,b,c;
for(a=0;a<x;a++)
for(b=0;b<0xff;b++)
for(c=0;c<0xff;c++);
}
int main()
{
rGPKCON0=0x11112222;
while(1)
{
rGPKDATA=0x0f;//è?áá
delay(10);
rGPKDATA=0xff;//è??e
delay(10);
}
return 0;
}
错误:
Warning : #223-D: function declared implicitly
main.c line 16 delay(10);
Warning : #111-D: statement is unreachable
main.c line 20 return 0;
Warning : #1-D: last line of file ends without a newline
main.c line 21 }
compiler : D:\tiny6410\1ú??Tiny641012?í°?-DISC4\??3ì3£¨ARM?μí3???×°à£?\μú3ì죨LED?y?ˉ3ìDòéè??£?\led_zzf\main.c: 3 warnings, 0 errors
Error : A1163: Unknown opcode main , expecting opcode or Macro
startup.s line 1 IMPORT main
armasm : 1 00000000 IMPORT main
Error : A1163: Unknown opcode Init,CODE,READONLY , expecting opcode or Macro
startup.s line 2 AREA Init,CODE,READONLY
armasm : 2 00000000 AREA Init,CODE,READONLY
Error : A1355: A Label was found which was in no AREA
startup.s line 3
armasm : 3 00000000 ENTRY
armasm : 3 Errors, 0 Warnings
Error : armasm Compile exit status = 2
帮忙看一下,我是初学者,其多多赐教!!谢谢啦!
[解决办法]你的RVDS破解好了吗?
试试别人的程序,看看会不会编译错误!