使用TQ2440开发板跑裸机程序没反应,新手求救!
时间:10-02
整理:3721RD
点击:
按照韦东山老师的教程,写了一个裸机程序led_on.S:
.text
.global _start
_start:
ldr r0, =0x56000010
mov r1, #0x00000400
str r1, [r0]
ldr r0, =0x56000014
mov r1, #0
str r1, [r0]
halt_loop:
b halt_loop
Makefile:
led_on.bin : crt0.S
arm-linux-gcc $(CFLAGS) -c -o crt0.o crt0.S
arm-linux-ld -Ttext 0x00000000 crt0.o -o leds_elf
arm-linux-objcopy -O binary -S leds_elf led_on.bin
arm-linux-objdump -D -m arm leds_elf > led_on.dis
clean:
rm -f led_on.dis led_on.bin leds_elf *.o
写进tq2440开发板发现:
Length of file is too big : -84215056 > 63561596
NAND erase: device 0 offset 0x0, size 0x40000
Erasing at 0x20000 -- 100% complete.
OK
NAND write: device 0 offset 0x0, size 0x0
led点亮不了,感觉好失败。求各位高手赐教!
.text
.global _start
_start:
ldr r0, =0x56000010
mov r1, #0x00000400
str r1, [r0]
ldr r0, =0x56000014
mov r1, #0
str r1, [r0]
halt_loop:
b halt_loop
Makefile:
led_on.bin : crt0.S
arm-linux-gcc $(CFLAGS) -c -o crt0.o crt0.S
arm-linux-ld -Ttext 0x00000000 crt0.o -o leds_elf
arm-linux-objcopy -O binary -S leds_elf led_on.bin
arm-linux-objdump -D -m arm leds_elf > led_on.dis
clean:
rm -f led_on.dis led_on.bin leds_elf *.o
写进tq2440开发板发现:
Length of file is too big : -84215056 > 63561596
NAND erase: device 0 offset 0x0, size 0x40000
Erasing at 0x20000 -- 100% complete.
OK
NAND write: device 0 offset 0x0, size 0x0
led点亮不了,感觉好失败。求各位高手赐教!
...还是不行啊!
哥们你是怎么下的程序呢?按照TQ的方法下的程序吗?
norflash的U-BOOT下载的,下载到nandflash和SDRAM都试过不行,下载官方的测试程序有效,为什么我的不行呢?
我的测试成功了,烧到nand的0地址,然后从nand启动就可以了:
烧写步骤如下:
tftp 31000000 led_on.bin
nand erase 0 1000
nand write 31000000 0 1000