Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhance flash ecnryption #1247

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Conversation

radurentea
Copy link
Collaborator

Description

Added check for SDK config modifications for encryption.

Fixes #1067

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • This change requires a documentation update

Steps to test this pull request

  1. Open a project
  2. Use "ESP-IDF: SDK Configuration editor (menuconfig)
  3. Enable "Enable flash encryption on boot (READ DOCS FIRST)"
  4. Build and Flash project with UART
  5. Flash should be successful and the task should contain the --encrypt flag
    EX:

Executing task: C:\xxxxx.espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe c:\xxxxxx\esp-idf-v5.0.1\components\esptool_py\esptool\esptool.py -p COM5 -b 460800 --before default_reset --after no_reset --chip esp32s3 write_flash --flash_mode dio --flash_freq 80m --encrypt --flash_size 16MB 0x0 bootloader/bootloader.bin 0x20000 app.bin 0x8000 partition_table/partition-table.bin

Test Configuration:

  • ESP-IDF Version: 5.2
  • OS (Windows,Linux and macOS): Windows

Checklist

  • PR Self Reviewed
  • Applied Code formatting
  • Added Documentation
  • Added Unit Test
  • Verified on all platforms - Windows,Linux and macOS

Copy link

github-actions bot commented Jul 9, 2024

Download the artifacts for this pull request:

@radurentea radurentea self-assigned this Jul 24, 2024
@radurentea
Copy link
Collaborator Author

radurentea commented Jul 31, 2024

This PR is not ready to be tested / code reviewed:

  • we need to add validation for JTAG flashing (by default when flash encryption is enabled, an efuse is burnt that will disable JTAG flashing on the device), in case JTAG is disabled and user tries to flash via JTAG we need to catch this error and handle it properly.
  • we need to modify the flash encryption documentation

@brianignacio5 brianignacio5 added this to the 1.9.0 milestone Aug 1, 2024
Copy link

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

@github-actions github-actions bot added the stale Stale PR or Issue label Aug 17, 2024
@brianignacio5 brianignacio5 added ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot and removed stale Stale PR or Issue labels Aug 19, 2024
@radurentea
Copy link
Collaborator Author

Hi @brianignacio5, Please take another look for the new commits in regards to the error handling of JTAG Flash when efuses are burnt

Copy link
Collaborator

@brianignacio5 brianignacio5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some changes

src/coverage/configureProject.ts Outdated Show resolved Hide resolved
src/utils.ts Outdated Show resolved Hide resolved
src/flash/flashCmd.ts Outdated Show resolved Hide resolved
src/extension.ts Outdated Show resolved Hide resolved
src/coverage/configureProject.ts Outdated Show resolved Hide resolved
@radurentea radurentea force-pushed the enhance/flash_ecryption_v2 branch 4 times, most recently from 8917245 to 47b9390 Compare September 12, 2024 07:59
@radurentea
Copy link
Collaborator Author

Hi @brianignacio5 PTAL, I've made the modifications you've requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ongoing Ongoing Issue or PR, this label will be used for issue or PR which is to be excluded by stale bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The 'Flash device' button does not support encrypted mode (VSC-1213)
2 participants