debug stm32l151xd带有或不使用“使用flash Loader” IAR
我遇到了一种奇怪的行为,同时使用IAR 6.50.6在 STM32L151XD上调试各种固件。
我发现,使用使用Flash Loader 检查一切顺利。之后,如果我尝试在同一设备上闪烁另一个使用使用Flash Loader 未检查的FW,则闪光过程会顺利进行,但是我无法调试,IAR显示了一系列验证错误,就像
Verify error at address 0x08000000, target byte: 0xD0, byte in file: 0xC8
我知道Flash加载程序从主机读取应用程序二进制图像,解开图像,然后将图像写入闪存。
如果我在IAR上检查/取消选中并尝试调试会发生什么?
I'm came across a strange behavior while debugging various firmware on the STM32L151xD using IAR 6.50.6.
I've found out that flashing a FW with Use Flash Loader checked everything goes smooth. After that, if I try to flash on the same device another FW with Use Flash Loader unchecked, the flashing process goes smooth but I can't debug and IAR shows a series of verify error like
Verify error at address 0x08000000, target byte: 0xD0, byte in file: 0xC8
I know that the flash loader read the application binary image from the host, unpack the image, and write the image to flash memory.
What happens if I check/uncheck on IAR and try to debug?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不引人注目的使用Flash Loader 选项对将应用程序编程到目标设备中的方式有重大影响:
如果使用flash loader ,请使用,IAR调试器加载A Tiny flash加载器应用程序到目标MCU的RAM中,然后能够将用户应用程序编程到目标闪存中。 Flash Loader应用程序通常是专门针对MCU设备家族(例如STM32L1)实现的,因为每个设备(家庭)具有有关如何编程闪存(解锁机制,时机等)的特定方法。 IAR Workbench船舶汇集了大量用于所有受支持设备的闪存装载机。请参阅 - SPY调试指南有关Flash加载器机制的更详细说明。
如果使用Flash Loader 未选中,则IAR调试器依赖于调试探针能够对目标MCU的闪存进行编程。它取决于特定的调试探针(驱动程序),是否能够编程特定设备。
根据我的经验,流行的 segger j-link编程几乎所有ST STM32 MCU设备,没有使用flash Loader ,而 iar i-iar I-jet 调试探针缺乏此能力 - 仅命名两个探针。
不幸的是,当配置的调试探针无法编程特定目标MCU时,IAR EWARM调试器不会发出警告(或错误)消息。相反,似乎假设编程成功。只有启用了选项验证下载,调试器才会检查用户应用程序是否已成功闪烁到目标。
在您的情况下,对下载的验证使用空白设备会失败,因为您的调试探针显然无法在没有闪存加载器的情况下对目标MCU闪存进行编程。您需要在所有项目中启用对调试探测器使用Flash Loader 。
The unobtrusive Use Flash Loader option has a major impact on how an application is programmed into the target device:
If Use Flash Loader is checked, the IAR debugger loads a tiny flash loader application into the RAM of the target MCU which then in turn is able to program the user application into the target flash. The flash loader application is typically implemented specifically for a MCU device family (like STM32L1), because each device (family) has it's specific way on how the flash memory needs to be programmed (unlock mechanism, timing, etc.). The IAR workbench ships with a large collection of flash loaders for all supported devices. Refer to chapter Flash loaders in the IAR C-SPY Debugging Guide for a more detailed description of the flash loader mechanism.
If Use Flash Loader is unchecked, the IAR debugger instead relies on the debugging probe to be able to program the target MCU's flash memory. It depends on the specific debug probe (driver), whether it is able to program a specific device.
From my experience the popular Segger J-Link debug probes are able to program nearly all ST STM32 MCU devices without Use Flash Loader, while the IAR i-Jet debug probes lack this ability - to name just two probes.
Unfortunately, the IAR EWARM debugger does not issue a warning (or error) message, when the configured debug probe is not able to program the specific target MCU. Instead it seems to assume that programming succeeded. Only if the option Verify download has been enabled, the debugger will check whether the user application has been successfully flashed to the target.
In your case verification of the download fails with a blank device, because your debug probe is apparently not able to program the target MCU flash memory without a flash loader. You need to enable the Use Flash Loader for the debug probe in all your projects.