专注电子技术学习与研究
当前位置:单片机教程网 >> STM32 >> 浏览文章

Warning: Stack pointer is setup to incorrect alignment.

作者:啄木鸟   来源:啄木鸟   点击数:  更新时间:2014年06月14日   【字体:
在编译的时候出现的问题,很是有点郁闷!!
查阅后,显示如下:
background:
The STM32 device can be read protected.
When that is done will the bytes in the flash memory read out as 0xAA.
When the Cortex-M device starts up are the bytes 0x00 to 0x03 read as holding the value of the stack pointer, and in that situation is the value 0xAAAAAAAA invalid.


Solution:
The flash of the STM32 needs to be erased with an external tool.
The tool arm\bin\JLinkSTM32.exe can do this erasure. (Just run the tool from command line.)


或许你上面没有看懂,或许你看懂了!!!
下面我说一下自己及巨额的办法:
此种情况,很多是由于芯片的一个保护功能,就是说在你仿真的时候,你原来的芯片里面已经有程序了,在你想要重新搞定之前,你需要先擦除芯片里面的程序!!!
英文部分提供了一个很好的办法,就是打开IAR的按章文件的此路径(arm\bin\JLinkSTM32.exe)下的JLinkSTM32.exe这个家伙即可,你点击以后根据提示或者体会自动那个擦出你芯片里面的程序!SO!恭喜,你的芯片又可以Debug了.................

相关文章