cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 project in Coo-cox with GNU Tools ARM Embedded

Md Mubdiul Hasan
Associate III
Posted on December 06, 2016 at 01:57

Dear All,

I want to have attention those who has experience on using coo-coox, I am writing here because coo-cox forum does not respond for successful logon.

My board is custom one build with centered 32F070RBTx,

The version is

CooCox CoIDE

Version: 1.7.8

Along withGNU Tools ARM Embedded\4.7 2012q4\bin, the following errors take place ,

[cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wall -ffunction-sections -g -O0 -c ''-DC:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\bin'' -IC:\STM32_toolchain\Workspace\Source_bak\cmsis_boot -

[cc] from C:\STM32_toolchain\Workspace\Source_bak\common\Inc/stm32f0xx_hal_conf.h:184,

[cc] from C:\STM32_toolchain\Workspace\Source_bak\common\Drivers\STM32F0xx_HAL_Driver\Inc/stm32f0xx_hal.h:48

[cc] C:\STM32_toolchain\Workspace\Source_bak\components\coocox-master\cmsis_core\source/core_cm0.h:214:14: error: 'Program' undeclared here (not in a function)

[cc] C:\STM32_toolchain\Workspace\Source_bak\components\coocox-master\cmsis_core\source/core_cm0.h:214:5: error: bit-field '<anonymous>' width not an integer constant

[cc] C:\STM32_toolchain\Workspace\Source_bak\components\coocox-master\cmsis_core\source/core_cm0.h:214:14: error: expected ',', ';' or '}' before 'Files'

[cc] C:\STM32_toolchain\Workspace\Source_bak\components\coocox-master\cmsis_core\source/core_cm0.h:214:14: error: stray '\' in program

[cc] C:\STM32_toolchain\Workspace\Source_bak\components\coocox-master\cmsis_core\source/core_cm0.h:214:14: error: stray '\' in program

1. Does it a problem for wrong version selection for CMSIS?

2. Is it a linking problem?

3. Do you want me to change build configuration and include all HAL library ? My device package is not available in Configuration database of Coo-cox.

KIndly take a look this view.0690X00000605joQAA.png

#coide #gnu-tools-arm-embedded #hal-libraries

Note: this post was migrated and contained many threaded conversations, some content may be missing.
1 ACCEPTED SOLUTION

Accepted Solutions
Posted on December 06, 2016 at 03:59

The image is pretty much unreadable, but why have a define for the binary software path? What does that do?

The error says [cc] so it is clearly an error from the compiler, not the linker.

You are using a Cortex-M0 part, not an M3

CooCox have been out of business for a while, and their support has always been a bit sketchy.

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

View solution in original post

14 REPLIES 14
Posted on December 06, 2016 at 02:57

I gave up on CoIDE about a year or two ago and switched to SW4STM32.  My main reason was what you are seeing, ie; no one is supporting the tool and I think fewer and fewer people are using it.

I'd suggest, if you need free unlimited code size tools, SW4STM32 is good, and I hear Atollic TrueStudio Lite is similar.  If you can live with small code size constraints Keil and EWARM are very good as well.  Stop torturing yourself with tools that don't work.

Posted on December 06, 2016 at 03:59

The image is pretty much unreadable, but why have a define for the binary software path? What does that do?

The error says [cc] so it is clearly an error from the compiler, not the linker.

You are using a Cortex-M0 part, not an M3

CooCox have been out of business for a while, and their support has always been a bit sketchy.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on December 06, 2016 at 05:12

Thank you sir Clive1.

Kindly click the image!

As I told you previous post.

ARMCC can not compile my mdk-keil (while trying migrate coocox project to mdk-keil-uvision )for different standard file.

I manage to fail in Ecilipse also.

Kindly, give me a way to carry that project. 

Posted on December 06, 2016 at 05:29

Dear Sir AAron,

Thank you to take part in this post.

SW4STM32  is Eclipse base , isnt  it?

I am really disappointing to build my project in Keil, Coo-cox, Eclipse !

Instead of version update,  my dependencies and states files cant support different compiler.

Do you want me to apply 

Atollic TrueStudio Lite?

Regards

Hasan

Posted on December 06, 2016 at 11:23

CoIDE was started from Eclipse a long time ago but is mostly unrecognizable as such.  SW4STM is based on Eclipse as well, but is completely pre-configured like CoIDE (actually more so since it includes the GCC tools already integrated, you don't have to do a separate installation of the eabi toolset).

I'm not sure what you mean by '

my dependencies and states files cant support different compiler' however CoIDE uses the GCC toolchain which includes the Gnu GCC compiler, GDB etc.  SW4STM32, Keil and Atollic TruStudio are also based on this toolset so compiler and assembler directives should be consistent.

Best of luck

Posted on December 07, 2016 at 05:44

0690X00000605m4QAA.pngDear Sir Clive1,

I have build the actual coo-cox project without any alteration,

For this time its shows,

GCC HOME: C:\Program Files (x86)\GNU Tools ARM Embedded\4.7 2012q4\bin

compile:

[mkdir] Skipping C:\STM32_toolchain\Workspace\cooker_2016\rice_baker\Debug\bin because it already exists.

[mkdir] Skipping C:\STM32_toolchain\Workspace\cooker_2016\rice_baker\Debug\obj because it already exists.

[cc] 31 total files to be compiled.

[cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -Wall -ffunction-sections -g -O3 -c -DSTM32F070xB ''-IC:\STM32_toolchain\Workspace\cooker_2016\key driver'' -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Inc ''-IC:\STM32_toolchain\Workspace\cooker_2016\key driver\key'' -IC:\STM32_toolchain\Workspace\cooker_2016\states -IC:\STM32_toolchain\Workspace\cooker_2016\command -IC:\STM32_toolchain\Workspace\cooker_2016 -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS\Device\ST -IC:\STM32_toolchain\Workspace\cooker_2016\common\Inc -IC:\STM32_toolchain\Workspace -IC:\STM32_toolchain\Workspace\cooker_2016\io_utils -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS\Device\ST\STM32F0xx\Include -IC:\STM32_toolchain\Workspace\cooker_2016\common -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS\Include -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver -IC:\STM32_toolchain\Workspace\cooker_2016\flash\app -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS\Device\ST\STM32F0xx ''-Ic:\program files (x86)\gnu tools arm embedded\5.4 2016q2\arm-none-eabi\include'' -IC:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Inc\Legacy -IC:\STM32_toolchain\Workspace\cooker_2016\flash C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\spi.c '''C:\STM32_toolchain\Workspace\cooker_2016\key driver\key\hs_key_handle.c''' C:\STM32_toolchain\Workspace\cooker_2016\common\Src\i2c.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\tim.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_spi_ex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\main.c C:\STM32_toolchain\Workspace\cooker_2016\io_utils\io_util.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_rcc_ex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\gpio.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash_ex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_dma.c C:\STM32_toolchain\Workspace\Source_bak\common\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc\startup_stm32f070xb.s C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_cortex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_spi.c C:\STM32_toolchain\Workspace\cooker_2016\flash\app\flash_conf.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c.c C:\STM32_toolchain\Workspace\cooker_2016\states\global.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\stm32f0xx_hal_msp.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_flash.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_i2c_ex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\system_stm32f0xx.c C:\STM32_toolchain\Workspace\cooker_2016\common\Src\stm32f0xx_it.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_pwr_ex.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim_ex.c C:\STM32_toolchain\Workspace\cooker_2016\states\main_state.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_tim.c C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c C:\STM32_toolchain\Workspace\cooker_2016\common\Drivers\STM32F0xx_HAL_Driver\Src\stm32f0xx_hal_gpio.c

[cc] C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c: In function 'seg_seq_control':

[cc] C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c:121:20: warning: 'pre_gpio_group' may be used uninitialized in this function [-Wmaybe-uninitialized]

[cc] C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c:134:22: warning: 'gpio_group' may be used uninitialized in this function [-Wmaybe-uninitialized]

[cc] C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c:121:20: warning: 'pre_gpio_pin' may be used uninitialized in this function [-Wmaybe-uninitialized]

[cc] C:\STM32_toolchain\Workspace\cooker_2016\states\sevenseg_state.c:134:22: warning: 'gpio_pin' may be used uninitialized in this function [-Wmaybe-uninitialized]

[cc] Starting link

[cc] arm-none-eabi-gcc -mcpu=cortex-m3 -mthumb -g -Wl,-Map=RICE_BAKER.map -O3 -Wl,--gc-sections -LC:\CooCox\CoIDE\configuration\ProgramData\RICE_BAKER -Wl,-TC:\CooCox\CoIDE\configuration\ProgramData\RICE_BAKER/arm-gcc-link.ld -g -o RICE_BAKER.elf ..\obj\stm32f0xx_hal_pwr.o ..\obj\spi.o ..\obj\hs_key_handle.o ..\obj\i2c.o ..\obj\stm32f0xx_hal_rcc.o ..\obj\tim.o ..\obj\stm32f0xx_hal.o ..\obj\stm32f0xx_hal_spi_ex.o ..\obj\main.o ..\obj\io_util.o ..\obj\stm32f0xx_hal_rcc_ex.o ..\obj\gpio.o ..\obj\stm32f0xx_hal_flash_ex.o ..\obj\stm32f0xx_hal_dma.o ..\obj\startup_stm32f070xb.o ..\obj\stm32f0xx_hal_cortex.o ..\obj\stm32f0xx_hal_spi.o ..\obj\flash_conf.o ..\obj\stm32f0xx_hal_i2c.o ..\obj\global.o ..\obj\stm32f0xx_hal_msp.o ..\obj\stm32f0xx_hal_flash.o ..\obj\stm32f0xx_hal_i2c_ex.o ..\obj\system_stm32f0xx.o ..\obj\stm32f0xx_it.o ..\obj\stm32f0xx_hal_pwr_ex.o ..\obj\stm32f0xx_hal_tim_ex.o ..\obj\main_state.o ..\obj\stm32f0xx_hal_tim.o ..\obj\sevenseg_state.o ..\obj\stm32f0xx_hal_gpio.o

[cc] ..\obj\startup_stm32f070xb.o: In function `LoopForever':

[cc] C:\STM32_toolchain\Workspace\Source_bak\common\Drivers\CMSIS\Device\ST\STM32F0xx\Source\Templates\gcc/startup_stm32f070xb.s:67: undefined reference to `_estack'

[cc] ..\obj\startup_stm32f070xb.o:(.isr_vector+0x0): undefined reference to `_estack'

[cc] collect2.exe: error: ld returned 1 exit status

BUILD FAILED

Total time: 7 seconds

Kindly take a look whole console and suggest me what should I do.

Dont you think,

1. #include should be add in

sevenseg_state.c?

2. What should I look for in output files?

3. collect2.exe: error, is talking what?

4. Did you see CMSIS errors are disappear?

At the same time the problem log shows,

Regards

Hasan

________________

Attachments :

warning_error.PNG : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006Hz3V&d=%2Fa%2F0X0000000bFv%2FyqTstBFDfR7j64nscnbLMOop2F0kw7JslCNfagAB770&asPdf=false
Liviu Ionescu
Associate III
Posted on December 07, 2016 at 09:07

I suggest you give Eclipse one more chance and try

http://gnuarmeclipse.github.io

. follow the install steps by the book until you run the F4 blinky application on QEMU, and you'll have a fully functional environment.
Posted on December 08, 2016 at 02:55

Dear Sir Liviu Ionescu,

Could you kindly explain its benefit ?

Isn't  it using ARM Embedded Processors?

Posted on December 08, 2016 at 08:10

It does use the arm-none-eabi-gcc, but it allows you to use any toolchain version you want, even to install multiple versions at the same time and chose one per project.

And the project creation wizard does support STM32F0 directly.

BTW, in your case the compile errors might be caused by the wrong selection of the device, F0 is a Cortex-M0 not a Cortex-M3.

As for the benefits of using Eclipse, the short answer is 'the indexer'. There is no other IDE with a better knowledge of your program than Eclipse, and as such it helps you view your programs better, it greys unused sequences of code, it shows the function definitions on mouse over, etc.