cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Nucleo 103RB GNU enviroment problem

Posted on March 12, 2014 at 08:08

The original post was too long to process during our migration. Please click on the attachment to read the original post.
6 REPLIES 6
chen
Associate II
Posted on March 12, 2014 at 16:49

Hi

''

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

''

The compiler is saying that it has come across something it does not understand and has lost track of the current 'line'/statement.

It is something in the ''

core_cmInstr.h

'' header file.

I usually see this when there is a variable type (eg uint32_t) that the compiler does not know about.

(uint32_t is not a built in type in C, it is sometimes defined in stdint.h but this depends on the environment!)

Posted on March 12, 2014 at 23:18

To be honest i have no idea where are the actual variables that the compiler cannot find defined...

I have attached the file you mentioned. I tried defining __GNU__ (but the compiler said its a redefinition and then tried __thumb__, but that havent helped.

May i ask you for some further help?

________________

Attachments :

core_cmInstr.h : https://st--c.eu10.content.force.com/sfc/dist/version/download/?oid=00Db0000000YtG6&ids=0680X000006HzrG&d=%2Fa%2F0X0000000bQR%2FozxfjW4bf0VYFKiQC1WuMo3EX98zP8ETY48mvgEYPq4&asPdf=false
Posted on March 13, 2014 at 00:11

You'd want to look at RiDE or Atollic projects, and review the defines, and paths they use.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
frankmeyer9
Associate II
Posted on March 13, 2014 at 08:49

''

error: expected '=', ',', ';', 'asm' or '__attribute__' before 'void'

''

I came across similiar problems when the toolchain is not properly defined/identified during the build process.

Looking at those core_xxx.h files, they contain macros and intrinsics, enclosed in #ifdefs for several different toolchains like Keil MDK, IAR, and gcc (with differing syntax).

stm322399
Senior
Posted on March 13, 2014 at 10:25

I don't knwo how you can fix it in the build system you are using, but '-ansi' option on the command line is the root of your problem. Kick it away.

Posted on April 28, 2014 at 08:11

I have removed the ''-ansi'' option, now the error is different:

A:\Dropbox\programowanie\slickedit\stm32nuc>A: & cd A:\Dropbox\programowanie\slickedit\stm32nucA:\Dropbox\programowanie\slickedit\stm32nuc>echo VSLICKERRORPATH=''A:\Dropbox\programowanie\slickedit\stm32nuc''VSLICKERRORPATH=''A:\Dropbox\programowanie\slickedit\stm32nuc''A:\Dropbox\programowanie\slickedit\stm32nuc>''C:\Program Files\SlickEditV18.0.1 x64\win\vsbuild'' -signal 49643 -command make -f ''makefile'' rebuild CFG=Debug VSLICKERRORPATH=''A:\Dropbox\programowanie\slickedit\stm32nuc''make -f makefile rebuild CFG=Debug rm -f Debug/stm32nuc.exerm -f Debug/main.o Debug/startup_stm32f10x_md.o Debug/stm32f1xx_it.o Debug/system_stm32f10x.o arm-none-eabi-gcc -c ''-DSTM32F10X_LD'' -g -c -mthumb -mcpu=cortex-m3 -mfix-cortex-m3-ldrd -o ''Debug/main.o'' -IA:/Dropbox/programowanie/slickedit/stm32nuc/ -IA:/Dropbox/programowanie/slickedit/stm32nuc/inc -IA:/Dropbox/programowanie/slickedit/stm32nuc/Include -IA:/Dropbox/programowanie/slickedit/stm32nuc/src -IA:/Dropbox/programowanie/slickedit/stm32nuc/stm32f1xx main.carm-none-eabi-gcc -x assembler-with-cpp -c -mcpu=cortex-m3 -ggdb ''-DSTM32F10X_LD'' -o ''Debug/startup_stm32f10x_md.o'' -IA:/Dropbox/programowanie/slickedit/stm32nuc/ -IA:/Dropbox/programowanie/slickedit/stm32nuc/inc -IA:/Dropbox/programowanie/slickedit/stm32nuc/Include -IA:/Dropbox/programowanie/slickedit/stm32nuc/src -IA:/Dropbox/programowanie/slickedit/stm32nuc/stm32f1xx ''startup_stm32f10x_md.s''startup_stm32f10x_md.s:1:0: error: target CPU does not support ARM mode ;******************** (C) COPYRIGHT 2013 STMicroelectronics ******************** ^make.EXE: *** [Debug/startup_stm32f10x_md.o] Error 1

This is the first line of my startup while