compiling error

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

Post Reply
aymane
Posts: 3
Joined: Wed Nov 02, 2016 8:10 pm

compiling error

Post 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.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: compiling error

Post by Giovanni »

Hi

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

Giovanni
aymane
Posts: 3
Joined: Wed Nov 02, 2016 8:10 pm

Re: compiling error

Post by aymane »

hello

thanks for the response.

how can i resolve this problem?

thanks.
User avatar
Giovanni
Site Admin
Posts: 14893
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 997 times

Re: compiling error

Post 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
aymane
Posts: 3
Joined: Wed Nov 02, 2016 8:10 pm

Re: compiling error

Post by aymane »

i tried to make some chages in the makefile but the settings stills the same after
rebuilding the project.

thanks.
Post Reply