Minimal GNU Arm Toolchain?

Programming, for all ages and all languages.
Post Reply
nullpointer
Posts: 8
Joined: Sat Jun 29, 2019 8:58 am

Minimal GNU Arm Toolchain?

Post by nullpointer »

Hi all,
The complete installation of the GNU ARM Toolchain is over 400MB.
1- There are many folders : arm-none-eab, bin, lib, include, libexec and share.
What are those folders for? Can you please give me a short description of the files in each folder?
2- I want to strip down the toolchain to keep just a simple compiler-linker-objdump toolchain. What are the bare minimum folders and files I need to build C programs for cortex M3 and M4F?
3- How to know which C library is used by the toolchain (uclibc, newlib, newlib_nano, ...)? And how to replace it with another one?
Thanks
User avatar
eekee
Member
Member
Posts: 872
Joined: Mon May 22, 2017 5:56 am
Location: Kerbin
Discord: eekee
Contact:

Re: Minimal GNU Arm Toolchain?

Post by eekee »

Hiya! I can answer some of this, and I've had quite some experience with seeking simplicity too.
nullpointer wrote:Hi all,
The complete installation of the GNU ARM Toolchain is over 400MB.
1- There are many folders : arm-none-eab, bin, lib, include, libexec and share.
What are those folders for? Can you please give me a short description of the files in each folder?
bin — Literally "binary", but in Unix culture it means "executable programs". Ideally, should contain only those programs meant to be launched by the shell.

lib — "Library"; common code & data, but nowadays supposed to only contain code libraries for linking. (There's often other stuff in there.)

share — Architecture-independent common data, such as text and image files.

libexec — Sometimes, an application is implemented as multiple programs but is launched as if it is a single program. The one program goes in bin, the others are supposed to go in libexec. They're sometimes installed to lib instead as libexec is the newest of these standard folders and everything always worked fine without it.

include — C & C++ header files. This one is exactly what it says on the tin.

arm-none-eab — Files specific to that target. May have another set of bin, lib, etc. folders inside it, possibly with include, probably not share. "eab" specifies the ABI.

nullpointer wrote:2- I want to strip down the toolchain to keep just a simple compiler-linker-objdump toolchain. What are the bare minimum folders and files I need to build C programs for cortex M3 and M4F?
I suggest not doing this as it's so easy to break the whole package or break features some other program wants. I used to try to strip down bloated software, but in the end decided it was much better to just ignore the features I didn't need, treating the contents of packages as black boxes when possible. If someone who knows the toolchain tells you which parts you can remove, maybe it'll be all right.

nullpointer wrote:3- How to know which C library is used by the toolchain (uclibc, newlib, newlib_nano, ...)? And how to replace it with another one?
Thanks
That, I'll have to leave for someone else. :)
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
nullpointer
Posts: 8
Joined: Sat Jun 29, 2019 8:58 am

Re: Minimal GNU Arm Toolchain?

Post by nullpointer »

thanks eekee for your reply and the interresting infos you provided.
Post Reply