🌐
Debian
packages.debian.org › sid › libstdc++-arm-none-eabi-newlib
Details of package libstdc++-arm-none-eabi-newlib in sid
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
🌐
Alpine Linux
pkgs.alpinelinux.org › package › edge › community › x86_64 › newlib-arm-none-eabi
newlib-arm-none-eabi - Alpine Linux packages
g++-arm-none-eabi · newlib · qmk-cli · Sub Packages (5) newlib-aarch64-none-elf · newlib-arm-none-eabi · newlib-msp430-elf · newlib-or1k-elf · newlib-riscv-none-elf · Provides (0) None ·
Discussions

Does arm-none-eabi-gcc provide gdb, newlib, binutils?
I downloaded https://armkeil.b...bi-objdump, arm-none-eabi-strings, arm-none-eabi-strings and all the rest of binutils, and even arm-none-eabi-gdb. I can't tell if it has newlib, there's a newlib.h, but the rest of the library doesn't seem to be there.... More on github.com
🌐 github.com
0
May 14, 2019
c++ - How to rebuild newlib and newlib-nano of GNU Arm Embedded Toolchain - Stack Overflow
And also the readme.txt in “../share/doc/gcc-arm-none-eabi/” contains: ... This toolchain is released with two prebuilt C libraries based on newlib: one is the standard newlib (libc.a) and the other is newlib-nano (libc_nano.a) for code size. More on stackoverflow.com
🌐 stackoverflow.com
c++ - linking newlib nano with arm-none-eabi gnu toolchain: undefined reference to __libc_init_array - Stack Overflow
Even though I have scrolled through another similar post regarding this topic, I have not yet managed to solve my issue. I'm working on a bare metal development approach for stm32f411RE and I just ... More on stackoverflow.com
🌐 stackoverflow.com
arm-none-eabi toolchain version 14 on Ubuntu 22.04 LTS?
No. Ubuntu 22.04 provides GCC 10 for arm-none-eabi. 24.04 provides GCC 13. I would suggest installing distrobox to run an Arch container, and using the ARM toolchain from that. More on reddit.com
🌐 r/Ubuntu
1
0
June 26, 2024
🌐
Arch Linux
archlinux.org › packages › extra › any › arm-none-eabi-newlib
Arch Linux - arm-none-eabi-newlib 4.5.0.20241231-2 (any)
View the file list for arm-none-eabi-newlib · View the soname list for arm-none-eabi-newlib · Copyright © 2002-2026 Judd Vinet, Aaron Griffin and Levente Polyák. The Arch Linux name and logo are recognized trademarks. Some rights reserved.
🌐
Arm Community
community.arm.com › support-forums › f › compilers-and-libraries-forum › 53310 › gcc-arm-none-eabi-what-were-the-newlib-compilation-options
gcc-arm-none-eabi: what were the Newlib compilation ...
August 4, 2022 - Have a question about working on Arm technology? Browse our support forums for solutions to your questions, answer questions from fellow community members and get help from Arm experts.
🌐
Interrupt
interrupt.memfault.com › blog › boostrapping-libc-with-newlib
From Zero to main(): Bootstrapping libc with Newlib | Interrupt
November 12, 2019 - Newlib is enabled by default when you build a project with arm-none-eabi-gcc.
🌐
Arm Developer
developer.arm.com › downloads › - › arm-gnu-toolchain-downloads
Arm GNU Toolchain Downloads – Arm Developer
$ arm-none-eabi-gcc -mcpu=cortex-a53 -mfloat-abi=softfp -mthumb · Example with floating-point and Advanced SIMD instructions with hard-float ABI: $ arm-none-eabi-gcc -mcpu=cortex-a53 -mfloat-abi=hard -mthumb
🌐
FreshPorts
freshports.org › devel › arm-none-eabi-newlib
FreshPorts -- devel/arm-none-eabi-newlib: Newlib distribution for arm-none-eabi targets
October 16, 2016 - Newlib is a C library intended for use on embedded systems. It is a conglomeration of several library parts, all under free software licenses, that make them easily usable on embedded products.
🌐
GitHub
github.com › ARMmbed › homebrew-formulae › issues › 24
Does arm-none-eabi-gcc provide gdb, newlib, binutils? · Issue #24 · ARMmbed/homebrew-formulae
May 14, 2019 - I downloaded https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/8-2018q4/gcc-arm-none-eabi-8-2018-q4-major-mac.tar.bz2 and unzipped it and found it does indeed include arm-none-eabi-objcopy, arm-none-eabi-objdump, arm-none-eabi-strings, arm-none-eabi-strings and all the rest of binutils, and even arm-none-eabi-gdb. I can't tell if it has newlib, there's a newlib.h, but the rest of the library doesn't seem to be there.
Published   May 14, 2019
Author   kousu
🌐
Debian
packages.debian.org › sid › libnewlib-arm-none-eabi
Details of package libnewlib-arm-none-eabi in sid
JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser
Find elsewhere
🌐
Debian
packages.debian.org › sid › devel › libstdc++-arm-none-eabi-newlib
Debian -- Details of package libstdc++-arm-none-eabi-newlib in sid
picolibc-arm-none-eabi · python3-pyocd · libstdc++6-arm64-cross · GNU Standard C++ library for embedded ARM chips using Cortex-M, and Cortex-R processors. This library is built using newlib as standard C library. dep: gcc-arm-none-eabi (= 15:14.2.rel1-1) GCC cross compiler for ARM Cortex-R/M processors ·
🌐
Ubuntu
packages.ubuntu.com › focal › libs › libnewlib-arm-none-eabi
Details of package libnewlib-arm-none-eabi in focal
two or more packages specified (libnewlib-arm-none-eabi focal) Content Copyright © 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Linux Mint Forums
forums.linuxmint.com › board index › main edition support › software & applications
Getting to work ARM-compiler arm-none-eabi with Linux 21 Vanessa - Linux Mint Forums
November 28, 2022 - The opion "-nostartfiles" is a CFLAG and no LFLAG Here is my working makefile for this project, which could be compiled and linked by arm-none-eabi. ... ################################## # stm32 minimal example Makefile ################################## CC = arm-none-eabi-gcc LD = arm-none-eabi-ld CP = arm-none-eabi-objcopy LKR_SCRIPT = stm32_minimal.ld CFLAGS = -c -fno-common -O0 -g -Wall -mcpu=cortex-m3 -mthumb -nostartfiles LFLAGS = -T $(LKR_SCRIPT) CPFLAGS = -Obinary all: main.bin main.o: main.c $(CC) $(CFLAGS) -o main.o main.c main.elf: main.o $(LD) $(LFLAGS) -o main.elf main.o main.bin: main.elf $(CP) $(CPFLAGS) main.elf main.bin clean: rm -rf *.o *.elf *.bin write: ./write_bin.sh openocd.cfg main.elf So now at least I know that gcc seems to work.
🌐
Ubuntu
launchpad.net › ubuntu › jammy › +package › libnewlib-arm-none-eabi
libnewlib-arm-none-eabi : Jammy (22.04) : Ubuntu - Launchpad
newlib 3.3.0-1.3 source package in Ubuntu · libnewlib-arm-none-eabi 3.3.0-1.3 in amd64 (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in amd64 (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in arm64 (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in arm64 (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in armhf (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in armhf (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in i386 (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in i386 (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in ppc64el (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in ppc64el (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in riscv64 (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in riscv64 (Release) libnewlib-arm-none-eabi 3.3.0-1.3 in s390x (Proposed) libnewlib-arm-none-eabi 3.3.0-1.3 in s390x (Release) • Take the tour • Read the guide ·
Top answer
1 of 3
15

If i understand you correctly, a more detailed question is:
What configure options did 'GNU Arm Embedded Toolchain' developers used when building newlib libraries shipped in gcc-arm-none-eabi-6-2017-q2-update-linux.tar.bz2 archive?
These ones for newlib:

--target=arm-none-eabi --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls

And these ones for newlib-nano:

--target=arm-none-eabi --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls

How I got it? Let's walk through the process:
These packages are build on launchpad, where from you find all the builds that took place on lanuchpad. I picked gcc-arm-none-eabi 6-2017q2-1 from 2017-10-24. There i can find the buildlog. I grepped the buildlog with | grep "^+ " | grep "configure " | grep 'src/newlib' and i was left with:

+ /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/install-native --infodir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/info --mandir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/man --htmldir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/html --pdfdir=/<<PKGBUILDDIR>>/install-native/share/doc/gcc-arm-none-eabi/pdf --enable-newlib-io-long-long --enable-newlib-register-fini --enable-newlib-retargetable-locking --disable-newlib-supplied-syscalls --disable-nls + /<<PKGBUILDDIR>>/src/newlib/configure --target=arm-none-eabi --prefix=/<<PKGBUILDDIR>>/build-native/target-libs --disable-newlib-supplied-syscalls --enable-newlib-reent-small --disable-newlib-fvwrite-in-streamio --disable-newlib-fseek-optimization --disable-newlib-wide-orient --enable-newlib-nano-malloc --disable-newlib-unbuf-stream-opt --enable-lite-exit --enable-newlib-global-atexit --enable-newlib-nano-formatted-io --disable-nls

A bit of Sherlock Holmes and i deduced that the second line is newlib configured to build as newlib-nano (--enable-newlib-reent-small), the first is newlib configured to build as full newlib.
To answer your topic question, to recompile newlib and newlib-nano the same way pass the options I have posted above to newlib ./configure script.

2 of 3
3

Hints about how the compiler was configured are found in:

  • $COMPILER_PATH/arm-none-eabi/include/newlib.h
  • $COMPILER_PATH/arm-none-eabi/include/newlib-nano/newlib.h

The #defines there have a close correspondence to the options that were passed to 'configure', when newlib was built.

🌐
Jasonblog
jasonblog.github.io › note › arm_emulation › using_newlib_in_arm_bare_metal_programs.html
Using Newlib in ARM bare metal programs | Jason note
$ wget ftp://sources.redhat.com/pub/newlib/newlib-1.18.0.tar.gz $ tar xzf newlib-1.18.0.tar.gz $ cd newlib-1.18.0/ $ ./configure --target arm-none-eabi --disable-newlib-supplied-syscalls $ make $ cd ..
Top answer
1 of 1
2

First of all, __libc_init_array() belongs inside extern "C". The map file you have above has it correct: it gets pulled in from libc_nano.a(lib_a-init.o).

This is not really the problem though. In your vector table, you have Reset_Handler where you should have the initial value of the stack pointer, and main where you should have the reset handler. main should never be in the vector, it is called by the reset handler as a normal function, not through the vector.

The crash you are having is most likely because you don't have a correct stack pointer, and the code is trying to use the stack.

Also, the first thing you do in your reset handler is call __libc_init_array. This is wrong. You need to (at least) copy the initialized data and zero the bss section first. If you are following the CMSIS pattern then you also need to call SystemInit. See the sample startup code and linker scripts in the STM32CubeF4 package.

EDIT: The above problems are in your pseudocode; the code doesn't match the pseudocode and doesn't have the above problems.

The next problem is that you have deleted half of the standard linker script. Try looking at the source of __libc_init_array to see what it needs. It needs the init array sections etc.

Here is an example with them in:

.init :
{
  KEEP (*(SORT_NONE(.init)))
}
>FLASH

.text :
{
  *(.text .text.* .stub .gnu.linkonce.t.*)
}
>FLASH

.fini :
{
  KEEP (*(SORT_NONE(.fini)))
}
>FLASH

.preinit_array :
{
  PROVIDE_HIDDEN (__preinit_array_start = .);
  KEEP (*(.preinit_array))
  PROVIDE_HIDDEN (__preinit_array_end = .);
}
>FLASH

.init_array :
{
  PROVIDE_HIDDEN (__init_array_start = .);
  KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
  KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
  PROVIDE_HIDDEN (__init_array_end = .);
}
>FLASH

.fini_array :
{
  PROVIDE_HIDDEN (__fini_array_start = .);
  KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
  KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
  PROVIDE_HIDDEN (__fini_array_end = .);
}
>FLASH

.ctors :
{
  KEEP (*crtbegin.o(.ctors))
  KEEP (*crtbegin?.o(.ctors))
  KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
  KEEP (*(SORT(.ctors.*)))
  KEEP (*(.ctors))
}
>FLASH

.dtors :
{
  KEEP (*crtbegin.o(.dtors))
  KEEP (*crtbegin?.o(.dtors))
  KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
  KEEP (*(SORT(.dtors.*)))
  KEEP (*(.dtors))
}
>FLASH
🌐
Raspberry Pi Forums
forums.raspberrypi.com › board index › hardware and peripherals › raspberry pi pico › general
[Solved] Wanting latest gcc-arm-none-eabi - Raspberry Pi Forums
December 5, 2021 - pi@Pi3B:~/pico $ sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version (12.6). gcc-arm-none-eabi is already the newest version (15:7-2018-q2-6).
🌐
Ubuntu
packages.ubuntu.com › focal › libstdc++-arm-none-eabi-newlib
Details of package libstdc++-arm-none-eabi-newlib in focal
two or more packages specified (libstdc++-arm-none-eabi-newlib focal) Content Copyright © 2025 Canonical Ltd.; See license terms. Ubuntu is a trademark of Canonical Ltd. Learn more about this site.
🌐
Fedora
packages.fedoraproject.org › pkgs › arm-none-eabi-newlib › arm-none-eabi-newlib
arm-none-eabi-newlib - Fedora Packages
View arm-none-eabi-newlib in the Fedora package repositories. arm-none-eabi-newlib: C library intended for use on arm-none-eabi embedded systems
🌐
Ubuntu
launchpad.net › ubuntu › trusty › +package › libnewlib-arm-none-eabi
libnewlib-arm-none-eabi : Trusty (14.04) : Ubuntu
newlib 2.1.0-3 source package in Ubuntu · libnewlib-arm-none-eabi 2.1.0-3 in amd64 (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in amd64 (Release) libnewlib-arm-none-eabi 2.1.0-3 in arm64 (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in arm64 (Release) libnewlib-arm-none-eabi 2.1.0-3 in armhf (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in armhf (Release) libnewlib-arm-none-eabi 2.1.0-3 in i386 (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in i386 (Release) libnewlib-arm-none-eabi 2.1.0-3 in powerpc (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in powerpc (Release) libnewlib-arm-none-eabi 2.1.0-3 in ppc64el (Proposed) libnewlib-arm-none-eabi 2.1.0-3 in ppc64el (Release) • Take the tour • Read the guide ·