I finally found the time to update my project to the latest ChibiOS (21.11.x) and I'd like to thank you all for looking at the topic. Unfortunately though, I am having issues with the new stubs.
I get the following error message from ld:
Code: Select all
Linking /home/thomas/work/AMiRo/AMiRo-OS/modules/DiWheelDrive_1-2/build/DiWheelDrive_1-2.elf
/home/thomas/Software/gcc-arm-embedded/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: /home/thomas/Software/gcc-arm-embedded/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc.a(lib_a-signalr.o): in function `_kill_r':
signalr.c:(.text._kill_r+0x0): multiple definition of `_kill_r'; /home/thomas/work/AMiRo/AMiRo-OS/modules/DiWheelDrive_1-2/build/obj/syscalls.o (symbol from plugin):(.text+0x0): first defined here
However, I could resolve the issue by a small change to syscalls.c:
Code: Select all
--- a/os/various/syscalls.c
+++ b/os/various/syscalls.c
@@ -193,11 +193,18 @@ void _exit(int status) {
/***************************************************************************/
-__attribute__((used))
-int _kill_r(struct _reent *r, int pid, int sig) {
- (void) pid;
- (void) sig;
- __errno_r(r) = EINVAL;
- return -1;
-}
+__attribute__((used))
+int _kill(int pid, int sig) {
+ (void) pid;
+ (void) sig;
+ return -1;
+}
/***************************************************************************/
I basically replaced the new _kill_r() function by the old _kill() method. I have no idea if this is an actual fix or rather a workaround. Maybe the issue with my project is something entirely different (but I have no clue what that could be).
Any comments/help appreciated!
- Thomas