解决方法:IAR The selected device does not match the target device

IAR+ST-Link调试STM32时,出现 Fatal error: The selected device does not match the target device 错误,并且无法调试。这是 IAR Embedded Workbench for ARM 7.80.3 的一个bug,从IAR下载补丁即可解决该问题。

根据帖子
http://www.stmcu.org/module/forum/forum.php?mod=viewthread&tid=610247 整理而成。

出错截图

这里写图片描述

补丁下载

http://supp.iar.com/Common/ProtectedDownload.asp?key=RMIUCC321D%2C7452494&protocol=HTTP (英文版)
http://supp.iar.com/Updates/?product=EWarm (补丁页面, IAR Embedded Workbench for ARM - patch for ST device support in ST-LINK, I-jet, and J-Link

补丁安装

关闭IAR,解压下载到的补丁文件 ewarm-7.80.4.12176-patch.zip ,将 arm/bin/ 目录下的9个dll文件覆盖到IAR的安装目录下 X:\Program Files (x86)\IAR Systems\Embedded Workbench 7.5\arm\bin ,重新打开IAR,问题解决。

### STM32H743 ST-Link Debugger or Loader Information For the STM32H743 microcontroller series, support for debugging using an ST-Link debugger is fully available. The ST-Link utility can be used with various integrated development environments (IDEs), including Keil MDK, IAR Embedded Workbench, and STM32CubeIDE. #### Configuration of ST-Link for STM32H743 To configure the ST-Link debugger for use with a project involving the STM32H743: 1. Ensure that the correct device variant is selected within the IDE settings to match the specific model of the STM32H743 being utilized. 2. Connect the ST-Link programmer/debugger via USB to your computer and connect it to the SWD interface on the board containing the STM32H743 chip. 3. In most cases, no special configuration changes are required as long as you have installed the latest drivers from STMicroelectronics' official website[^1]. #### Usage Instructions When working in popular IDEs like Keil uVision, configuring the debug settings involves selecting "ST-Link" under the Debug tab's Flash Download section. For loading programs onto the flash memory without entering debug mode, one may also opt for the 'Flash Only' option provided by the same menu. In addition, when dealing specifically with projects developed outside traditional GUI-based tools—such as those built around CMake scripts—it remains important to ensure compatibility between build configurations and hardware interfaces such as JTAG/SWD connections managed through external utilities like OpenOCD or GDB server setups configured appropriately for ARM Cortex-M targets[^2]. ```cmake # Example snippet showing how to specify target properties relevant to flashing firmware images during builds set_target_properties(${PROJECT_NAME} PROPERTIES FLASH_TOOL "st-flash") ``` --related questions-- 1. What versions of ST-Link software are compatible with STM32H743? 2. How does one troubleshoot common issues encountered while setting up ST-Link for STM32H743? 3. Can other types of programmers besides ST-Link work effectively with this MCU family? 4. Are there any particular considerations needed when choosing between different models of ST-Link devices?
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值