折騰了一晚上,在Linux下終于把S3C2440開發闆的LED燈給點亮了,興奮不已,于是著文以記之。
程式是韋東山老師編著的《嵌入式Linux應用開發完全手冊》,編譯源檔案照書上做就可以了,主要是在燒到開發闆上出了問題
使用Jflash-s3c2440軟體燒寫程式的時候出現了如下的問題:
使用Jflash-s3c2440軟體燒寫程式的時候出現了如下的問題:
[root@localhost for_linux]# ./Jflash-s3c2440 /work/hardware/led_on/led_on.bin /t=5
+------------------------------------+
| SEC JTAG FLASH for 2440+
| modified by Quasar 2003.9.22+
+------------------------------------+
> flashType=5
> S3C2440X(ID=0x0032409d) is detected.
[K9S1208 NAND Flash JTAG Programmer]
在晚上找到了一個OpenJTAG燒寫工具,搞定!
關于OpenJTAG燒寫工具,參見:
http://www.100ask.net/showtopic.aspx?page=end&topicid=2465#12537
OpenJTAG燒寫工具過程如下:
[root@localhost oflash]# ./oflash 1 2 0 0 0 led_on.bin
+---------------------------------------------------------+
| Flash Programmer v1.3 for OpenJTAG of www.100ask.net |
| OpenJTAG is a USB to JTAG & RS232 tool based FT2232 |
| This programmer supports both of S3C2410X & S3C2440 |
| Author: Email/MSN([email protected]), QQ(17653039) |
+---------------------------------------------------------+
Usage:
1. oflash, run with cfg.txt or prompt
2. oflash [file], write [file] to flash with prompt
3. oflash [-f config_file]
4. oflash [jtag_type] [cpu_type] [flash_type] [read_or_write] [offset] [file]
Select the JTAG type:
0. OpenJTAG
1. Dongle JTAG(parallel port)
Enter the number: 1
Select the CPU:
1. S3C2410X
2. S3C2440X
Enter the number: 2
S3C24X0 detected, cpuID = 0x0032409d
[Main Menu]
0:Nand Flash prog 1:Nor Flash prog 2:Memory Rd/Wr 3:Exit
Select the function to test:0
[NAND Flash JTAG Programmer]
Scan nand flash:
Device 0: NAND 128MiB 3,3V 8-bit, sector size 128 KiB
Total size: 128 MiB
0:Nand Flash Program 1:Nand Flash Print BlkPage 2:Exit
Select the function to test :0
[NAND Flash Writing Program]
Source size: 0x20
Available target block number: 0~1023
Input target block number:0
target start block number =0
target size (0x20000*1) =0x20000
STATUS:
Ep
備注:
windows xp安裝GIVEIO驅動的方法
1.将GIVEIO目錄下的GIVEIO.SYS檔案複制到C:\WINDOWS\system32\drivers目錄下面
2.打開控制台裡的新增硬體,選擇“是,我已經連接配接了此硬體”,下一步,選擇添加新的硬體裝置,下一步,選擇“安裝我手動從清單選擇的硬體”,下一步,選擇“端口(COM和LPT)”,下一步,選擇從磁盤安裝,在路徑中選擇 GIVEIO目錄下的giveio.inf檔案,然後一直下去就OK了。在裝置管理器的端口裡能看到GIVEIO端口,就表示安裝正常了。
參考自(http://old.techor.com/bbs/context.asp?id=105&listMethod=all)