Skip to content

Commit da9f39a

Browse files
committed
Switch to custom newlib build
Built from https://github.com/igrr/newlib-xtensa using: ./configure --with-newlib --enable-multilib --disable-newlib-io-c99-formats --enable-newlib-supplied-syscalls --enable-target-optspace --program-transform-name="s&^&xtensa-lx106-elf-&" --disable-option-checking --with-target-subdir=xtensa-lx106-elf --target=xtensa-lx106-elf --enable-newlib-nano-formatted-io --enable-newlib-reent-small --prefix=path-to-arduino-core/tools/sdk/libc CROSS_CFLAGS="-DMALLOC_PROVIDED -DSIGNAL_PROVIDED -DABORT_PROVIDED" make make install
1 parent 41fef82 commit da9f39a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+14831
-540
lines changed

platform.txt

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,19 @@ build.lwip_flags=-DLWIP_OPEN_SRC
2222

2323
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
2424
compiler.sdk.path={runtime.platform.path}/tools/sdk
25-
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip/include" "-I{build.path}/core"
25+
compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf
26+
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/lwip/include" "-I{compiler.libc.path}/include" "-I{build.path}/core"
2627

2728
compiler.c.cmd=xtensa-lx106-elf-gcc
2829
compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections
2930

3031
compiler.S.cmd=xtensa-lx106-elf-gcc
3132
compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls
3233

33-
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
34+
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,register_chipv6_phy
3435

3536
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
36-
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lwpa2 -lstdc++ -lm -lcmin -lgcc
37+
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lsmartconfig -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc
3738

3839
compiler.cpp.cmd=xtensa-lx106-elf-g++
3940
compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections

tools/sdk/ld/eagle.app.v6.common.ld

+1-1
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ SECTIONS
156156
*.c.o( EXCLUDE_FILE (umm_malloc.c.o) .literal*, \
157157
EXCLUDE_FILE (umm_malloc.c.o) .text*)
158158
*.cpp.o(.literal*, .text*)
159-
*libcmin.a:(.literal .text .literal.* .text.*)
159+
*libc.a:(.literal .text .literal.* .text.*)
160160
*libm.a:(.literal .text .literal.* .text.*)
161161
*libgcc.a:_umoddi3.o(.literal .text)
162162
*libgcc.a:_udivdi3.o(.literal .text)

tools/sdk/lib/libcmin.a

-1.43 MB
Binary file not shown.

0 commit comments

Comments
 (0)