Skip to content

Commit c290af9

Browse files
committed
Free 15k code space for Arduino IDE
Remove floating point printf and scanf compiler options. See esp8266/Arduino#4089
1 parent ecb18db commit c290af9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arduino/version 2.4.0/platform.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,22 @@ compiler.warning_flags.more=-Wall
1818
compiler.warning_flags.all=-Wall -Wextra
1919

2020
build.lwip_lib=-llwip_gcc
21+
build.lwip_include=lwip/include
2122
build.lwip_flags=-DLWIP_OPEN_SRC
2223

2324
compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/
2425
compiler.sdk.path={runtime.platform.path}/tools/sdk
2526
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"
27+
compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core"
2728

2829
compiler.c.cmd=xtensa-lx106-elf-gcc
2930
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
3031

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

34-
compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -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,spi_flash_read
35+
# compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -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,spi_flash_read
36+
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,spi_flash_read
3537

3638
compiler.c.elf.cmd=xtensa-lx106-elf-gcc
3739
compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc

0 commit comments

Comments
 (0)