Page 1 of 1

Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 2:55 am
by phiatt
While trying to compile the source code, I get this error;

Code: Select all

Compiling chschd.c
ChibiOS3/os/rt/src/chschd.c: In function 'wakeup':
ChibiOS3/os/rt/src/chschd.c:290:5: error: this statement may fall through [-Werror=implicit-fallthrough=]
     chSemFastSignalI(tp->p_u.wtsemp);
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ChibiOS3/os/rt/src/chschd.c:294:3: note: here
   case CH_STATE_WTCOND:
   ^~~~
cc1.exe: all warnings being treated as errors
make: *** [ChibiOS3/os/common/ports/ARMCMx/compilers/GCC/rules.mk:218: build/obj/chschd.o] Error 1
Has anyone seen this before? This happens with regardless invoking make from command or in Eclipse; windoze or Linux.

Re: Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 3:01 am
by AndreyB
Eclipse is an IDE, it's like a cool notepad.
make is build automation tool.
it looks like the error you are publishing comes from a compiler. which compiler? are you building firmware or simulator?

Re: Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 3:09 am
by phiatt
Yes I am aware, Thank you for the clarification.

I am using gcc-arm-none-eabi-7-2017-q4-major.

Re: Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 3:16 am
by phiatt
I apologize, building firmware.

Re: Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 3:25 am
by AndreyB
Thank you for reporting https://github.com/rusefi/rusefi/issues/517 !

Looks like a new option "-Wno-error=implicit-fallthrough" should be specific in Makefile - see https://github.com/rusefi/rusefi/commit/a8aaca866d94d673eaddd3b4d32cbbacf92bb7a0

I guess I should migrate to latest compiler on all my devices and make this official, but not today.

Re: Compile error using make or Eclipse

Posted: Fri Dec 22, 2017 3:51 am
by phiatt
Cool, Thanks for the help. I'll give it a go.