1、基本环境搭建需要参考这篇博客,写得很好,推荐
在 linux 上开发 stm8_niuiic的博客-CSDN博客更多分享内容可访问我的个人博客https://www.niuiic.top/本文介绍如何在 linux(Gentoo)上开发 stm8。硬件stm8 开发板,比如 stm8s105k4 最小系统板。stlink,USB 的那种总是连不上电脑,建议选择白色 20 针的那种。连接所需杜邦线。软件sdcc使用 sdcc 作为编译器。直接搜索如何安装即可。stm8-gdb使用 stm8-gdb 作为调试器。按其官网的介绍下载源文件。编译之前先安装好 python3.6。如果是https://blog.csdn.net/niuiic/article/details/1181827572、把stm8的makefile工程导入eclipse中,代码stm8l152芯片,实现的代码,使用sdcc编译,可以再eclipse中编辑调试,-C文档类资源-CSDN下载stm8l152芯片,实现的代码,使用sdcc编译,可以再eclipse中编辑调试,更多下载资源、学习资料请访问CSDN下载频道.https://download.csdn.net/download/eastgeneral/85233306
file:///root/Pictures/Screenshot%20from%202022-04-27%2021-37-05.png
3、配置Debug Configuration页面
然后就可以进行单步调试了。 如果参考过程中出了问题,可能是因为openocd版本的问题。