cancel
Showing results for 
Search instead for 
Did you mean: 

IAR + STLINK : Debugger error

aa_thomas
Associate
Posted on May 19, 2011 at 10:44

Hello,

I am using stm32 discovery board + IAR 6.20 + STlink USB V2

When I want to download and debug the discovery application, I get the following errors:

Thu May 19, 2011 10:36:43: Loaded macro file: C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\config\flashloader\ST\FlashSTM32F10xxx.mac

Thu May 19, 2011 10:36:43: -I- execUserFlashInit!

Thu May 19, 2011 10:36:43: Loaded debugee: C:\Program Files\IAR Systems\Embedded Workbench 6.0 Kickstart\arm\config\flashloader\ST\FlashSTM32F10xxxRAM6K.out

Thu May 19, 2011 10:36:43: Target reset

Thu May 19, 2011 10:36:44: Downloaded C:\partage\an3268\stm32vldiscovery_package\Project\Demo\EWARMv5\DISCOVER\Exe\DISCOVER.out to flash memory.

Thu May 19, 2011 10:36:44: 2268 bytes downloaded into FLASH (1.71 Kbytes/sec)

Thu May 19, 2011 10:36:44: Loaded debugee: C:\partage\an3268\stm32vldiscovery_package\Project\Demo\EWARMv5\DISCOVER\Exe\DISCOVER.out

Thu May 19, 2011 10:36:46: User error: Stack pointer is setup to incorrect alignment.  Stack addr = 0xFFFFFFFF

Thu May 19, 2011 10:36:46: Target reset

Thu May 19, 2011 10:36:46: Failed to load debugee: C:\partage\an3268\stm32vldiscovery_package\Project\Demo\EWARMv5\DISCOVER\Exe\DISCOVER.out

Do you know how to solve this problem?

Best regards,

Thomas
1 REPLY 1
Posted on May 20, 2011 at 21:59

Do you know how to solve this problem?

The VL Discovery board includes a ST-LINK V1 controller.

The project files are for EWARM v5.x. EWARM v6 does not apparently have backward compatibility. Great job their IAR.

It's complaining about how the stack is set up, try digging though the option pages/tabs to find out how to adjust this. And perhaps look at the startup code that is being pulled in, or if indeed it is coming in.

Use an older version of EWARM that can load the project properly.

Try building a project from scratch, or with a wizard, import the files you want into that project, and not from the v5 project. How easy this is to do should act as a strong metric with which to compare tool chains.

Use a different compiler/tool chain, that can load projects from older versions without choking.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..