cancel
Showing results for 
Search instead for 
Did you mean: 

ARM GCC + STM32 don't like each other

renanvalente
Associate II
Posted on October 16, 2014 at 16:29

Hello mates

I'm looking to use the SMT32F303VC (STM32F Discovery Board) for my first product. 

I'm developing on mac osx, build my toolchain based on ARM GNU GCC (GCC ARME NONE EABI 4.8) + Eclipse + Zylin Plugin + OpenOCD, running the ARM GNU Blink LED everything works perfectly, I can compile, flash and debug.

This is the tutorial I followed: http://www.davidrojas.co.uk/stm32f3discovery-on-mac-os-x-using-eclipse-gcc-arm-and-openocd/ 

However I'd like to use the STM32Cube drivers, since they're high level and mature. 

My challenge is to make it compile together. 

Starting a fresh project, the toolchain gives me this (inside zip: ARM GCC BLANK PROJECT.png)

Them I add the paths to the STM32 drivers (highlighted top left) and included some headers, drove me to this error (inside zip: ARM GCC + STM32HAL 1.png), I've noted was because the #include ''stm32f30x_conf.h'' was missing, I've add and drove me to a much much bigger error: (inside zip: ARM GCC + STM32HAL 2.png) the compiler complains about redefined things.

I'm totally lost, I've just migrated from Microchip to STM32 (there things were easier, since they offer a built IDE, just install and go).

If I could talk to someone on chat or skype/hangouts would be very useful.

Greetings,

Renan

5 REPLIES 5
Posted on October 16, 2014 at 18:26

However I'd like to use the STM32Cube drivers, since they're high level and mature.

The Standard Peripheral Library is mature, Cube/HAL are immature and buggy. GNU/GCC has historically worked really well with the SPL.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Amel NASRI
ST Employee
Posted on October 17, 2014 at 12:36

Where to find the png files containing errors?

-Mayla-

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Raouf Hosni
ST Employee
Posted on October 20, 2014 at 15:21

Hello Renan,

Are you sure that your project is build w/ STM32CubeF3 HAL? because in your post your are referring to stm32f30x_conf.h file, while there is no such file in the  HAL. the equivalent file in the HAL is stm32f3xx_hal_conf.h.

Could you provide more details about your setup to be able to help you.

best regards,

Jasmin.

Hello mates

I'm looking to use the SMT32F303VC (STM32F Discovery Board) for my first product. 

I'm developing on mac osx, build my toolchain based on ARM GNU GCC (GCC ARME NONE EABI 4.8) + Eclipse + Zylin Plugin + OpenOCD, running the ARM GNU Blink LED everything works perfectly, I can compile, flash and debug.

This is the tutorial I followed: http://www.davidrojas.co.uk/stm32f3discovery-on-mac-os-x-using-eclipse-gcc-arm-and-openocd/ 

However I'd like to use the STM32Cube drivers, since they're high level and mature. 

My challenge is to make it compile together. 

Starting a fresh project, the toolchain gives me this (inside zip: ARM GCC BLANK PROJECT.png)

Them I add the paths to the STM32 drivers (highlighted top left) and included some headers, drove me to this error (inside zip: ARM GCC + STM32HAL 1.png), I've noted was because the #include ''stm32f30x_conf.h'' was missing, I've add and drove me to a much much bigger error: (inside zip: ARM GCC + STM32HAL 2.png) the compiler complains about redefined things.

I'm totally lost, I've just migrated from Microchip to STM32 (there things were easier, since they offer a built IDE, just install and go).

If I could talk to someone on chat or skype/hangouts would be very useful.

Greetings,

Renan

Raouf Hosni
ST Employee
Posted on October 20, 2014 at 15:32

Hi Clive,

Till now almost of your replies was pertinent and fact based, which is not the case for this post; the issue reported here by Renan is likely linked to the project settings and not the HAL functioning.

In addition the STM32Cube HAL is compiled and tested with the most CortexM compilers:  IAR CC (EWARM), ARM CC (Keil) and GNU C (Atollic).

Let’s try to use this forum, where you have a key contribution, to answer user needs and help them doing what they want to do.

With regards,

Jasmin.

Hello mates

I'm looking to use the SMT32F303VC (STM32F Discovery Board) for my first product. 

I'm developing on mac osx, build my toolchain based on ARM GNU GCC (GCC ARME NONE EABI 4.8) + Eclipse + Zylin Plugin + OpenOCD, running the ARM GNU Blink LED everything works perfectly, I can compile, flash and debug.

This is the tutorial I followed: http://www.davidrojas.co.uk/stm32f3discovery-on-mac-os-x-using-eclipse-gcc-arm-and-openocd/ 

However I'd like to use the STM32Cube drivers, since they're high level and mature. 

My challenge is to make it compile together. 

Starting a fresh project, the toolchain gives me this (inside zip: ARM GCC BLANK PROJECT.png)

Them I add the paths to the STM32 drivers (highlighted top left) and included some headers, drove me to this error (inside zip: ARM GCC + STM32HAL 1.png), I've noted was because the #include ''stm32f30x_conf.h'' was missing, I've add and drove me to a much much bigger error: (inside zip: ARM GCC + STM32HAL 2.png) the compiler complains about redefined things.

I'm totally lost, I've just migrated from Microchip to STM32 (there things were easier, since they offer a built IDE, just install and go).

If I could talk to someone on chat or skype/hangouts would be very useful.

Greetings,

Renan

renanvalente
Associate II
Posted on October 22, 2014 at 00:14

Dear Mayla and Jasmin,

thanks for your replies,  here are the screen shots... 

[url=http://postimg.org/image/5nghyvhvh/][img]http://s30.postimg.org/5nghyvhvh/Screen_Shot_1.png[/img][/url]

[url=http://postimg.org/image/pglo1o177/][img]http://s13.postimg.org/pglo1o177/Screen_Shot_2.png[/img][/url]

[url=http://postimg.org/image/f97q304cz/][img]http://s13.postimg.org/f97q304cz/Screen_Shot_3.png[/img][/url]

[url=http://postimg.org/image/efqiwn8yb/][img]http://s13.postimg.org/efqiwn8yb/Screen_Shot_4.png[/img][/url]

[url=http://postimg.org/image/f9enswyf1/][img]http://s30.postimg.org/f9enswyf1/Screen_Shot_5.png[/img][/url]

[url=http://postimg.org/image/zf6mo5amr/][img]http://s13.postimg.org/zf6mo5amr/Screen_Shot_6_suite.png[/img][/url]

Can someone give me some tips how to usem STM32Cube with ARM NONE GCC EABI.