Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Failure to compile using arm-none-eabi from crossdev
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
epenguin
n00b
n00b


Joined: 07 Dec 2021
Posts: 25
Location: US

PostPosted: Mon Feb 14, 2022 3:32 pm    Post subject: Failure to compile using arm-none-eabi from crossdev Reply with quote

Here are the instructions I used to generate the toolchain: https://wiki.gentoo.org/wiki/How_to_build_a_toolchain_for_arm_cortex-m_and_cortex-r . This wiki contains instructions for building a really low footprint toolchain for cortex-m and cortex-r, but I've had a few issues with it.

When compiling this project:
https://github.com/blackmagic-debug/blackmagic

Here is the result:
https://dpaste.com/948Z296GQ

Specifically:
Code:
/usr/libexec/gcc/arm-none-eabi/ld: /usr/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(lib_a-chk_fail.o): in function `__chk_fail':
chk_fail.c:(.text.__chk_fail+0x3e): undefined reference to `_exit'
/usr/libexec/gcc/arm-none-eabi/ld: /usr/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(lib_a-signalr.o): in function `_kill_r':
signalr.c:(.text._kill_r+0xe): undefined reference to `_kill'
/usr/libexec/gcc/arm-none-eabi/ld: /usr/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(lib_a-signalr.o): in function `_getpid_r':
signalr.c:(.text._getpid_r+0x0): undefined reference to `_getpid'
/usr/libexec/gcc/arm-none-eabi/ld: /usr/lib/gcc/arm-none-eabi/11.2.1/../../../../arm-none-eabi/lib/thumb/v7-m/nofp/libc_nano.a(lib_a-writer.o): in function `_write_r':
writer.c:(.text._write_r+0x10): undefined reference to `_write'
collect2: error: ld returned 1 exit status
make[1]: *** [platforms/native/Makefile.inc:35: blackmagic_dfu.elf] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:17: all] Error 2


It would honestly be extremely convenient and preferable to just use the toolchain provided by arm. The gentoo wiki instructions I've linked above seem to imply it cuts a lot of the fat off and provides "a functioning multilib / multiarch for embedded arm development with small code output size". While this option is nice to have, it would be preferable to have a toolchain that can guarantee compatibility with as many cortex m and r devices as possible like the toolchain provided by arm. The reason I don't just use the one from arm is because for some reason (and if you know the reason I would also love to know why, sincerely) they compile gdb with ncurses 5 so I always get this error when using their provided arm-none-eabi-gdb:

Code:
error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory


I know of a million little hacks to fix this, but this has been around for years and whoever maintains the toolchain at arm already knows about this and doesn't care so I'd really love to get crossdev working to produce a stable embedded arm toolchain.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum