|
|
TQ2440从Norflash启动,菜单如下
##### EmbedSky BIOS for SKY2440/TQ2440 #####
Press Space key to Download Mode !
##### Boot for Nor Flash Main Menu #####
##### EmbedSky USB download mode #####
[1] Download u-boot or STEPLDR.nb1 or other bootloader to Nand Flash
[2] Download Eboot (eboot.nb0) to Nand Flash
[3] Download Linux Kernel (zImage.bin) to Nand Flash
[5] Download CRAMFS image to Nand Flash
[6] Download YAFFS image (root.bin) to Nand Flash
[7] Download Program (uCOS-II or TQ2440_Test) to SDRAM and Run it
[8] Boot the system
[9] Format the Nand Flash
[0] Set the boot parameters
[a] Download User Program (eg: uCOS-II or TQ2440_Test)
[b] Download LOGO Picture (.bin) to Nand Flash
[l] Set LCD Parameters
[n] Enter TFTP download mode menu
[o] Download u-boot to Nor Flash
[r] Reboot u-boot
[t] Test Linux Image (zImage)
[q] quit from menu
Enter your selection:
选择a,将自己写的程序利用Uboot烧尽nandflash,断电,开关拨到从Nandflash启动,上电,LED没亮,久思不得其解,代码如下:
.text
.global _start
_start:
LDR R0,=0x56000010
LDR R1,=0x00015400
STR R1,[R0]
LDR R0,=0x56000014
LDR R1,=0x000000E0
STR R1,[R0]
loop:
B loop
链接脚本如下:
led.bin : led.s
arm-linux-gcc -g -c -o led.o led.s
arm-linux-ld -Ttext 0x0000000 -g led.o -o led_elf
arm-linux-objcopy -O binary -S led_elf led.bin
clean:
rm -f led_on.bin led_on_elf *.o
编译之后通过Jlink烧写到norflash之后,程序运行正常,通过Uboot烧尽nandflash就无法运行
求大神指导,感激不尽!!! |
|