Hello,
Here is the output from CB -> Build -> Select Target ->Debug output vs pio tun -target debug:
CB:
-------------- Build: **Debug** in Proj_arduino (compiler: GNU GCC Compiler)---------------
Checking if target is up-to-date: 1
Running command: /home/az/.platformio/penv/bin/pio -f -c codeblocks run
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.4 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.200129 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for ESPAsyncWebserver library in registry
Warning! Library `{'requirements': None, 'name': 'ESPAsyncWebserver'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'ESPAsyncWebserver'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RCSwitch> 2.52
…
| |-- <WiFi> 1.0
**Building in release mode**
Linking .pio/build/esp32doit-devkit-v1/firmware.elf
Retrieving maximum program size .pio/build/esp32doit-devkit-v1/firmware.elf
Checking size .pio/build/esp32doit-devkit-v1/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] **13.7%** (used 44784 bytes from 327680 bytes)
Flash: [======== ] 79.0% (used 1035961 bytes from 1310720 bytes)
========================= [SUCCESS] Took 13.86 seconds =========================
Process terminated with status 0 (0 minute(s), 14 sec
So is it built in DEBUG or in RELEASE ? Very confusing.
Now same run thru pio:
[az@dell5000 Proj_arduino]$ ~/.platformio/penv/bin/pio run -t debug
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.4 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.200129 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for ESPAsyncWebserver library in registry
Warning! Library `{'requirements': None, 'name': 'ESPAsyncWebserver'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'ESPAsyncWebserver'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RCSwitch> 2.52
…
| |-- <FS> 1.0
Building in debug mode
Compiling .pio/build/esp32doit-devkit-v1/src/Sensor_DHT.cpp.o
…
Building .pio/build/esp32doit-devkit-v1/firmware.bin
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 13.7% (used 44784 bytes from 327680 bytes)
Flash: [======== ] 83.6% (used 1095136 bytes from 1310720 bytes)
esptool.py v2.6
Based on memory usage i can conclude that it is debug build. But the messages from CB build are misleading and confusing.
RELEASE:
In CB -> Buiuld -> Select Target - Release :
-------------- Build: Release in Proj_arduino (compiler: GNU GCC Compiler)---------------
Checking if target is up-to-date: 1
Running command: /home/az/.platformio/penv/bin/pio -f -c codeblocks run
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
--------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.4 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.200129 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for ESPAsyncWebserver library in registry
Warning! Library `{'requirements': None, 'name': 'ESPAsyncWebserver'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'ESPAsyncWebserver'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RCSwitch> 2.52
| |-- <WiFi> 1.0
Building in release mode
Compiling .pio/build/esp32doit-devkit-v1/src/Sensor_DHT.cpp.o
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 13.7% (used 44784 bytes from 327680 bytes)
Flash: [======== ] 79.0% (used 1035961 bytes from 1310720 bytes)
esptool.py v2.6
========================= [SUCCESS] Took 39.64 seconds =========================
I expected to see the difference in the memory usage. But it is the same as in “debug” mode. Why?
the pio target release fails:
~/.platformio/penv/bin/pio run -t release
Processing esp32doit-devkit-v1 (platform: espressif32; board: esp32doit-devkit-v1; framework: arduino)
----------------------------------------------------------------------------------------------------------------------------------------------------
Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32doit-devkit-v1.html
PLATFORM: Espressif 32 1.12.4 > DOIT ESP32 DEVKIT V1
HARDWARE: ESP32 160MHz, 320KB RAM, 4MB Flash
DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.10004.200129 (1.0.4)
- tool-esptoolpy 1.20600.0 (2.6.0)
- toolchain-xtensa32 2.50200.80 (5.2.0)
LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Looking for ESPAsyncWebserver library in registry
Warning! Library `{'requirements': None, 'name': 'ESPAsyncWebserver'}` has not been found in PlatformIO Registry.
You can ignore this message, if `{'requirements': None, 'name': 'ESPAsyncWebserver'}` is a built-in library (included in framework, SDK). E.g., SPI, Wire, etc.
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <RCSwitch> 2.52
|-- <ESPUI> 2.0.0
| |-- <ESP Async WebServer> 1.2.3
| | |-- <AsyncTCP> 1.1.1
| | |-- <WiFi> 1.0
| | |-- <FS> 1.0
| | |-- <ArduinoJson> 6.15.2
| |-- <ArduinoJson> 6.15.2
| |-- <AsyncTCP> 1.1.1
| |-- <SPIFFS> 1.0
| | |-- <FS> 1.0
| |-- <FS> 1.0
| |-- <ArduinoOTA> 1.0
| | |-- <Update> 1.0
| | |-- <ESPmDNS> 1.0
| | | |-- <WiFi> 1.0
| | |-- <WiFi> 1.0
| |-- <WiFi> 1.0
|-- <ArduinoJson> 6.15.2
|-- <DNSServer> 1.1.0
| |-- <WiFi> 1.0
|-- <SPIFFS> 1.0
| |-- <FS> 1.0
|-- <Outlets>
|-- <WiFi> 1.0
|-- <DHT sensor library for ESPx> 1.17
Building in release mode
*** Do not know how to make File target `release' (/home/az/Work/Arduino/Proj_arduino/release). Stop.
Obvious question is why there is a difference in the behaviour?
and the last, but not the least:
~/.platformio/penv/bin/pio run --list-targets
Usage: pio run [OPTIONS]
Try "pio run -h" for help.
Error: no such option: --list-targets
PlatformIO, version 4.3.4
platformio.ini:
[env:esp32doit-devkit-v1]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
monitor_speed = 115200
lib_deps =
id=246@^2.6.2
ESPUI
ESPAsyncWebserver
64
ESPAsyncTCP
board_build.f_cpu = 160000000L