普通应用程序的全速运行方法
可以在程序中设置打印信息,来调试
用户程序编译好后可以用tftp下传到jupiter开发板上的/bin目录中,然后执行程序
按照开发板的使用方法,下载uclinux和rdgz,运行boot,然后再进入/bin目录
After booting uclinux, which refers to "how to use dev board",
Use tftp to transfer hello to jupiter board.
=====================================================
/bin> tftp 192.168.10.2
//pc机的地址是192.168.10.2
tftp> binary
//使用二进制方式
tftp> get hello
//下载文件
Received 17976 bytes in 0.1 seconds
tftp> q
//退出
/bin>chmod 755 hello
//改成可执行的模式
/bin> ls -l
-rwxr--r-- 1 0 0 47348 Dec 15 2002 arp
-rwxr--r-- 1 0 0 66100 Apr 22 2003 boa
-rwxr--r-- 1 0 0 14968 Dec 25 2002 cli
-rwxr-xr-x 1 0 0 17976 Jan 1 00:40 hello
-rwxr--r-- 1 0 0 48252 Dec 15 2002 ifconfig
-rwxr--r-- 1 0 0 24524 Apr 22 2003 inetd
-rwxr--r-- 1 0 0 122224 Apr 4 2003 iptables
-rwxr--r-- 1 0 0 35464 Feb 5 2003 mkfs.jffs
-rwxr--r-- 1 0 0 42304 Dec 27 2002 ping
-rwxr--r-- 1 0 0 49904 Dec 15 2002 route
-rwxr--r-- 1 0 0 55252 Dec 14 2002 sash
-rwxr--r-- 1 0 0 14776 Dec 27 2002 serv
lrwxrwxrwx 1 0 0 4 Mar 8 2003 sh -> sash
-rwxr--r-- 1 0 0 13844 Dec 18 2002 sig
-rwxr--r-- 1 0 0 91320 Apr 22 2003 telnet
-rwxr--r-- 1 0 0 34928 Apr 22 2003 telnetd
-rwxr--r-- 1 0 0 36600 Feb 14 2003 tftp
-rwxr--r-- 1 0 0 38124 Apr 3 2003 udhcpc
-rwxr--r-- 1 0 0 44204 Apr 15 2003 udhcpd
/bin> hello
//全速执行
LED toggle! q-- exit,1-- led on, 2-- led off
Hello uClinux World!
mysh> 1
1mysh> 2
2mysh> 1
1mysh> 2
2mysh> 1
1mysh> q
q/bin>
================================end=====================
And you will see the led on and off. ^O^
注意:该方法没有修改rdgz文件,只是用tftp下传一个程序来全速执行。这是一中很方便的调试方法。
如果要把用户程序加入rdgz中,请参考应用程序的编程 和ramdisk的制作方法
单步仿真方法: //很少用

When debugging
1. when using Jupiter board, under "jupiter/monitor" directory
" rommonitor.bin" file must be writtin to the EPROM
2. In VIDE program, select "Tools-> SDownload" menu.
and then
1) Reset the board
2) At "Serial Download" program push the "connect" button.
3) After push "browser" button, select the "linux.bin" file under "uClinux-2.4.x/" directory
4) On area "Download at 0x" write the address "0xc200000".
and push the "Download at target" button
5) when completed, retry to push the "connect"
6) retry to push "browser" and then select the "rdgz.bin" file under "uClinux-2.4.x/" directory
7) write the address "0xc500000" at the "Download at" and then push "Download at target"
In dialog box "Download Finish", push the "cancel"
8) execute the "cygwin", move to "uClinux-2.4.x" directory and then type the "ddd" command
"ddd" is the script
( se3208-elf-gdb -x gdbinit linux)
详见E:\Jupiter\uclinux\debug-sample.doc