platformio / platform-espressif32

Espressif 32: development platform for PlatformIO
https://registry.platformio.org/platforms/platformio/espressif32
Apache License 2.0
856 stars 571 forks source link

Handle "--encrypt" in upload_flags correctly for esptool #1336

Closed saschaklick closed 3 months ago

saschaklick commented 3 months ago

The default way of applying upload_flags to the esptool arguments is not compatible with the way esptool expects "--encrypt" to be positioned.

Also upload compression is disabled when encrypted upload is requested.

valeros commented 3 months ago

Hi @saschaklick, thanks for the PR. Currently, the firmware encryption workflow is not supported, but for your case I'd recommend using an extra script instead of upload_flags. This way you will be able to insert any additional flags at an arbitrary place in the upload command.