Hello everyone,
EDIT 23.07.2017:
I think the issue I described below regarding error related to upload_flags
is because --debug
option applies to OTA uploader, not the standard USB one.
Then the question is how should I define the log level via config file?
I see for instance CONFIG_LOG_DEFAULT_LEVEL
in sdkconfig.h
. But this file is generated and in its header it is said Automatically generated file; DO NOT EDIT
.
How about the correct approach then?
Is there a way to enable debug (modify the log level) via platformio.ini
file without defining custom constants to be handled programmatically later?
Previously defined question below. I modified my question as above.
I use ESP32 in ESP-IDF framework variant.
Unfortunately I’ve faced an issue and reported it here: Upload fails when upload_flags debug is set · Issue #30 · platformio/platform-espressif32 · GitHub .
Please find more detailed description under the link above. I will shortly describe the problem here again.
The problem is I’m not able to upload compiled firmware with debug option enabled as described in specification.
I’ve tried to set upload_flags
in platformio.ini
as following:
[env:esp32dev]
platform = espressif32
framework = espidf
board = esp32dev
upload_flags = --debug
The device is connect via USB.
When I try to upload the compiled firmware with command:
platformio run --target upload
It fails as following:
Auto-detected: /dev/ttyUSB0
Uploading .pioenvs/esp32dev/firmware.bin
usage: esptool write_flash [-h] [--flash_freq {40m,26m,20m,80m}]
[--flash_mode {qio,qout,dio,dout}]
[--flash_size FLASH_SIZE] [--ucIsHspi]
[--ucIsLegacy] [--no-progress] [--verify]
[--compress | --no-compress]
<address> <filename> [<address> <filename> ...]
esptool write_flash: error: argument <address> <filename>: Must be pairs of an address and the binary filename to write there
*** [upload] Error 2
When I remove upload_flags
from the platformio.ini everything is ok and it ends with something like [SUCCESS] Took 44.22 seconds
.
I’ve tried to study the specification and the Authentication and upload options section. I followed the instructions, unfortunately I couldn’t get it working.
Could you please tell me how to enable debug
from plaftormio.ini
?