IAR 编译异常记录

问题一

问题描述
WARNING:the connected j-link is defective.proper operation cannot be guaranteed.连接的J-Link不良,无法保证正确操作。
问题原因
驱动版本与JLINK固件版本相差过大。
解决办法

  1. 降低驱动版本,以兼容老固件,举例:在IAR工程中,在IAR Systems\Embedded Workbench 8.4\arm\bin目下,更换“JLinkARM.dll”文件即可解决;在KEIL工程中,“JLink.exe”、“JLinkARM.dll”、“JLinkRDI.dll”拷贝覆盖keil安装目录的“keil”-“ARM”-“Segger”里面对应的文件。这样就完成了keil默认J-link驱动的替换。 当然也可以直接从别的电脑拷贝“keil”-“ARM”-“Segger”文件夹来替换J-link驱动(KEIL下未测试验证,仅供学习参考)。
  2. 升级JLINK工具固件,兼容新驱动。

问题二

问题描述
WARNING:write failed(CPU data abort) at memory address 0x2000 0400,
问题原因及解决办法
USB HUB接触松动,重新拔插USB HUB解决(仅供参考,可能存在其他情况);

问题三

问题描述
WARNING : stack pointer is setup to incorrect alignment. Stack pointer is setup to incorrect alignment. Stack addr = 0xFFFFFFFF
问题原因及解决办法
IAR设置不正确所致,在工程Option->Debug->Dowload下勾选 use flash loader解决。

问题四

问题描述
Error[Lp011]: section placement failed unable to allocate space for sections/blocks with a total estimated minimum size of 0x4418 bytes (max align 0x8) in <[0x00000000-0x00000000], [0x08000000-0x08003fff], [0x20000000-0x200007ff]> (total uncommitted space 0x4741).
错误[Lp011]:节放置失败,无法在<[0x00000000-0x00000000],[0x08000000-0x08003fff],[0x20000000-0x200007ff],[0x20000000-0x200000000]中为总估计的最小大小为0x4418字节(最大对齐0x8)的节/块分配空间 (总未分配空间0x4741)。
问题原因及解决办法
程序超过IAR->options->linker->config->memory regions中ROM设置大小。缩减代码或增加ROM设置大小解决。

IAR常见错误,如

  1. 使用IAR软件版本不正确,实测版本8.4下工程不兼容版本7.2,需升级工程,再使用版本7.2打开时不能使用;
  2. 使用中文路径。

猜你喜欢

转载自blog.csdn.net/xiaogu0322/article/details/104626602