按照韦东山老师的教程,写了一个裸机程序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点亮不了,感觉好失败。。。。。。。。。。求各位高手赐教!!
烧写步骤如下:
tftp 31000000 led_on.bin
nand erase 0 1000
nand write 31000000 0 1000
一周热门 更多>