如果用iar 则这样报错 Errors while setting configuration with MCU name STM8L152R8: gdi-error [40311]: The flash memory readout protection is set or about to be set; it must be disabled before debugging, and disabling it firstly erases the whole flash
都是在说目标芯片被保护了!
手里的st-link是好的,因为对stm8L101下载都是正常的,但对stm8L152R8T6就不行了,每次都是报芯片被保护了,st-link 的swim下载就四根线,vcc,swim,rst,gnd,检查很多次了,实在搞不明白,希望做过这个的同僚支个招哦,提个醒哦。
或者用第三方烧录工具找到该选项。