-
Notifications
You must be signed in to change notification settings - Fork 304
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
The 'Flash device' button does not support encrypted mode (VSC-1213) #1067
Comments
This issue has been marked as |
related #853 |
Hi @owen63, It seems that flash encryption does work, but in order to flash with that --encrypt flash you would have to use the command "ESP-IDF: Encrypt and flash your project". Make sure to understand the following about flash encryption:
I'm currently working on an implementation which will be more intuitive for users, not having to worry about the method they chose to flash the device. @chipweinberger , I will try to fix your request from #853 as well in this PR. |
Hi Radu,
Thanks, I was not aware of the "ESP-IDF: Encrypt and flash your project"
command.
…On Fri, 19 Jan 2024 at 01:08, Radu ***@***.***> wrote:
Hi @owen63 <https://github.com/owen63>,
It seems that flash encryption does work, but in order to flash with that
--encrypt flash you would have to use the command "ESP-IDF: Encrypt and
flash your project".
Make sure to understand the following about flash encryption:
1. Enable flash encryption in sdk config (you did this)
2. Flash the device normally (without --encrypt flag)
3. After normal flashing is done, simply press and release the reset
button. This action triggers a hardware reset, causing the device to reboot.
4. Flash device using "ESP-IDF: Encrypt and flash your project" (which
will add the --encrypt flag to the flash command)
I'm currently working on an implementation which will be more intuitive
for users, not having to worry about the method they chose to flash the
device.
@chipweinberger <https://github.com/chipweinberger> , I will try to fix
your request from #853
<#853> as
well in this PR.
—
Reply to this email directly, view it on GitHub
<#1067 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AXRUI7ZHLCB4LMUHOSZ77RLYPEGD3AVCNFSM6AAAAAA6OL77X6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOJYGM2TQNZWGI>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
OS
Windows
Operating System version
Windows 10
Visual Studio Code version
1.6.5
ESP-IDF version
5.0.1
Python version
3.11.1
Doctor command output
---------------------------------------------- ESP-IDF Extension for Visual Studio Code report ---------------------------------------------
OS win32 x64 10.0.19045
System environment variable IDF_PYTHON_ENV_PATH
undefined
System environment variable PATH
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Windows\System32\OpenSSH;C:\Program Files\Git\cmd;C:\Ruby31-x64\bin;C:\Program Files\PuTTY;C:\ST\STM32CubeCLT;C:\ST\STM32CubeCLT\STM32CubeProgrammer\bin;C:\ST\STM32CubeCLT\STLink-gdb-server\bin;C:\ST\STM32CubeCLT\GNU-tools-for-STM32\bin;C:\Program Files (x86)\STMicroelectronics\stlink_server;C:\Program Files\Python311\Scripts;C:\Program Files\Python311;C:\Program Files\TortoiseGit\bin;C:\AppData\Local\Microsoft\WindowsApps;C:\AppData\Roaming\Python\Python311\Scripts
System environment variable PYTHON
undefined
Visual Studio Code version 1.83.1
Visual Studio Code language en
Visual Studio Code shell C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe
ESP-IDF Extension version 1.6.5
Workspace folder c:\FTN\streetdog_ccu
---------------------------------------------------- Extension configuration settings ------------------------------------------------------
ESP-ADF Path (idf.espAdfPath) ${env:ADF_PATH}
ESP-IDF Path (idf.espIdfPath) c:\FTN\esp-idf-v5.0.1
ESP-MDF Path (idf.espMdfPath) ${env:MDF_PATH}
ESP-Matter Path (idf.espMatterPath) ${env:ESP_MATTER_PATH}
Custom extra paths (idf.customExtraPaths) C:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin;C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin;C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin;C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin;C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin;C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin;C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin;C:.espressif\tools\cmake\3.24.0\bin;C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin;C:.espressif\tools\ninja\1.10.2;C:.espressif\tools\idf-exe\1.0.3;C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64;C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64;C:.espressif\tools\esp-rom-elfs\20220823
Custom extra vars (idf.customExtraVars)
OPENOCD_SCRIPTS: C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026/openocd-esp32/share/openocd/scripts
IDF_CCACHE_ENABLE: 1
ESP_ROM_ELF_DIR: C:.espressif\tools\esp-rom-elfs\20220823/
Virtual env Python Path (idf.pythonBinPath) C:.espressif\python_env\idf5.0_py3.8_env\Scripts\python.exe
Serial port (idf.port) COM5
OpenOCD Configs (idf.openOcdConfigs) interface/ftdi/esp32_devkitj_v1.cfg,board/esp32-wrover.cfg
ESP-IDF Tools Path (idf.toolsPath) C:.espressif
Git Path (idf.gitPath) C:.espressif\tools\idf-git\2.30.1\cmd\git.exe
-------------------------------------------------------- Configurations access -------------------------------------------------------------
Access to ESP-ADF Path (idf.espAdfPath) false
Access to ESP-IDF Path (idf.espIdfPath) true
Access to ESP-MDF Path (idf.espMdfPath) false
Access to ESP-Matter Path (idf.espMatterPath) false
Access to ESP-IDF Custom extra paths
Access to C:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin: true
Access to C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin: true
Access to C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin: true
Access to C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin: true
Access to C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin: true
Access to C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin: true
Access to C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: true
Access to C:.espressif\tools\cmake\3.24.0\bin: true
Access to C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin: true
Access to C:.espressif\tools\ninja\1.10.2: true
Access to C:.espressif\tools\idf-exe\1.0.3: true
Access to C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64: true
Access to C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: true
Access to C:.espressif\tools\esp-rom-elfs\20220823: true
Access to Virtual env Python Path (idf.pythonBinPath) true
Access to CMake in environment PATH undefined
Access to Ninja in environment PATH undefined
Access to ESP-IDF Tools Path (idf.toolsPath) true
-------------------------------------------------------- Configurations has spaces -------------------------------------------------------------
Spaces in system environment Path true
Spaces in ESP-ADF Path (idf.espAdfPath) false
Spaces in ESP-IDF Path (idf.espIdfPath) false
Spaces in ESP-MDF Path (idf.espMdfPath) false
Spaces in ESP-Matter Path (idf.espMatterPath) false
Spaces in ESP-IDF Custom extra paths
Spaces in C:.espressif\tools\xtensa-esp-elf-gdb\11.2_20220823\xtensa-esp-elf-gdb\bin: false
Spaces in C:.espressif\tools\riscv32-esp-elf-gdb\11.2_20220823\riscv32-esp-elf-gdb\bin: false
Spaces in C:.espressif\tools\xtensa-esp32-elf\esp-2022r1-11.2.0\xtensa-esp32-elf\bin: false
Spaces in C:.espressif\tools\xtensa-esp32s2-elf\esp-2022r1-11.2.0\xtensa-esp32s2-elf\bin: false
Spaces in C:.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin: false
Spaces in C:.espressif\tools\riscv32-esp-elf\esp-2022r1-11.2.0\riscv32-esp-elf\bin: false
Spaces in C:.espressif\tools\esp32ulp-elf\2.35_20220830\esp32ulp-elf\bin: false
Spaces in C:.espressif\tools\cmake\3.24.0\bin: false
Spaces in C:.espressif\tools\openocd-esp32\v0.11.0-esp32-20221026\openocd-esp32\bin: false
Spaces in C:.espressif\tools\ninja\1.10.2: false
Spaces in C:.espressif\tools\idf-exe\1.0.3: false
Spaces in C:.espressif\tools\ccache\4.6.2\ccache-4.6.2-windows-x86_64: false
Spaces in C:.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64: false
Spaces in C:.espressif\tools\esp-rom-elfs\20220823: false
Spaces in Virtual env Python Path (idf.pythonBinPath) false
Spaces in ESP-IDF Tools Path (idf.toolsPath) false
----------------------------------------------------------- Executables Versions -----------------------------------------------------------
Git version 2.30.1.windows.1
ESP-IDF version 5.0.1
Python version 3.8.7
Python's pip version 23.1.2
-------------------------------------------------- Project configuration settings ----------------------------------------------------------
-------------------------------------------------- Python packages in idf.pythonBinPath ----------------------------------------------------
bitstring version: 4.0.1
CacheControl version: 0.12.11
certifi version: 2022.12.7
cffi version: 1.15.1
charset-normalizer version: 3.1.0
click version: 8.0.4
colorama version: 0.4.6
construct version: 2.10.68
contextlib2 version: 21.6.0
cryptography version: 36.0.2
ecdsa version: 0.18.0
esp-coredump version: 1.5.0
esptool version: 4.5.1
freertos-gdb version: 1.0.2
future version: 0.18.2
gcovr version: 6.0
idf-component-manager version: 1.2.3
idna version: 3.4
Jinja2 version: 3.0.3
kconfiglib version: 14.1.0
lockfile version: 0.12.2
lxml version: 4.9.2
MarkupSafe version: 2.1.2
msgpack version: 1.0.5
packaging version: 23.0
pip version: 23.1.2
psutil version: 5.9.5
pycparser version: 2.21
pyelftools version: 0.27
pygdbmi version: 0.9.0.2
Pygments version: 2.14.0
pyparsing version: 3.0.9
pyserial version: 3.5
pywin32 version: 306
PyYAML version: 6.0
reedsolo version: 1.6.0
requests version: 2.31.0
requests-file version: 1.5.1
requests-toolbelt version: 0.10.1
schema version: 0.7.5
setuptools version: 68.0.0
six version: 1.16.0
tqdm version: 4.65.0
urllib3 version: 1.26.15
websocket-client version: 1.6.0
wheel version: 0.36.2
windows-curses version: 2.3.1
xmlrunner version: 1.7.7
---------------------------------------------------- Check ESP-IDF python requirements.txt -------------------------------------------------
Check ESP-IDF Python packages c:\FTN\esp-idf-v5.0.1\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Python requirements are satisfied.
---------------------------------------------------- Check extension requirements.txt ------------------------------------------------------
Check Extension Python packages c:\FTN\esp-idf-v5.0.1\tools\check_python_dependencies.py:12: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Python requirements are satisfied.
---------------------------------------------------- Check ESP-IDF debug adapter requirements.txt ------------------------------------------
Check Debug AdapterPython packages Error
---------------------------------------------------- Visual Studio Code launch.json --------------------------------------------------------
{
"version": "0.2.0",
"configurations": [
{
"type": "espidf",
"name": "Launch",
"request": "launch"
}
]
}
---------------------------------------------------- Visual Studio Code c_cpp_properties.json ----------------------------------------------
{
"configurations": [
{
"name": "Win32",
"includePath": [
"${workspaceFolder}/"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"compilerPath": "C:\xxxxxx\.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe"
},
{
"name": "ESP-IDF",
"cStandard": "c11",
"cppStandard": "c++17",
"includePath": [
"C:\xxxxxx\esp-idf-v5.0.1/components/",
"c:\xxxxxx\yyyyyy/**"
],
"browse": {
"path": [
"C:\xxxxxx\esp-idf-v5.0.1/components",
"c:\xxxxxx\esp-idf-v5.0.1/components",
"${workspaceFolder}"
],
"limitSymbolsToIncludedHeaders": true
},
"compilerPath": "C:\xxxxxx\.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe",
"compileCommands": "c:\xxxxxx\streetdog_ccu/build/compile_commands.json",
"compilerPathInCppPropertiesJson": "C:\xxxxxx\.espressif\tools\xtensa-esp32s3-elf\esp-2022r1-11.2.0\xtensa-esp32s3-elf\bin\xtensa-esp32s3-elf-gcc.exe",
"compileCommandsInCppPropertiesJson": "${workspaceFolder}/build/compile_commands.json",
"mergeConfigurations": false
}
],
"version": 4
}
----------------------------------------------------------- Latest error -----------------------------------------------------------------
Latest error at Unknown error in ESP-IDF doctor command
Extension
No response
Description
The project is configured for flash encryption (via menuconfig) and that is reflected in flasher_args.json but the command line does not set the 'encrypt' flag.
flasher_args.json:
{
"write_flash_args" : [ "--flash_mode", "dio",
"--flash_size", "16MB",
"--flash_freq", "80m" ],
"flash_settings" : {
"flash_mode": "dio",
"flash_size": "16MB",
"flash_freq": "80m"
},
"flash_files" : {
"0x0" : "bootloader/bootloader.bin",
"0x20000" : "app.bin",
"0x8000" : "partition_table/partition-table.bin"
},
"bootloader" : { "offset" : "0x0", "file" : "bootloader/bootloader.bin", "encrypted" : "true" },
"app" : { "offset" : "0x20000", "file" : "app.bin", "encrypted" : "true" },
"partition-table" : { "offset" : "0x8000", "file" : "partition_table/partition-table.bin", "encrypted" : "true" },
"extra_esptool_args" : {
"after" : "no_reset",
"before" : "default_reset",
"stub" : true,
"chip" : "esp32s3"
}
}
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: