Page 2 of 2

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 5:48 pm
by robu
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

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 6:01 pm
by mabl
Those are missing newlib stubs. Try to include syscall.c/h in your makefile. It's provided with ChibiOS

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 6:07 pm
by robu
I already did, before I had 6 error messages, the syscall.c reduced to 3. Where else can I find this functions?

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 6:12 pm
by mabl
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?

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 6:19 pm
by Prof. Dr. YoMan
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. :)

Re: What is the equavalint code of the memmory allocation

Posted: Thu Nov 29, 2012 6:27 pm
by robu
Thanks mabi, this is working.