Page 1 of 1

compiling error

Posted: Wed Nov 02, 2016 8:22 pm
by aymane
hello

i am new with chibios developement tools, as i work often with keil uvision.
but i want to try chibios.

i have a project for stm32f429 discovery board made with eclipse, i am trying to compile it
but i have the same error:

20:07:22 **** Build of configuration Debug for project SineWave ****
make all
Building file: ../system/src/stm32f4xx/stm32f4xx_hal.c
Invoking: Cross ARM C Compiler
arm-none-eabi-gcc -mcpu=cortex-m4 -mthumb -Og -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -ffreestanding -fno-move-loop-invariants -Wall -Wextra -g3 -DDEBUG -DARM_MATH_CM4 -DUSE_STM32_CUBE_LIB -DSTM32F429xx -DUSE_HAL_DRIVER -DTRACE -I"../include" -I"../system/include" -I"../system/include/cmsis" -I"../system/include/stm32f4xx" -std=gnu11 -MMD -MP -MF"system/src/stm32f4xx/stm32f4xx_hal.d" -MT"system/src/stm32f4xx/stm32f4xx_hal.o" -c -o "system/src/stm32f4xx/stm32f4xx_hal.o" "../system/src/stm32f4xx/stm32f4xx_hal.c"
cc1.exe: error: argument to '-O' should be a non-negative integer
make: *** [system/src/stm32f4xx/stm32f4xx_hal.o] Error 1

20:07:24 Build Finished (took 1s.529ms)

is there any setting to made for not having this error.

thanks.

Re: compiling error

Posted: Wed Nov 02, 2016 8:27 pm
by Giovanni
Hi

"-Og" is not a valid optimization level for the GCC version you are using. Try -O2 or -O0.

Giovanni

Re: compiling error

Posted: Wed Nov 02, 2016 8:38 pm
by aymane
hello

thanks for the response.

how can i resolve this problem?

thanks.

Re: compiling error

Posted: Wed Nov 02, 2016 9:03 pm
by Giovanni
Change it where your compiler options are in your project, I cannot know. It could be a Makefile or Eclipse project properties, it depends on how your project is setup.

Giovanni

Re: compiling error

Posted: Wed Nov 02, 2016 9:49 pm
by aymane
i tried to make some chages in the makefile but the settings stills the same after
rebuilding the project.

thanks.