stm8 烧录失败 Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection erro

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图1

luoyir1997 2018-07-24 15:22:35 stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图2
12850 stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图3
stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图4
收藏 9

分类专栏: stm8#+stm32#+lora#+IAR

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://blog.csdn.net/luoyir1997/article/details/81185414

版权


stm8#+stm32#+lora#+IAR
stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图5 专栏收录该内容

34 篇文章 1 订阅

订阅专栏

  • 刚上手 stm8,我好不容易用 IAR 编译成功了的一个工程
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图6
  • 就出现了这样的警告:
  • Mon Jul 23, 2018 14:38:55: Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection error
  • Mon Jul 23, 2018 14:38:55: Failed to load debugee: E:\LoRa\stm8\project\Debug\Exe\led.out
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图7
  • 大概意思就是未能初始化与硬件的通信
  • ST-linkV2 是一款可以在线仿真 + 下载 STM8 的开发工具,stm8 系列单片机通过 SWIM 接口与 stlinkv2 连接
  • 经资料查询正版 ST-link/V2 引脚定义和注意事项 SWIM-stm8 接口的定义如下
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图8
  • 接线方向:接口有个槽,对准 stlinkv2 上的一个横片,接到 stm8 J3 (8 孔)模块,此时占去四孔
  • 继续检查发现我没有给板子供电
  • J3 模块剩余四孔 ————————— 跳线 ———————- 电平转换模块 —————- 电脑 USB 口
  • 检查是否安装 stlink 的驱动上官网下了 stm8-stlinkV2 的驱动,安装。
  • 打开设管理器的通用穿行总线设备,有 stlink 即可
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图9
  • 如果还不能连上,到官网下载驱动更新程序
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图10

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图11

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图12

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图13

再次打开设备管理器

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图14

  • 此时如果载程序还是报错,说明还没有连接上,检查 t 跳线是否存在接触不良现象,
  • 我的就是接触不良,捣鼓一下,即可下载成功!界面应该是这样的。
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图15
  • 如果不用 IAR,而是用 STVP 来下载程序
  • 先上官网下载 STVPSTM8-STVP 开发软件
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图16
  • 用 IAR 生成. s19 文件,以为后续的工作做准备。打开 IAR 并打开已有工程 —> 单击工程头选择 Options —> 选择 Output Converter —> 选择 Generate additional output —> 选择 output format 中的 Motorola 选项 —> 选择 override default —> 将输出文件的后缀名改为. s19 —> 重新编译整个工程 —>.s19 在 Debug\Exe 目录下
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图17
  • 我发现 IAR 还是报错,把 debuger 的驱动换成了 simulator
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图18
  • 编译、保存. s19 文件
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图19
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图20
  • 打开 ST Visual Programmer(STVP) 并设置硬件连接方式和 MCU 型号,这里以 ST-Link 连接 STM8LxG6 系列为例
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图21
  • 打开 led.s19 文件
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图22
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图23
  • 文件成功导入
  • stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图24

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图25

stm8烧录失败Failed to initialize communcation with hardware: SWIM error [30200]: ST-Link connection - 图26

成功
https://blog.csdn.net/luoyir1997/article/details/81185414