Dear All,
I'm currently working with last stable version of chibios (17.6.3) and chibistudio (preview 19).
What is hapenning is that if I launch chibistudio with "Chibi Studio GCC 4.7" shortcut everything goes smooth: 0 error 0 warning.
While when I've tried to build exactly the same project with "Chibi Studio GCC 6.3" I got: 0 warning but this linker error:
...
Compiling main.c
Linking build/ch.elf
c:/chibistudio/tools/gnu tools arm embedded/6.3 2017q1/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/lib/thumb/v7e-m\libg.a(lib_a-sbrkr.o): In function `_sbrk_r':
sbrkr.c:(.text._sbrk_r+0xc): undefined reference to `_sbrk'
collect2.exe: error: ld returned 1 exit status
have you ever experienced this issue?
thanks all, cheers,
Fede
Liking error only with GCC 6.3
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Liking error only with GCC 6.3
Hi,
This is caused by your application calling something in the C library that requires memory allocation, the library requires an implementation of sbrk() provided by the OS.
Under /os/various there is a syscalls.c module that, if added to the project, should fix the problem. It maps sbrk() on the ChibiOS core allocator.
Giovanni
This is caused by your application calling something in the C library that requires memory allocation, the library requires an implementation of sbrk() provided by the OS.
Under /os/various there is a syscalls.c module that, if added to the project, should fix the problem. It maps sbrk() on the ChibiOS core allocator.
Giovanni
Re: Liking error only with GCC 6.3
Dear Giovanni,
Thanks it solve the issue. But, just to understand, do you know why I need to add this file only with GCC 6.3 ?
Thanks again,
Fede
Thanks it solve the issue. But, just to understand, do you know why I need to add this file only with GCC 6.3 ?
Thanks again,
Fede
- Giovanni
- Site Admin
- Posts: 14457
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: Liking error only with GCC 6.3
Probably the old compiler included stub functions, this would not mean it would work.
Giovanni
Giovanni
Who is online
Users browsing this forum: No registered users and 11 guests