JLINK+ADS+mini2440配置
JLINK+ADS+mini2440配置
////配置J-Link為mini2440燒寫bootloader
使用ADS1.2的時(shí)候進(jìn)入AXD調(diào)試環(huán)境回出現(xiàn)“ the session file could not be loaded”
解決方案:1:將工程文件放在不包含中文路徑的目錄下。
2:設(shè)置AXD->confing Interface 中g(shù)eneral中的save and load default session前面的選項(xiàng)去掉。
一:在AXD->options ->configure interface 中的session file 中載入初始化文件,具體內(nèi)如如下:
Setmem 0x53000000 0x00000000 32
Setmem 0x4A000008 0xFFFFFFFF 32
Setmem 0x4A00001C 0x000007FF 32
Setmem 0x53000000 0x00000000 32
Setmem 0x56000050 0x000055AA 32
Setmem 0x4C000014 0x00000007 32
Setmem 0x4C000000 0x00FFFFFF 32
Setmem 0x4C000004 0x00061012 32
Setmem 0x4C000008 0x00040042 32
Setmem 0x48000000 0x22111120 32
Setmem 0x48000004 0x00002F50 32
Setmem 0x48000008 0x00000700 32
Setmem 0x4800000C 0x00000700 32
Setmem 0x48000010 0x00000700 32
Setmem 0x48000014 0x00000700 32
Setmem 0x48000018 0x0007FFFC 32
Setmem 0x4800001C 0x00018005 32
Setmem 0x48000020 0x00018005 32
Setmem 0x48000024 0x008E0459 32
Setmem 0x48000028 0x00000032 32
Setmem 0x4800002C 0x00000030 32
Setmem 0x48000030 0x00000030 32
二:在AXD --〉options -〉configurate processor 把semihosting上的選項(xiàng)去掉 點(diǎn)擊clear all.
三:第一次使用ADS時(shí)需要在AXD中配置J-LINK,在AXD>OPTION>CONFIGURE TARGET里選擇J-LING的安裝目錄下的JLinkRDI.dll,然后點(diǎn)擊CONFIGURE配置,將芯片的復(fù)位時(shí)間選為2000ms即可正常調(diào)試.
#########################################################################
配置J-Link為mini2440燒寫bootloader
用J-Link其實(shí)不配置也能燒,只不過(guò)速度超慢
因?yàn)樯?,因?yàn)椴皇窃诎遄拥膬?nèi)存里運(yùn)行的。
初學(xué)者可能不會(huì)配置J-Flash,可以參考我的配置文件(慎用,燒BIOS容易出問(wèn)題)。
【DownUrl】 J-Link燒寫mini2440 BIOS配置文件
-----------------------------------------------------------------------------------------------------------------
自己配置的話,基本配置如下,主要是要參考光盤里帶的init script,自己填入初始化選項(xiàng)中。
配置的主要過(guò)程如下:
菜單:[Options]-->[option settings]
1. Gneral : Connectioin to J-link --> USB : Device 0
2. Target Interface : 保持默認(rèn)設(shè)置,不用動(dòng)
3. CPU :
Core --> Auto, Little endian
Use target RAM(faster)-->Addr:40000000 64KB(主要是這個(gè),不用的話就太慢了)
初始化序列(Init sequence)按下面的填,也是從H-Jtag的script扒出來(lái)的,我簡(jiǎn)單做了下注釋。
##-------Action-----Value0------Value1
Setmem 32-Bit 0x53000000 0x00000000 ; pWTCON , 看門狗定時(shí)器控制寄存器
Setmem 32-Bit 0x4A000008 0xFFFFFFFF ; INTMSK , 中斷屏蔽寄存器
Setmem 32-Bit 0x4A00001C 0x000007FF ; INTSUBMSK , 針對(duì)INTMAK具體化的一個(gè)中斷請(qǐng)求屏蔽寄存器
Setmem 32-Bit 0x53000000 0x00000000 ; pWTCON , 看門狗定時(shí)器控制寄存器
Setmem 32-Bit 0x56000050 0x000055AA ; rGPFCON , Port F control
Setmem 32-Bit 0x4C000014 0x00000007 ; CLKDIVN , CPU時(shí)鐘分頻控制寄存器
Setmem 32-Bit 0x4C000000 0x00FFFFFF ; LOCKTIME , 鎖時(shí)計(jì)數(shù)寄存器
Setmem 32-Bit 0x4C000004 0x00061012 ; MPLLCON , MPLL寄存器
Setmem 32-Bit 0x4C000008 0x00040042 ; UPLLCON , UPLL寄存器
Setmem 32-Bit 0x48000000 0x22111120 ; Bus width & wait status
Setmem 32-Bit 0x48000004 0x00002F50 ; Boot ROM control
Setmem 32-Bit 0x48000008 0x00000700 ; BANK1 control
Setmem 32-Bit 0x4800000C 0x00000700 ; BANK2 control
Setmem 32-Bit 0x48000010 0x00000700 ; BANK3 control
Setmem 32-Bit 0x48000014 0x00000700 ; BANK4 control
Setmem 32-Bit 0x48000018 0x0007FFFC ; BANK5 control
Setmem 32-Bit 0x4800001C 0x00018005 ; BANK6 control
Setmem 32-Bit 0x48000020 0x00018005 ; BANK7 control
Setmem 32-Bit 0x48000024 0x008E0459 ; DRAM/SDRAM refresh
Setmem 32-Bit 0x48000028 0x00000032 ; Flexible Bank Size
Setmem 32-Bit 0x4800002C 0x00000030 ; Mode register set for SDRAM
Setmem 32-Bit 0x48000030 0x00000030 ; Mode register set for SDRAM
4. Flash
取消"Automatically detect flash memory",然后"Select Flash Device"。
mini2440的Flash型號(hào)是:SST39VF1601,選中之后不要改寫任何數(shù)值。
5. Production
Erase, Program and Verify enable.