IAR+jink调试ucosiii 程序下载不进去?请教论坛里热心的朋友
时间:10-02
整理:3721RD
点击:
请教论坛里热心的朋友,有没有碰到过类似的问题,有什么好的解决思路?
编译结果正确:
Building configuration: Test - Debug
Updating build tree...
Configuration is up-to-date.
开始下载:
点击 download and debug 后
出现如下图所示问题
log显示为:
Tue Nov 12, 2013 17:21:22: Loaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\Freescale\FlashK60Xxxx.mac
Tue Nov 12, 2013 17:21:23: JLINK command: ProjectFile = F:\arm\k60\myproject\IAR-ucosiii\settings\Test_Debug.jlink, return = 0
Tue Nov 12, 2013 17:21:23: Device "K60DN512Z" selected (512 KB flash, 32 KB RAM).
Tue Nov 12, 2013 17:21:23: JLINK command: device = MK60DN512Zxxx10, return = 0
Tue Nov 12, 2013 17:21:23: DLL version: V4.36f, compiled Oct 22 2011 15:21:42
Tue Nov 12, 2013 17:21:23: Firmware: J-Link ARM V8 compiled Sep 22 2011 16:23:23
Tue Nov 12, 2013 17:21:23: JTAG speed is initially set to: 32 kHz
Tue Nov 12, 2013 17:21:23: TotalIRLen = 4, IRPrint = 0x01
Tue Nov 12, 2013 17:21:23: Found Cortex-M4 r0p0, Little endian.
Tue Nov 12, 2013 17:21:24: TPIU fitted.
Tue Nov 12, 2013 17:21:24: ETM fitted.
Tue Nov 12, 2013 17:21:24: ETB present.
Tue Nov 12, 2013 17:21:24: CSTF present.
Tue Nov 12, 2013 17:21:24: FPUnit: 6 code (BP) slots and 2 literal slots
Tue Nov 12, 2013 17:21:24: Hardware reset with strategy 0 was performed
Tue Nov 12, 2013 17:21:24: Initial reset was performed
Tue Nov 12, 2013 17:21:24: Found 1 JTAG device, Total IRLen = 4:
Tue Nov 12, 2013 17:21:24: #0 Id: 0x4BA00477, IRLen: 4, IRPrint: 0x1 CoreSight JTAG-DP
Tue Nov 12, 2013 17:21:25: ----- Prepare hardware for Flashloader -----
Tue Nov 12, 2013 17:21:25: 1280 bytes downloaded (8.93 Kbytes/sec)
Tue Nov 12, 2013 17:21:25: Loaded debugee: D:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\Freescale\FlashK60Xxxx.out
Tue Nov 12, 2013 17:21:25: Target reset
Tue Nov 12, 2013 17:21:25: The flash loader program reported an error.
编译结果正确:
Building configuration: Test - Debug
Updating build tree...
Configuration is up-to-date.
开始下载:
点击 download and debug 后
出现如下图所示问题
log显示为:
Tue Nov 12, 2013 17:21:22: Loaded macro file: D:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\Freescale\FlashK60Xxxx.mac
Tue Nov 12, 2013 17:21:23: JLINK command: ProjectFile = F:\arm\k60\myproject\IAR-ucosiii\settings\Test_Debug.jlink, return = 0
Tue Nov 12, 2013 17:21:23: Device "K60DN512Z" selected (512 KB flash, 32 KB RAM).
Tue Nov 12, 2013 17:21:23: JLINK command: device = MK60DN512Zxxx10, return = 0
Tue Nov 12, 2013 17:21:23: DLL version: V4.36f, compiled Oct 22 2011 15:21:42
Tue Nov 12, 2013 17:21:23: Firmware: J-Link ARM V8 compiled Sep 22 2011 16:23:23
Tue Nov 12, 2013 17:21:23: JTAG speed is initially set to: 32 kHz
Tue Nov 12, 2013 17:21:23: TotalIRLen = 4, IRPrint = 0x01
Tue Nov 12, 2013 17:21:23: Found Cortex-M4 r0p0, Little endian.
Tue Nov 12, 2013 17:21:24: TPIU fitted.
Tue Nov 12, 2013 17:21:24: ETM fitted.
Tue Nov 12, 2013 17:21:24: ETB present.
Tue Nov 12, 2013 17:21:24: CSTF present.
Tue Nov 12, 2013 17:21:24: FPUnit: 6 code (BP) slots and 2 literal slots
Tue Nov 12, 2013 17:21:24: Hardware reset with strategy 0 was performed
Tue Nov 12, 2013 17:21:24: Initial reset was performed
Tue Nov 12, 2013 17:21:24: Found 1 JTAG device, Total IRLen = 4:
Tue Nov 12, 2013 17:21:24: #0 Id: 0x4BA00477, IRLen: 4, IRPrint: 0x1 CoreSight JTAG-DP
Tue Nov 12, 2013 17:21:25: ----- Prepare hardware for Flashloader -----
Tue Nov 12, 2013 17:21:25: 1280 bytes downloaded (8.93 Kbytes/sec)
Tue Nov 12, 2013 17:21:25: Loaded debugee: D:\Program Files (x86)\IAR Systems\Embedded Workbench 6.0\arm\config\flashloader\Freescale\FlashK60Xxxx.out
Tue Nov 12, 2013 17:21:25: Target reset
Tue Nov 12, 2013 17:21:25: The flash loader program reported an error.
期待朋友的帮忙
问题解决了,原来是芯片被锁上了,可是之前还好好的可以下载的,下载一个操作系统之后芯片就被锁住了,奇怪?
解决问题:首先Jlink文件夹里要有erase_all_pin.jlk。然后:运行->cmd->输入“cd 你的JlinK安装路径” ->Jlink.exe erase_all_pin.jlk
芯片锁了,你操作了不应该操作的寄存器,我前几天也是,后来用J-flash把芯片全部擦除了一遍就莫名其妙的好了
哈哈 是的 谢谢您的帮助。请问您开始移植了吗?
我出现新的问题了,先说一下操作系统是ucosiii 。出现的问题是寄存器不能压入堆栈。
没有,我才开始学习操作系统UCOS2,现在还搞不清楚,初学中
能加QQ相互学习下吗
多多指教 我也初学者,比较粗糙 269343361