2009-09-04 02:23 PM
Stack misalignment
2011-05-17 04:22 AM
I use IAR toolchain and STM32F101C6T6 as target.
When I download my code to start debug the J-Link driver return the following error: Stack pointer is setup to incorrect alignment. Stack addr=0xFFFFFFFF. My application's main is empty. I just include the peripherals driver and IAR's startup file. Can anyone help me? Thanks. Mauro.2011-05-17 04:22 AM
Did you setup the reset vector? On reset he word at 0000 goes to sp. The word at 0004 goes to pc. One might expect sp=FFFFFFFF if the reset vector is erased and not programmed.
2011-05-17 04:22 AM
Hi Mauro,
You can try to run first the latest templates from our web site http://www.st.com/stonline/products/support/micro/files/stm32f10x_stdperiph_lib.zip then go to this subdirectory : \stm32f10x_stdperiph_lib\Project\Template\EWARMv5 Do not forget to change ''your target'' as shown below since you use Low-density devices which is compatible with STM3210B-EVAL board, else you will get a similar error :-). Hope this helps you. Cheers, STOne-32. [ This message was edited by: STOne-32 on 05-09-2009 02:54 ]2011-05-17 04:22 AM
Agree w/picguy.
However - more basic - have you tried your J-Link with an ''official'' eval/dev board? Always useful to have something ''known good'' to avoid the dreaded, ''maximum randomness.'' (i.e. new hw, new sw, new tool, new IDE etc) ST-One32 advises that we check Segger site - download the newest sw for JLink. I would beg/borrow/steal basic IAR or ST eval board - and get that to work before the debug of (I assume) your custom C6T6 pcb. Good luck...