Page 1 of 1

STM32F4-Discovery / IAR 6.30

Posted: Tue Dec 13, 2011 2:31 pm
by derspeck84
Dear Folks,

I have several Problem getting Chibios running on a STM32F4-Discovery Board with IAR Workbench.
The Problem already exists in Startup just before getting to the "main" C-Routine.

When Stepping through the code, i reach the main routine without any problems, but when doing a free run, the processor ends up in a unhandled exception (undefined instruction).
With several breakpoints i found out that there must be a problem with __iar_data_init3 routine. Maybe it's a corrupted stack or something.
Has someone similar Problems when trying to run the chibios demo project with stm32f4 discovery on iar?

The stm32f4 demo project from st runs without any problems.
I hope someone can help me with this issue.

Best Regards
Pascal

Re: STM32F4-Discovery / IAR 6.30

Posted: Tue Dec 13, 2011 2:40 pm
by Giovanni
Version 2.3.4 has been tested with IAR 6.3.0, the report is included. Which version OS are you using?

Giovanni

Re: STM32F4-Discovery / IAR 6.30

Posted: Tue Dec 13, 2011 2:48 pm
by derspeck84
Thanks for your fast answer.
I used version 2.3.4 with IAR 6.3, just changed Debugger to ST-LINK, interface to SWD, activating Flashloders and getting the mentioned problems.
I don't know what I'm doing wrong!

I made a zip of my Project Directory at http://www.ewersbach.net/speck/ARMCM4-S ... COVERY.zip
Maybe someone can look at that.

Re: STM32F4-Discovery / IAR 6.30

Posted: Tue Dec 13, 2011 7:22 pm
by Giovanni
The project is OK, I am able to flash and run in both release and debug modes.

My EWarm has the following version numbers (Help->About->Product Info...):

IAR Embedded Workbench for ARM: 6.21.4.2946
IAR Embedded Workbench common components: 6.3.5.2010

Is it the same?

Giovanni

Re: STM32F4-Discovery / IAR 6.30

Posted: Wed Dec 14, 2011 5:53 pm
by derspeck84
No, I have the following versions:

IAR Embedded Workbench for ARM 6.30.1.3142
IAR Embedded Workbench common components 6.3.10.2075

Ath this Version Cortex M4 is supported. May the Problem be related with the FPU?

Pascal

Re: STM32F4-Discovery / IAR 6.30

Posted: Wed Dec 14, 2011 8:08 pm
by Giovanni
The IAR port does not support the FPU yet, please verify if it is in the project options. I find more likely something wrong with the startup code, it is defived from the IAR 6.21 code.

Giovanni

Re: STM32F4-Discovery / IAR 6.30

Posted: Wed Dec 14, 2011 10:31 pm
by Giovanni
HI,

I just downloaded and tested the latest version from the IAR web site:
6.30.3.3241
6.3.12.2118

The demo worked out of the box. You may consider upgrading just to rule out problems with your very specific version. Please also try to download the ChibiOS/RT 2.3.4 zip file again, there is a non null possibility that some file got corrupted somehow in your installation.

Please also verify all options regarding the ST-Link:
Driver: ST-Link
Download: Verify Downloads
Download: Use Flash Loaders
ST-Link: Reset: Normal
ST-Link: SWD

Giovanni