Page 1 of 1

RT-STM32F407-DISCOVERY build error

Posted: Sat Apr 19, 2014 12:53 am
by Tectu
Hi Giovanni,

I wanted to give ChibiOS/RT 3.x a try and therefore I checked out the kernel_3_dev branch. I tried to compile the RT-STM32F407-DISCOVERY demo but I ended up with a kind of error that I've never seen before:

Code: Select all

main.c: In function 'Thread1':
main.c:36:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^
Linking build/ch.elf
main.c: In function 'main':
main.c:41:5: internal compiler error: Segmentation fault
 int main(void) {
     ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
lto-wrapper: arm-none-eabi-gcc returned 1 exit status
c:/program files (x86)/gnu tools arm embedded/4.8 2014q1/bin/../lib/gcc/arm-none-eabi/4.8.3/../../../../arm-none-eabi/bin/ld.exe: lto-wrapper failed
collect2.exe: error: ld returned 1 exit status
make: *** [build/ch.elf] Error 1

Any ideas? I'm compiling on Windows 8.1 using cygwin and the GNU ARM GCC compiler. However, I don't expect this to be the problem as all the 2.6.3 demos compile without any problems. Can you compile the demo?


~ Tectu

Re: RT-STM32F407-DISCOVERY build error

Posted: Sat Apr 19, 2014 1:36 am
by saraben
Tectu,
I note that you are using gcc-arm-none-eabi-4_8-2014q1.
I have noticed that LTO appears to be a problem with V3 demos with this version on Linux. I have turned it off for now.
There does not appear to be an issues with gcc-arm-none-eabi-4_7-2013q3.
Haven't had time to look any closer.

saraben

Re: RT-STM32F407-DISCOVERY build error

Posted: Sat Apr 19, 2014 1:20 pm
by Tectu
Thank you very much saraben. I disabled LTO and I can now successfully build the demo using gcc-arm-none-eabi-4_8-2014q1.


~ Tectu

Re: RT-STM32F407-DISCOVERY build error

Posted: Mon Apr 21, 2014 10:29 am
by alex31
there is a bug with gcc-arm-none-eabi-4_8-2014q1 which prevent to use -flto and -gddb together.

For tuning, you can disable flto and enable gddb.

For performance, enable flto and disable gddb.

Alexandre

Re: RT-STM32F407-DISCOVERY build error

Posted: Mon Apr 21, 2014 11:30 am
by Tectu
alex31 wrote:there is a bug with gcc-arm-none-eabi-4_8-2014q1 which prevent to use -flto and -gddb together.

Good information, thank you very much!


~ Tectu

Re: RT-STM32F407-DISCOVERY build error

Posted: Wed Mar 22, 2017 1:11 pm
by russian
alex31 wrote:there is a bug with gcc-arm-none-eabi-4_8-2014q1 which prevent to use -flto and -gddb together.

I know this is old thread and this is maybe less relevant for Chibios 3+ but https://bugs.launchpad.net/gcc-arm-embe ... ug/1674525

Re: RT-STM32F407-DISCOVERY build error

Posted: Wed Mar 22, 2017 4:56 pm
by Giovanni
Thanks for sharing that bug, interesting.

I implemented a workaround but it is good they are aware of it (I should look at commits, I don't remember which workaround exactly).

Giovanni