# newlibc **Repository Path**: yellow_crane/newlibc ## Basic Information - **Project Name**: newlibc - **Description**: No description available - **Primary Language**: C - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 2 - **Created**: 2021-11-01 - **Last Updated**: 2021-11-01 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README - https://sourceware.org/newlib/ftp/ - get newlib source code ``` wget ftp://sourceware.org/pub/newlib/newlib-4.1.0.tar.gz tar xzf newlib-4.1.0.tar.gz cd newlib-4.1.0/ ./configure --target arm-none-eabi --disable-newlib-supplied-syscalls make cd .. ``` ``` wget ftp://sourceware.org/pub/newlib/newlib-4.1.0.tar.gz tar xzf newlib-4.1.0.tar.gz cd newlib-4.1.0/ ./configure --target aarch64-none-elf --disable-newlib-supplied-syscalls make cd .. ``` - compile the program with the Glib ``` arm-none-eabi-gcc -mcpu=cortex-a8 -I $AARCH32_CROSS_PATH/arm-none-eabi/include -c -o test.o test.c arm-none-eabi-as -mcpu=cortex-a8 -o startup.o startup.s arm-none-eabi-gcc -mcpu=cortex-a8 -I $AARCH32_CROSS_PATH/arm-none-eabi/include -c -o syscalls.o syscalls.c arm-none-eabi-gcc -nostdlib -T test.ld test.o startup.o syscalls.o $AARCH32_CROSS_PATH/arm-none-eabi/lib/thumb/v7/nofp/libc.a $AARCH32_CROSS_PATH/lib/gcc/arm-none-eabi/10.3.1/libgcc.a -o test arm-none-eabi-objcopy -O binary test test.bin qemu-system-arm -M realview-pb-a8 -serial stdio -kernel test.bin ``` - compile the program with the Newlib ``` arm-none-eabi-gcc -mcpu=cortex-a8 -I ./newlib-4.1.0/newlib/libc/include -c -o test.o test.c arm-none-eabi-as -mcpu=cortex-a8 -o startup.o startup.s arm-none-eabi-gcc -mcpu=cortex-a8 -I ./newlib-4.1.0/newlib/libc/include -c -o syscalls.o syscalls.c arm-none-eabi-gcc -nostdlib -T test.ld test.o startup.o syscalls.o ./newlib-4.1.0/arm-none-eabi/newlib/libc.a $AARCH32_CROSS_PATH/lib/gcc/arm-none-eabi/10.3.1/libgcc.a -o test arm-none-eabi-objcopy -O binary test test.bin qemu-system-arm -M realview-pb-a8 -serial stdio -kernel test.bin ```