片内SRAM运行程序:
原理:通过nor flash 启动开发板后 +dnw 下载程序到nand flash 然后开发板重启,nand flash启动 观察效果
部分电脑dnw不能运行,不过还可以通过tftp nfs 来下载 不过原理一样 都是先下之内存,然后写之nand flash (聪明的你,还会发现dnw usb下载有个内存地址可设置)
说明:
linux 192.168.1.200
win 192.168.1.100
mini2440 192.168.1.201
通过tftp方式(网线插上)
首先linux [root@localhost ti]# ifconfigeth0 Link encap:Ethernet HWaddr 00:0C:29:0B:B7:52inet addr:192.168.1.200 Bcast:192.168.1.255 Mask:255.255.255.0inet6 addr: fe80::20c:29ff:fe0b:b752/64 Scope:LinkUP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1RX packets:3685728 errors:0 dropped:0 overruns:0 frame:0TX packets:5538158 errors:0 dropped:0 overruns:0 carrier:0collisions:0 txqueuelen:1000RX bytes:1126873419 (1.0 GiB) TX bytes:4264312441 (3.9 GiB)Interrupt:193 Base address:0x2024我借助linux的tftp服务器(windows上的也可以的)开启tftp服务后:[root@localhost ti]# netstat -a |grep tftpudp 0 0 *:tftp *:*我已将裸机例子的gpio的leds.bin cp 之tftp服务的目录下
[root@localhost leds]# ls /tftpboot/leds.bin -l-rwxr-xr-x 1 root root 136 10-24 21:38 /tftpboot/leds.bin
开发板启动后uboot界面:
##### 100ask Bootloader for OpenJTAG #####[n] Download u-boot to Nand Flash[o] Download u-boot to Nor Flash[k] Download Linux kernel uImage[j] Download root_jffs2 image[y] Download root_yaffs image[d] Download to SDRAM & Run[z] Download zImage into RAM[g] Boot linux from RAM[f] Format the Nand Flash[s] Set the boot parameters[b] Boot the system[r] Reboot u-boot[q] Quit from menuEnter your selection:按q进入
Environment size: 317/131068 bytesOpenJTAG> setenv serverip 192.168.1.200OpenJTAG> setenv ipaddr 192.168.1.201OpenJTAG> saveenvSaving Environment to NAND...Erasing Nand...Writing to Nand... doneOpenJTAG> ping 192.168.1.200dm9000 i/o: 0x20000000, id: 0x90000a46DM9000: running in 16 bit modeMAC: 08:00:3e:26:0a:5bcould not establish linkhost 192.168.1.200 is alive已通(别网线没插,一直在ping)
OpenJTAG> tftp 30000000 leds.bindm9000 i/o: 0x20000000, id: 0x90000a46DM9000: running in 16 bit modeMAC: 08:00:3e:26:0a:5bcould not establish linkTFTP from server 192.168.1.200; our IP address is 192.168.1.201Filename 'leds.bin'.Load address: 0x30000000Loading: #doneBytes transferred = 136 (88 hex)下载完毕,(别tftp服务没开启,一直在下载)
OpenJTAG> nand write 30000000 0 40000NAND write: device 0 offset 0x0, size 0x40000262144 bytes written: OK
写nand flash
开发板重启,nand flash启动
2 nfs方式开启nfs服务[root@localhost speaker_on]# netstat -a |grep nfstcp 0 0 *:nfs *:* LISTENudp 0 0 *:nfs *:*nfs 配置
more /etc/exports
/ *(rw,sync,no_root_squash)
uboot启动后OpenJTAG> nfs 30000000 192.168.1.200:/speaker_on.bin下载之内存,后面就跟tftp一样了