I have been working with PlatformIO for ESP8266 coding over a year. Last month, I tried to enable IPv6 supported with the latest espressif8266 platform, the latest version is V2.0.4.
It works fine, but one problem is the flash available space for sketch uploading.
the previous version which does to support IPv6, the available space is about 9xxKB.
now, it is 7XXKB.
And my sketch compiling size is about 385KB. It is over 50% than available space which cause my http OTA function failed.
below is the content of ini file, and terminal info of compiling
platform = espressif8266
board = esp01_1m
framework = arduino
upload_speed = 115200
board_build.f_cpu = 80000000L
build_flags = -Wl,-Teagle.flash.1m.ld
board_build.flash_mode = dio
board_build.f_flash = 40000000L
upload_resetmethod = ck
build_flags = -D PIO_FRAMEWORK_ARDUINO_LWIP2_IPV6_LOW_MEMORY
upload_port = /dev/cu.wchusbserial14240
lib_deps = EspSoftwareSerial@5.0.4
terminal- compiling info
DATA: [==== ] 41.6% (used 34068 bytes from 81920 bytes)
PROGRAM: [===== ] 50.9% (used 388100 bytes from 761840 bytes)
I tried many ways to reduce the sketch size, but performance is not good enough.
last week, I tried to move the exactly same code to Arduino IDE, and compile it.
the system show me available space of storage space is about 1MB, and with the similar compiling sketch size, the percentage is dropped to 37%.
and I tested it, all functions work fine. please see below Arduino setting and info.
the version shows in board manager is V2.5.0
Arduino-terminal compiling info
Sketch uses 387776 bytes (37%) of program storage space. Maximum is 1023984 bytes.
Global variables use 33860 bytes (41%) of dynamic memory, leaving 48060 bytes for local variables. Maximum is 81920 bytes.
I checked the setting between 2 environments, all setting should be the same.
May I know what setting I miss? How do I solve it?
Thanks for advise