使用J-Link烧写bin文件到Mini2440的NOR flash
一. J-Link和配置文件
二. 手动配置
如果不想使用mini2440.jflash,可以自己手动配置
- 打开J-Flash ARM,并进入菜单:
Options
-Project settings
- CPU选项
Core
:ARM9
,Little endian
Use target RAM(faster)
:Addr:40000000 4KB
(不选很慢,从Nor flash启动时内部Boot SRAM的地址和大小,参考S3C2440A的芯片手册)
Use following init sequence
:
0) Halt
1) Disable MMU
2) Write 32bit 0x53000000 0x00000000 ; pWTCON , 看门狗定时器控制寄存器
3) Write 32bit 0x4A000008 0xFFFFFFFF ; INTMSK , 中断屏蔽寄存器
4) Write 32bit 0x4A00001C 0x000007FF ; INTSUBMSK , 针对INTMAK具体化的一个中断请求屏蔽寄存器
5) Write 32bit 0x53000000 0x00000000 ; pWTCON , 看门狗定时器控制寄存器
6) Write 32bit 0x56000050 0x000055AA ; rGPFCON , Port F control
7) Write 32bit 0x4C000014 0x00000007 ; CLKDIVN , CPU时钟分频控制寄存器
8) Write 32bit 0x4C000000 0x00FFFFFF ; LOCKTIME , 锁时计数寄存器
9) Write 32bit 0x4C000004 0x00061012 ; MPLLCON , MPLL寄存器
10) Write 32bit 0x4C000008 0x00040042 ; UPLLCON , UPLL寄存器
11) Write 32bit 0x48000000 0x22111120 ; Bus width & wait status
12) Write 32bit 0x48000004 0x00002F50 ; Boot ROM control
13) Write 32bit 0x48000008 0x00000700 ; BANK1 control
14) Write 32bit 0x4800000C 0x00000700 ; BANK2 control
15) Write 32bit 0x48000010 0x00000700 ; BANK3 control
16) Write 32bit 0x48000014 0x00000700 ; BANK4 control
17) Write 32bit 0x48000018 0x0007FFFC ; BANK5 control
18) Write 32bit 0x4800001C 0x00018005 ; BANK6 control
19) Write 32bit 0x48000020 0x00018005 ; BANK7 control
20) Write 32bit 0x48000024 0x008E0459 ; DRAM/SDRAM refresh
21) Write 32bit 0x48000028 0x00000032 ; Flexible Bank Size
22) Write 32bit 0x4800002C 0x00000030 ; Mode register set for SDRAM
23) Write 32bit 0x48000030 0x00000030 ; Mode register set for SDRAM
- Flash选项
取消Automatically detect flash memory
,然后Select Flash Device
Mini2440的Flash型号是:Am29LV160DB
或SST39VF1601
三. 烧写bin文件
File
-Open data file
打开.bin,也可以直接拖进程序Target
-Connect
连接芯片Target
-Erase chip
擦除FlashTarget
-Program
烧写.bin文件