引用 2 楼 mostmark 的回复:
JLINK 淘宝65,烧的刚刚的,就是多敲点命令,敲多了比较烦
买的是armjishu出的J-Link V8,官网下载了V4.14软件
使用自带的LPC2478_Olimex_LPC2478_STK.jflash project,在flash中增加片外flash SST39VF3201的配置脚本,
Setmem+32-Bit+0xFFE08220+0x00000081
Setmem+32-Bit+0xFFE08224+0x00000000
Setmem+32-Bit+0xFFE08228+0x00000000
Setmem+32-Bit+0xFFE0822C+0x0000000F
Setmem+32-Bit+0xFFE08230+0x0000001F
Setmem+32-Bit+0xFFE08234+0x00000002
Setmem+32-Bit+0xFFE08238+0x0000000F
但是提示检测不到CFI flash
JTAG speed: 4000 kHz (Fixed)
- CPU clock frequency: 57520 kHz (Auto detected)
- J-Link found 1 JTAG device. Core ID: 0x4F1F0F0F (ARM7)
- Reading CFI info ...
- Could not find CFI compliant flash device
- Detecting flash memory ...
- ERROR: Could not find any flash devices
- ERROR: Failed to connect
下面是配置脚本文件
AppVersion = 41403
[GENERAL]
ConnectMode = 0
CurrentFile = ""
DataFileSAddr = 0x00000000
GUIMode = 0
HostName = ""
TargetIF = 0
USBPort = 0
USBSerialNo = 0x00000000
[JTAG]
IRLen = 0
MultipleTargets = 0
NumDevices = 0
Speed0 = 100
Speed1 = 4000
TAP_Number = 0
UseAdaptive0 = 1
UseAdaptive1 = 0
UseMaxSpeed0 = 0
UseMaxSpeed1 = 0
[CPU]
CheckCoreID = 1
ChipName = "NXP LPC2478"
ClockSpeed = 0x03750280
Core = 0x070001FF
CoreID = 0x4F1F0F0F
DeviceFamily = 0x00000007
EndianMode = 0
HasInternalFlash = 1
InitStep0_Action = "Read 32bit"
InitStep0_Comment = ""
InitStep0_Value0 = 0xE01FC088
InitStep0_Value1 = 0x00000000
InitStep10_Action = "Write 32bit"
InitStep10_Comment = "PLLCFG: Setup M = 36 N = 1 -> 288 MHz PLL"
InitStep10_Value0 = 0xE01FC084
InitStep10_Value1 = 0x00000023
InitStep11_Action = "Write 32bit"
InitStep11_Comment = "PLL feed 1"
InitStep11_Value0 = 0xE01FC08C
InitStep11_Value1 = 0x000000AA
InitStep12_Action = "Write 32bit"
InitStep12_Comment = "PLL feed 2"
InitStep12_Value0 = 0xE01FC08C
InitStep12_Value1 = 0x00000055
InitStep13_Action = "Write 32bit"
InitStep13_Comment = "Enable PLL"
InitStep13_Value0 = 0xE01FC080
InitStep13_Value1 = 0x00000001
InitStep14_Action = "Write 32bit"
InitStep14_Comment = "PLL feed 1"
InitStep14_Value0 = 0xE01FC08C
InitStep14_Value1 = 0x000000AA
InitStep15_Action = "Write 32bit"
InitStep15_Comment = "PLL feed 2"
InitStep15_Value0 = 0xE01FC08C
InitStep15_Value1 = 0x00000055
InitStep16_Action = "Read 32bit"
InitStep16_Comment = ""
InitStep16_Value0 = 0xE01FC088
InitStep16_Value1 = 0x00000000
InitStep17_Action = "Var AND"
InitStep17_Comment = ""
InitStep17_Value0 = 0x00000000
InitStep17_Value1 = 0x04000000
InitStep18_Action = "Var BEQ"
InitStep18_Comment = "Wait until PLL is locked"
InitStep18_Value0 = 0x00000010
InitStep18_Value1 = 0x00000000
InitStep19_Action = "Read 32bit"
InitStep19_Comment = ""
InitStep19_Value0 = 0xE01FC088
InitStep19_Value1 = 0x00000000
InitStep1_Action = "Var AND"
InitStep1_Comment = ""
InitStep1_Value0 = 0x00000000
InitStep1_Value1 = 0x02000000
InitStep20_Action = "Var AND"
InitStep20_Comment = ""
InitStep20_Value0 = 0x00000000
InitStep20_Value1 = 0x00FF7FFF
InitStep21_Action = "Var XOR"
InitStep21_Comment = ""
InitStep21_Value0 = 0x00000000
InitStep21_Value1 = 0x00000023
InitStep22_Action = "Var BNE"
InitStep22_Comment = "Wait for M_N lock"
InitStep22_Value0 = 0x00000013
InitStep22_Value1 = 0x00000000
InitStep23_Action = "Write 32bit"
InitStep23_Comment = "Set CPU clock = PLL / 5; CPU clock = 57,6 MHz"
InitStep23_Value0 = 0xE01FC104
InitStep23_Value1 = 0x00000004
InitStep24_Action = "Write 32bit"
InitStep24_Comment = "Setup USB clock = PLL / 6; USB clock = 48MHz"
InitStep24_Value0 = 0xE01FC108
InitStep24_Value1 = 0x00000005
InitStep25_Action = "Write 32bit"
InitStep25_Comment = "Setup Periphal1 block clock = CPUClock / 4"
InitStep25_Value0 = 0xE01FC1A8
InitStep25_Value1 = 0x00000000
InitStep26_Action = "Write 32bit"
InitStep26_Comment = "Setup Periphal2 block clock = CPUClock / 4"
InitStep26_Value0 = 0xE01FC1AC
InitStep26_Value1 = 0x00000000
InitStep27_Action = "Write 32bit"
InitStep27_Comment = "Connect PLL"
InitStep27_Value0 = 0xE01FC080
InitStep27_Value1 = 0x00000003
InitStep28_Action = "Write 32bit"
InitStep28_Comment = "PLL feed 1"
InitStep28_Value0 = 0xE01FC08C
InitStep28_Value1 = 0x000000AA
InitStep29_Action = "Write 32bit"
InitStep29_Comment = "PLL feed 2"
InitStep29_Value0 = 0xE01FC08C
InitStep29_Value1 = 0x00000055
InitStep2_Action = "Var BEQ"
InitStep2_Comment = "Disconnect only if necessary"
InitStep2_Value0 = 0x00000006
InitStep2_Value1 = 0x00000000
InitStep30_Action = "Write 32bit"
InitStep30_Comment = "Map User Flash into Vector area at (0 - 3f)"
InitStep30_Value0 = 0xE01FC040
InitStep30_Value1 = 0x00000001
InitStep31_Action = "Write 32bit"
InitStep31_Comment = ""
InitStep31_Value0 = 0xFFE08220
InitStep31_Value1 = 0x00000081
InitStep32_Action = "Write 32bit"
InitStep32_Comment = ""
InitStep32_Value0 = 0xFFE08224
InitStep32_Value1 = 0x00000000
InitStep33_Action = "Write 32bit"
InitStep33_Comment = ""
InitStep33_Value0 = 0xFFE08228
InitStep33_Value1 = 0x00000000
InitStep34_Action = "Write 32bit"
InitStep34_Comment = ""
InitStep34_Value0 = 0xFFE0822C
InitStep34_Value1 = 0x0000000F
InitStep35_Action = "Write 32bit"
InitStep35_Comment = ""
InitStep35_Value0 = 0xFFE08230
InitStep35_Value1 = 0x0000001F
InitStep36_Action = "Write 32bit"
InitStep36_Comment = ""
InitStep36_Value0 = 0xFFE08234
InitStep36_Value1 = 0x00000002
InitStep37_Action = "Write 32bit"
InitStep37_Comment = ""
InitStep37_Value0 = 0xFFE08238
InitStep37_Value1 = 0x0000000F
InitStep3_Action = "Write 32bit"
InitStep3_Comment = "Disconnect PLL"
InitStep3_Value0 = 0xE01FC080
InitStep3_Value1 = 0x00000001
InitStep4_Action = "Write 32bit"
InitStep4_Comment = "PLL feed 1"
InitStep4_Value0 = 0xE01FC08C
InitStep4_Value1 = 0x000000AA
InitStep5_Action = "Write 32bit"
InitStep5_Comment = "PLL feed 2"
InitStep5_Value0 = 0xE01FC08C
InitStep5_Value1 = 0x00000055
InitStep6_Action = "Write 32bit"
InitStep6_Comment = "Disable PLL"
InitStep6_Value0 = 0xE01FC080
InitStep6_Value1 = 0x00000000
InitStep7_Action = "Write 32bit"
InitStep7_Comment = "PLL feed 1"
InitStep7_Value0 = 0xE01FC08C
InitStep7_Value1 = 0x000000AA
InitStep8_Action = "Write 32bit"
InitStep8_Comment = "PLL feed 2"
InitStep8_Value0 = 0xE01FC08C
InitStep8_Value1 = 0x00000055
InitStep9_Action = "Write 32bit"
InitStep9_Comment = "Select internal RC oscillator as PLL clock source"
InitStep9_Value0 = 0xE01FC10C
InitStep9_Value1 = 0x00000000
NumInitSteps = 38
RAMAddr = 0x40000000
RAMSize = 0x00010000
UseAutoSpeed = 0x00000001
UseRAM = 1
[FLASH]
NumBanks = 2
[FLASH0]
aSectorSel[28] = 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1
AutoDetect = 0
BankName = ""
BankSelMode = 1
BaseAddr = 0x00000000
CheckId = 0
CustomRAMCode = ""
DeviceName = "LPC2478 internal"
EndBank = 27
OrgNumBits = 32
OrgNumChips = 1
StartBank = 0
UseCustomRAMCode = 0
[FLASH1]
aSectorSel[0] =
AutoDetect = 1
BankName = ""
BankSelMode = 1
BaseAddr = 0x81000000
CheckId = 0
CustomRAMCode = ""
DeviceName = "Auto detected flash memory"
EndBank = 8191
OrgNumBits = 16
OrgNumChips = 1
StartBank = 65535
UseCustomRAMCode = 0
[PRODUCTION]
AutoPerformsErase = 1
AutoPerformsHardLock = 0
AutoPerformsHardUnlock = 0
AutoPerformsProgram = 1
AutoPerformsSecure = 1
AutoPerformsSoftLock = 0
AutoPerformsSoftUnlock = 1
AutoPerformsStartApp = 1
AutoPerformsUnsecure = 0
AutoPerformsVerify = 1
Delay = 0x000001F4
EraseType = 1
ProgramSN = 0
SNAddr = 0x00000000
SNInc = 0x00000001
Threshold = 0x00000BB8
VerifyType = 2
复制代码