|
本帖最后由 albert 于 2012-11-29 17:05 编辑
提示如下:
下载属性:
文件大小 : 184 (0MB)
起始地址 : 0x30000000
结束地址 : 0x300000b8
开始下载...
下载完成
Length of file is too big : -1785358965 > 63561596
## Starting application at 0x95959595 ...
undefined instruction
pc : [<95959598>] lr : [<33d0c0c4>]
sp : 33cbd728 ip : ffffffff fp : 33cbd993
r10: 33cbd893 r9 : 00000000 r8 : 33cbffdc
r7 : 33cbd993 r6 : 00000002 r5 : 33cbd848 r4 : 95959595
r3 : 00000002 r2 : 50000000 r1 : 33cbd848 r0 : 00000001
Flags: nZCv IRQs on FIQs off Mode SVC_32
Resetting CPU ...
*** Warning - bad CRC or NAND, using default environment
代码:head.S
.text
.global _start
_start:
ldr r0 , =0x53000000
mov r1 , #0
str r1 , [r0]
ldr sp , =1024*4
bl main
halt_loop:
b halt_loop
代码 leds.c
#define GPBCON (*(volatile unsigned long *)0x56000010)
#define GPBDAT (*(volatile unsigned long *)0x56000014)
#define GPB5_out (1<<(5*2))
#define GPB6_out (1<<(6*2))
#define GPB7_out (1<<(7*2))
#define GPB8_out (1<<(8*2))
void wait(volatile unsigned long dly)
{
for(; dly > 0; dly--);
}
int main(void)
{
unsigned long i = 0;
GPBCON = GPB5_out|GPB6_out|GPB7_out|GPB8_out; // 将LED1-3对应的GPF4/5/6三个引脚设为输出
while(1){
wait(30000);
GPBDAT = (~(i<<4)); // 根据i的值,点亮LED1-3
if(++i == 8)
i = 0;
}
return 0;
}
难道是编译器的问题?我的开发板是TQ2440,编译器为版本3.4.5 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|