打印
[技术问答]

AC7801FDLA MCU: IAR调试运行环境flashloader问题

[复制链接]
4158|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
hi 大神们:
用的MCU是AC7801FDLA, SRAM为20K, IAR工程文件和flashloader是官网下载的,在用IAR调试运行时出现非常诡异的问题。
当我的程序用的SRAM超过8K时,第一次通过IAR能download并运行,但是第二次再download就不行了弹出如下错误:

IAR Debug log窗口有如下log:
Thu Nov 11, 2021 12:05:02: IAR Embedded Workbench 8.22.2 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\armproc.dll)
Thu Nov 11, 2021 12:05:02: Loaded macro file: Z:\IAR_Workspace\AC7801X_APP\flashloader\FlashAC7801x.mac
Thu Nov 11, 2021 12:05:02: Device "CORTEX-M0+" selected.
Thu Nov 11, 2021 12:05:02: JLINK command: ProjectFile = Z:\IAR_Workspace\AC7801X_APP\settings\AC7801X_Debug.jlink, return = 0
Thu Nov 11, 2021 12:05:02: Device "CORTEX-M0+" selected.
Thu Nov 11, 2021 12:05:02: Selecting SWD as current target interface.
Thu Nov 11, 2021 12:05:02: JTAG speed is initially set to: 1000 kHz
Thu Nov 11, 2021 12:05:02: Found SW-DP with ID 0x0BC11477
Thu Nov 11, 2021 12:05:02: Scanning AP map to find all available APs
Thu Nov 11, 2021 12:05:02: AP[1]: Stopped AP scan as end of AP map has been reached
Thu Nov 11, 2021 12:05:02: AP[0]: AHB-AP (IDR: 0x04770031)
Thu Nov 11, 2021 12:05:02: Iterating through AP map to find AHB-AP to use
Thu Nov 11, 2021 12:05:02: AP[0]: Core found
Thu Nov 11, 2021 12:05:02: AP[0]: AHB-AP ROM base: 0xE00FF000
Thu Nov 11, 2021 12:05:02: CPUID register: 0x410CC601. Implementer code: 0x41 (ARM)
Thu Nov 11, 2021 12:05:02: Found Cortex-M0 r0p1, Little endian.
Thu Nov 11, 2021 12:05:03: FPUnit: 4 code (BP) slots and 0 literal slots
Thu Nov 11, 2021 12:05:03: CoreSight components:
Thu Nov 11, 2021 12:05:03: ROMTbl[0] @ E00FF000
Thu Nov 11, 2021 12:05:03: ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB008 SCS
Thu Nov 11, 2021 12:05:03: ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 000BB00A DWT
Thu Nov 11, 2021 12:05:03: ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 000BB00B FPB
Thu Nov 11, 2021 12:05:03: Reset: Halt core after reset via DEMCR.VC_CORERESET.
Thu Nov 11, 2021 12:05:03: Reset: Reset device via AIRCR.SYSRESETREQ.
Thu Nov 11, 2021 12:05:03: Hardware reset with strategy 0 was performed
Thu Nov 11, 2021 12:05:03: Initial reset was performed
Thu Nov 11, 2021 12:05:03: #####execUserFlashInit
Thu Nov 11, 2021 12:05:03: 1652 bytes downloaded (12.91 Kbytes/sec)
Thu Nov 11, 2021 12:05:03: Loaded debugee: Z:\IAR_Workspace\AC7801X_APP\flashloader\FlashAC7801xRAM16K.out
Thu Nov 11, 2021 12:05:03: Target reset
Thu Nov 11, 2021 12:05:04: Unloaded macro file: Z:\IAR_Workspace\AC7801X_APP\flashloader\FlashAC7801x.mac
Thu Nov 11, 2021 12:05:04: The flash loader program reported an error.
Thu Nov 11, 2021 12:06:02: IAR Embedded Workbench 8.22.2 (C:\Program Files (x86)\IAR Systems\Embedded Workbench 8.0\arm\bin\armproc.dll)


但是只要我的程序把数组改小,使用的SRAM小于8K就可以多次调试了。

怀疑是flashloader的问题,因为flashloader目录下有“FlashAC7801xRAM8K.out”文件,猜测是针对SRAM为8K的MCU制作的,
于是我又去官网下载了flashloader的工程,修改了FlashAC7801xRAM8K.icf文件中RAM的范围为16K(0X20000040~0X20003FFF),自己编译了一个
FlashAC7801xRAM16K.out。

用这个.out替换原来flashloader目录下的,但是还是不行,当程序的SRAM超过8K还是弹出一样的错误。

无奈只能这里求救了。。。。

谢谢

捕获.PNG (14.55 KB )

捕获.PNG

使用特权

评论回复

相关帖子

沙发
fanchenxinok|  楼主 | 2021-11-11 17:23 | 只看该作者
杰发的工程师不能回答这个问题吗

使用特权

评论回复
板凳
yangxiaor520| | 2021-11-11 20:49 | 只看该作者
**不成功?

使用特权

评论回复
评论
fanchenxinok 2021-11-12 13:35 回复TA
??? 
地板
fanchenxinok|  楼主 | 2021-11-15 14:42 | 只看该作者
杰发的工程师没有能解决这个问题的吗?

使用特权

评论回复
5
2860419417| | 2021-11-19 14:30 | 只看该作者
本帖最后由 2860419417 于 2021-11-19 14:35 编辑

develop_tool_demo20210319(AC780X)\develop_tool_demo\IAR_Demo  你试的是这个demo么,我刚刚试了这个路径下的,定义了一个9k的数据,也看了map文件,用TAC-LINK和J-Link编译下载都没有问题

使用特权

评论回复
评论
fanchenxinok 2021-11-22 13:02 回复TA
Jlink下载没问题啊 关键是IAR工具啊 jlink工具又不用flashloader,IAR工具下载调试杰发自己写的flashloader 
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

16

主题

65

帖子

0

粉丝