What is the equavalint code of the memmory allocation

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: What is the equavalint code of the memmory allocation

Postby robu » Thu Nov 29, 2012 5:48 pm

Thank you very much for your answer,

I tried your solution, now I'm getting the following errors:

Code: Select all

make all
Linking build/ch.elf
/opt/arm_gcc/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-abort.o): In function `abort':
abort.c:(.text+0x10): undefined reference to `_exit'
/opt/arm_gcc/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text+0x1c): undefined reference to `_kill'
/opt/arm_gcc/bin/../lib/gcc/arm-none-eabi/4.7.2/../../../../arm-none-eabi/lib/libc.a(lib_a-signalr.o): In function `_getpid_r':
signalr.c:(.text+0x44): undefined reference to `_getpid'
collect2: error: ld returned 1 exit status
make: *** [build/ch.elf] Error 1


Which library do I have to include to solve this error? I also posted on the stackexchange but I haven't receive any good answer yet.

Thank you.
Robert

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: What is the equavalint code of the memmory allocation

Postby mabl » Thu Nov 29, 2012 6:01 pm

Those are missing newlib stubs. Try to include syscall.c/h in your makefile. It's provided with ChibiOS

robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: What is the equavalint code of the memmory allocation

Postby robu » Thu Nov 29, 2012 6:07 pm

I already did, before I had 6 error messages, the syscall.c reduced to 3. Where else can I find this functions?

mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Location: Karlsruhe, Germany
Been thanked: 1 time
Contact:

Re: What is the equavalint code of the memmory allocation

Postby mabl » Thu Nov 29, 2012 6:12 pm

Have a look here:

viewtopic.php?f=2&t=793&p=7778#p7762

Giovanni, i guess we should really look into extending the stubs properly... Prof. Yo Man, didn't you look into this already?

User avatar
Prof. Dr. YoMan
Posts: 57
Joined: Thu May 24, 2012 11:00 am
Been thanked: 1 time

Re: What is the equavalint code of the memmory allocation

Postby Prof. Dr. YoMan » Thu Nov 29, 2012 6:19 pm

Well, what I posted in one thread is the maximum to do, when you want correct locking without recompiling newlib.
To do it right, there should be a recompiled newlib especially for ChibiOS (using chmalloc, ... correct locking, ... maybe more POSIX stuff), which would be a major effort for all supported plattforms.
I decided to live with the drawbacks and to use my mind to not fall into pitfalls. :)

robu
Posts: 25
Joined: Sat Nov 24, 2012 3:39 pm

Re: What is the equavalint code of the memmory allocation

Postby robu » Thu Nov 29, 2012 6:27 pm

Thanks mabi, this is working.


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 39 guests