使用IAR对STM8进行程序下载的时候冒出这个错误
Errors while setting configuration with MCU name STM8S103F3P: gdi-error [40301]: The Flash Memory Read-out protection option must be disabled for debug. Disabling this option will first erase the whole Flash Memory.
这是因为芯片被锁定了,需要用STVP工具对芯片进行解锁
STVP下载:https://www.lanzous.com/i3957yd
安装好之后打开STVP,在弹出的界面选择 ST-LINK USB 以及自己使用的单片机型号
若是这个界面被关闭了,可以在菜单栏的 configure处打开
由于默认的配置是允许芯片被写入的,所以不用更改,然后点击下图的按钮即可进行接锁