Page 1 of 1
GCC/ARM compiler issues?
Posted: Fri Jul 04, 2014 5:35 pm
by AndreyB
What's the word on the street on GCC for ARM compiler reliability? Are any versions better then?
I was chasing this red LED/fatal firmware error and it really looks like it is only reproducible with binaries created on the build server?! The build server -
http://crapcan-am.com:8080/job/rusEfi/lastBuild/console - currently has
gcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641] (GNU Tools for ARM Embedded Processors)
Speaking of which, what are we using on the build server? On Windows the GCC/arm compiler I am using is from Sourcery CodeBench Lite Edition, are there any other options on Windows?
I am totally confused by a number of different (?) yet all GCC (?) compilers.
Re: GCC/ARM compiler issues?
Posted: Fri Jul 04, 2014 5:54 pm
by puff
here I got
gcc version 4.7.4 20130913 (release) [ARM/embedded-4_7-branch revision 202601] (GNU Tools for ARM Embedded Processors)
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 8:26 am
by legath-t
Currently i have the same version on my PC
Code: Select all
arm-none-eabi-gcc -v
Using built-in specs.
COLLECT_GCC=arm-none-eabi-gcc
COLLECT_LTO_WRAPPER=/usr/bin/../lib/gcc/arm-none-eabi/4.8.3/lto-wrapper
Target: arm-none-eabi
Configured with: /build/buildd/gcc-arm-none-eabi-4-8-2013q4/src/gcc/configure --target=arm-none-eabi --prefix=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native --libexecdir=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/lib --infodir=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-languages=c,c++ --enable-plugins --disable-decimal-float --disable-libffi --disable-libgomp --disable-libmudflap --disable-libquadmath --disable-libssp --disable-libstdcxx-pch --disable-nls --disable-shared --disable-threads --disable-tls --with-gnu-as --with-gnu-ld --with-newlib --with-headers=yes --with-python-dir=share/gcc-arm-none-eabi --with-sysroot=/build/buildd/gcc-arm-none-eabi-4-8-2013q4/install-native/arm-none-eabi --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --with-pkgversion='GNU Tools for ARM Embedded Processors' --with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r
Thread model: single
gcc version 4.8.3 20131129 (release) [ARM/embedded-4_8-branch revision 205641] (GNU Tools for ARM Embedded Processors)
and all works fine.
i suggest to build code with -Werror and fix all. It will help
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 8:44 am
by puff
how long have you been testing it to claim everything works fine?
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 10:08 am
by AndreyB
legath-t wrote:i suggest to build code with -Werror and fix all. It will help
It's already there - in line 11:
https://sourceforge.net/p/rusefi/code/HEAD/tree/trunk/firmware/Makefile#l11
Unless this currently only applies to C and not to C++? In this case I need help fixing it...
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 11:05 am
by legath-t
I think this became wrong because we changed gcc options to hard fp but not to tell g++ about this.
locally i fix it in 3.0 port so it was works for me.
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 11:14 am
by AndreyB
Since we've just fixed the lack of FPU in c++ code who wants to try
rusefi_firmware_not_sure.zip?
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 11:36 am
by puff
i'll try it in an hour or so.
what this mess is all about? just to make our build server compile proper images, the same as iar? or make all compilers lead to the same stable result?
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 11:42 am
by AndreyB
puff wrote:what this mess is all about? make all compilers lead to the same stable result?
We never know where the bug is. If the bug is in the compiler used on the unix build server it's one thing, but it very well be that GCC on the build server is fine but we have an issue somewhere which is only visible under this particular version of the compiler - could be that some compilers are masking the issue and some are not. So, it's worth checking if we own this problem, not anyone else.
The issue that c++ code was not using FPU while c code was could very well be that issue on our side which was masked by all compilers but 4.8.3
Re: GCC/ARM compiler issues?
Posted: Mon Jul 07, 2014 2:07 pm
by puff
okay. launched 3916 not_sure version - so far works fine (but for the minor glitch with displaying rpm change in devconsole: its not updated for some reason if the delta is smaller than 50 rpm?) - inj duration is fixed, got some readings in analogue sniffer. will leave it working for some time.
Re: GCC/ARM compiler issues?
Posted: Tue Jul 08, 2014 11:54 am
by AndreyB
Looks like the root cause of the issue we were having while using the whatever version of the compiler installed on the unix build server was about using hardware FPU by the C compiler and using software floating point by C++ compiler. Thank you
@ for fixing the Makefile, now both C and C++ are using the FPU and this seems to have resolved the issue!