1.初学stm8s001,由于文件太大,编译不过,所以在IAR options/C++ compiler/level设置High,发现掉电后串口会吐出0x00,大概过3s后才会重新启动 2.之后把IAR options/C++ compiler/level改回low,烧写其他程序,还是如此。 3.用IAR project/dowmload/erase memory 擦除程序,未成功,导致芯片锁掉 4.用STVP /option byte/read out protection ON/OFF一次之后,可以用stvp烧录简单LED程序,但是断电之后led灯不闪烁了。 5.用STVP烧录串口程序,会烧录失败 Error : Cannot communicate with the device ! Check the SWIM cable connection and check all the needed pin connections on the SWIM connector. If the application code uses Swim Disable and Reset pin as Output or has disabled SWIM Clock Divider: Try Now to SWITCH OFF and ON the application Power Supply while NRST Reset pin is forced low. Error : < PROGRAM MEMORY verifying failed. 6. 用iar烧录所有程序(之前可以烧录的程序),都会失败。 Failed to initialize communication with hardware: SWIM error [30200]: ST-Link connection error IAR Embedded Workbench 3.10.1 (D:\Program Files\IRA Embedded\install\stm8\bin\stm8proc.dll) 求论坛大神帮忙解答。 |
Thu Sep 19, 2019 16:19:03: Failed to initialize communication with hardware:
SWIM error [30200]: ST-Link connection error
解决办法:
1.查一下烧录器硬件的连接
2.打开计算机->管理->设备管理器,查一下STM32USB口的属性
如果还是无法烧录,把ST-Link的烧录器拔掉重新插上,这个问题可能是ST-Link
之前烧过其他的程序
编译器问题2:打开IAR如果无法烧录,查一下这两处问题:
解决办法:Project -> Option -> General Options -> Target
Code:选择Small
Data:选择Medium
Project -> Option -> C/C++ Compiler -> Preprocessor
在Addtional include directoriesone per line)中添加头文件路径
如果还是无法烧录,把ST-Link的烧录器拔掉重新插上,这个问题可能是ST-Link
之前烧过其他的程序
Compiler Problem 3:
编译器无法go to define处:
Solution:
插上烧录器编译无误全速运行,然后就可以跳转到define
解决IAR编译器内存容量不够的问题
Error[Lp011]: section placement failed: unable to allocate space
for sections/blocks with a total estimated minimum size of 0x2298
bytes in <[0x008000-0x009fff]> (total uncommitted space 0x1f80).
Error while running Linker
Solution:
把Option--C/C++ compile--Optimizations中的Level选为High就好了