GCC/ARM compiler issues?

It's all about the code!
Post Reply
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

GCC/ARM compiler issues?

Post 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.
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: GCC/ARM compiler issues?

Post 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)
legath-t
contributor
contributor
Posts: 10
Joined: Mon Jun 23, 2014 6:48 pm
Location: Ryazan

Re: GCC/ARM compiler issues?

Post 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
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: GCC/ARM compiler issues?

Post by puff »

how long have you been testing it to claim everything works fine?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: GCC/ARM compiler issues?

Post 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...
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
legath-t
contributor
contributor
Posts: 10
Joined: Mon Jun 23, 2014 6:48 pm
Location: Ryazan

Re: GCC/ARM compiler issues?

Post 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.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: GCC/ARM compiler issues?

Post by AndreyB »

Since we've just fixed the lack of FPU in c++ code who wants to try rusefi_firmware_not_sure.zip?
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: GCC/ARM compiler issues?

Post 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?
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: GCC/ARM compiler issues?

Post 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
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
puff
contributor
contributor
Posts: 2961
Joined: Mon Nov 11, 2013 11:28 am
Location: Moskau

Re: GCC/ARM compiler issues?

Post 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.
User avatar
AndreyB
Site Admin
Posts: 14292
Joined: Wed Aug 28, 2013 1:28 am
Location: Jersey City
Github Username: rusefillc
Slack: Andrey B

Re: GCC/ARM compiler issues?

Post 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!
Very limited telepathic abilities - please post logs & tunes where appropriate - http://rusefi.com/s/questions

Always looking for C/C++/Java/PHP developers! Please help us see https://rusefi.com/s/howtocontribute
Post Reply