I use WeMos D1 mini board.
I have a simple sketch using 3 external libraries.
Uploading in Arduino (below 5s as Arduino remembers that libraries were already compiled and does not repeat that process unnecessary):
Executable segment sizes:
IROM : 244212 - code in flash (default or ICACHE_FLASH_ATTR)
IRAM : 26832 / 32768 - code in IRAM (ICACHE_RAM_ATTR, ISRs...)
DATA : 1252 ) - initialized variables (global, static) in RAM/HEAP
RODATA : 896 ) / 81920 - constants (global, static) in RAM/HEAP
BSS : 25280 ) - zeroed variables (global, static) in RAM/HEAP
Szkic używa 273192 bajtów (26%) pamięci programu. Maksimum to 1044464 bajtów.
Zmienne globalne używają 27428 bajtów (33%) pamięci dynamicznej, pozostawiając 54492 bajtów dla zmiennych lokalnych. Maksimum to 81920 bajtów.
esptool.py v2.8
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: b4:e6:2d:4a:31:80
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 277344 bytes to 204288...
Wrote 277344 bytes (204288 compressed) at 0x00000000 in 4.8 seconds (effective 466.8 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
On PlatformIO it took >50s because libraries are compiled even if nothing changes to them (maybe there is some hidden option like with changing projects_dir [which does not work with unicode characters in path… in 2020…])
Building .pio\build\d1_mini\firmware.bin
Retrieving maximum program size .pio\build\d1_mini\firmware.elf
Checking size .pio\build\d1_mini\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [=== ] 33.5% (used 27428 bytes from 81920 bytes)
Flash: [=== ] 26.2% (used 273232 bytes from 1044464 bytes)
Creating BIN file ".pio\build\d1_mini\firmware.bin" using "C:\Users\Marooned\.platformio\packages\framework-arduinoespressif8266\bootloaders\eboot\eboot.elf" and ".pio\build\d1_mini\firmware.elf"
Configuring upload protocol...
AVAILABLE: espota, esptool
CURRENT: upload_protocol = esptool
Looking for upload port...
Auto-detected: COM3
Uploading .pio\build\d1_mini\firmware.bin
esptool.py v2.8
Serial port COM3
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: b4:e6:2d:4a:31:80
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 277392 bytes to 204337...
Writing at 0x00000000... (7 %)
Writing at 0x00004000... (15 %)
Writing at 0x00008000... (23 %)
Writing at 0x0000c000... (30 %)
Writing at 0x00010000... (38 %)
Writing at 0x00014000... (46 %)
Writing at 0x00018000... (53 %)
Writing at 0x0001c000... (61 %)
Writing at 0x00020000... (69 %)
Writing at 0x00024000... (76 %)
Writing at 0x00028000... (84 %)
Writing at 0x0002c000... (92 %)
Writing at 0x00030000... (100 %)
Wrote 277392 bytes (204337 compressed) at 0x00000000 in 18.2 seconds (effective 121.9 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
=== [SUCCESS] Took 50.29 seconds ===
Note the speed of upload:
-
Arduino:
Wrote 277344 bytes (204288 compressed) at 0x00000000 in 4.8 seconds (effective 466.8 kbit/s)...
-
PIO:
Wrote 277392 bytes (204337 compressed) at 0x00000000 in 18.2 seconds (effective 121.9 kbit/s)...
I’ve tried different board_build.flash_mode
, the only thing that changes is the speed of flashing (still noticeably slower than Arduino IDE).
My Arduino setup:

My PIO setup:
[env:d1_mini]
platform = espressif8266
board = d1_mini
framework = arduino
monitor_speed = 115200
lib_deps =
knolleary/PubSubClient@^2.8
beegee-tokyo/DHT sensor library for ESPx@^1.17
Thanks
[edit]
ok, I’ve added upload_speed = 921600
to platformio.ini
and upload speed now match Arduino, so this one is solved… however, board still does not work, still this on startup:
ets Jan 8 2013,rst cause:2, boot mode:(3,6)
load 0x4010f000, len 3584, room 16
tail 0
chksum 0xb0
csum 0xb0
v2843a5ac
~ld