RT-STM32F407-DISCOVERY build error

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

Moderator: RoccoMarco

Post Reply
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

RT-STM32F407-DISCOVERY build error

Post 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
saraben
Posts: 40
Joined: Thu Sep 20, 2012 12:37 am

Re: RT-STM32F407-DISCOVERY build error

Post 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
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: RT-STM32F407-DISCOVERY build error

Post 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
User avatar
alex31
Posts: 445
Joined: Fri May 25, 2012 10:23 am
Has thanked: 57 times
Been thanked: 88 times

Re: RT-STM32F407-DISCOVERY build error

Post 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
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: RT-STM32F407-DISCOVERY build error

Post 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
User avatar
russian
Posts: 368
Joined: Mon Oct 29, 2012 3:17 am
Has thanked: 16 times
Been thanked: 14 times

Re: RT-STM32F407-DISCOVERY build error

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

Re: RT-STM32F407-DISCOVERY build error

Post 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
Post Reply