espressif / vscode-esp-idf-extension

Visual Studio Code extension for ESP-IDF projects
Apache License 2.0
1.05k stars 305 forks source link

[Feature Request]: support Host-Generated Flash Encryption and Release Mode (VSC-1017) #853

Open chipweinberger opened 1 year ago

chipweinberger commented 1 year ago

related: https://github.com/espressif/esptool/issues/809 https://github.com/espressif/esp-idf/issues/10340

Backgound

Docs: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/security/flash-encryption.html#manual-encryption

ESP-IDF has 2 flash encryption modes:

Problem

Release mode is not supported by the VSC ESP-IDF Extension, even if we have a Host Generated key.

Currently in Release Mode, VSC Flash Command just completely fails:

A fatal error occurred: Detecting flash size is not supported in secure download mode. Need to manually specify flash size.

chipweinberger commented 1 year ago

A fatal error occurred: Detecting flash size is not supported in secure download mode. Need to manually specify flash size.

This is despite my Flash Size being specified in my Menu Config.

Screen Shot 2022-12-08 at 11 16 58 PM
github-actions[bot] commented 1 year ago

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

chipweinberger commented 1 year ago

@brianignacio5 appreciate you taking a look at this again.

Just to provide more thoughts, I'm thinking:

brianignacio5 commented 1 year ago

Sorry this was automatically closed by the bot, This could be a nice feature plan but a bit dangerous for beginner users so need to consider some validations as well.

Thank you for the thoughts, will think of feature action plan for this and decide with IDF team a good course of action. Will tag any work done related to this.

chipweinberger commented 1 year ago

No problem. No rush! This is low priority for me now, as I made my own flashing tool to handle this. But it would have been convenient to have VSC support it directly.

github-actions[bot] commented 1 year ago

This issue has been marked as stale since there are no activities, and this will be closed in 5 days if there are no further activities

chipweinberger commented 10 months ago

I'm getting closer to production, and this feature would be very useful.

This means i lose the ability to push the "flash" button in vscode, which is annoying!

Perhaps I can rig up the "run custom command button" myself as a workaround. 😀 Thanks again for adding that.

That said, i think this feature would be very simple to implement? Like 1 day of work maximum.