Hi all,
The complete installation of the GNU ARM Toolchain is over 400MB.
And is growing up with each version
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?
The most big directory is arm-none-eabi directory that contains all libraries for all variants (this is the real reazon of the grow with each version)
Specifically the directory
arm-none-eabi/lib/thumb/ that contains all new cortex-m architecture (if you not use any non-cortex MCU maybe you remove the directory
arm-none-eabi/lib/arm and save near of 30MB)
If you only need a cortex m3/m4 toolchain, you may be remove v7, v7-a*, v8-a*, v8*-m*, v7ve*, v7-r*, v6* and only maintain v7-m (cortex-m3 nonfp), v7e-m (cortex-m4 nonfp), v7e-m+fp (cortex-m4/m7 fp) and v7e-m+dp (cortex m4/m7 dp)
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?
Ideally, you need to recompile gcc and toolchains by yourself. Some tools can help you for this like
https://crosstool-ng.github.io/ but in short, removing the directories in arm-none-eabi directory can save many space (but the compiler fail when you try to use some combination of -mcpu=... -mfpu=...)
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
Btw, the gcc arm embedded is using newlib/newlib-nano. You can check the version in the archive from
arm-none-eabi/include/_newlib_version.hBy example, the zephyr os toolchain uses picolibc (a derivative from newlib) and maybe seem similars but you can check if your compiler uses picolibc finding for this archives:
find <directory of the toolchain> -name picolibc.specs