-
Notifications
You must be signed in to change notification settings - Fork 131
IEP-1613 Encrypted Flash: regular flash command is not separated from encrypted-flash command #1301
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
base: master
Are you sure you want to change the base?
Changes from 2 commits
0dbc6d1
bf79162
5f05e41
e99cb4d
67c24cc
4479c66
2e51f6a
9a16576
5ab81cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -39,22 +39,22 @@ public interface IDFConstants | |||||||||||||||||||||
* idf python file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_PYTHON_SCRIPT = "idf.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf.py list targets | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_LIST_TARGETS_CMD = "--list-targets"; //$NON-NLS-1$ | ||||||||||||||||||||||
String IDF_LIST_TARGETS_CMD = "--list-targets"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf_monitor python file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_MONITOR_PYTHON_SCRIPT = "idf_monitor.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf sysviewtrace_proc script file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_SYSVIEW_TRACE_SCRIPT = "sysviewtrace_proc.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf app_trace_folder | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
|
@@ -64,17 +64,17 @@ public interface IDFConstants | |||||||||||||||||||||
* idf tools file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_TOOLS_SCRIPT = "idf_tools.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf_monitor.py | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_MONITOR_SCRIPT = "idf_monitor.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf size file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String IDF_SIZE_SCRIPT = "idf_size.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* idf tools.json file for installable tools | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
|
@@ -84,9 +84,11 @@ public interface IDFConstants | |||||||||||||||||||||
* <IDF_PATH>/tools | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String TOOLS_FOLDER = "tools"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String FLASH_CMD = "flash"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String FLASH_ENCRYPTED_CMD = "encrypted-flash"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
Comment on lines
88
to
+91
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainEncrypted command name likely incorrect; align with idf.py target "encrypted-app-flash". idf.py exposes "encrypted-app" and "encrypted-app-flash" targets; "encrypted-flash" is not a known target. Using the wrong subcommand will fail at runtime. Recommend switching the value to "encrypted-app-flash" (keep the constant name if you want to minimize ripples), and audit call sites. Apply: - String FLASH_ENCRYPTED_CMD = "encrypted-flash"; //$NON-NLS-1$
+ String FLASH_ENCRYPTED_CMD = "encrypted-app-flash"; //$NON-NLS-1$ To double-check usages and docs across the repo: 🏁 Script executed: #!/bin/bash
# Look for potential mismatches
rg -nP -C2 '(encrypted[-_]app[-_]flash|encrypted[-_]flash|FLASH_ENCRYPTED_CMD|flash_command)' Length of output: 3520 Replace incorrect “encrypted-flash” constant and update UI tooltip --- a/bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFConstants.java
+++ b/bundles/com.espressif.idf.core/src/com/espressif/idf/core/IDFConstants.java
@@ -88,7 +88,7 @@
String FLASH_CMD = "flash"; //$NON-NLS-1$
- String FLASH_ENCRYPTED_CMD = "encrypted-flash"; //$NON-NLS-1$
+ String FLASH_ENCRYPTED_CMD = "encrypted-app-flash"; //$NON-NLS-1$ Also update the Messages.properties tooltip so it reflects the two valid targets (“flash” and “encrypted-app-flash”): --- a/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties
+++ b/bundles/com.espressif.idf.terminal.connector.serial/src/com/espressif/idf/terminal/connector/serial/nls/Messages.properties
@@ -15,1 +15,1 @@
-SerialSettingsPage_EncryptionOptionTooltip1=Enable Flash Encryption. Ctrl+F and Ctrl+A will trigger the encrypted-flash and encrypted-app-flash commands.
+SerialSettingsPage_EncryptionOptionTooltip1=Enable Flash Encryption. Ctrl+F and Ctrl+A will trigger the flash and encrypted-app-flash commands. Audit any other references to “encrypted-flash” to ensure consistency. 📝 Committable suggestion
Suggested change
Suggested change
🤖 Prompt for AI Agents
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* <IDF_PATH>/tools/cmake | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
|
@@ -106,7 +108,7 @@ public interface IDFConstants | |||||||||||||||||||||
* Json config menu file name | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String KCONFIG_MENUS_JSON = "kconfig_menus.json"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* sdk config json file | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
|
@@ -130,28 +132,28 @@ public interface IDFConstants | |||||||||||||||||||||
String TOOLS_INSTALL_CMD = "install"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_INSTALL_ALL_CMD = "all"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_INSTALL_PYTHON_CMD = "install-python-env"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_LIST_CMD = "list"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_EXPORT_FORMAT_KEYVALUE = "key-value"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_EXPORT_CMD_FORMAT = "--format"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String TOOLS_EXPORT_CMD_FORMAT_VAL = TOOLS_EXPORT_CMD_FORMAT + "=" + TOOLS_EXPORT_FORMAT_KEYVALUE; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String PYTHON_CMD = "python"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String PYTHON3_CMD = "python3"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* <IDF_PATH>/components | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String COMPONENTS_FOLDER = "components"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String ESP_CORE_DUMP_FOLDER = "espcoredump"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String ESP_CORE_DUMP_SCRIPT = "espcoredump.py"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
|
@@ -172,13 +174,13 @@ public interface IDFConstants | |||||||||||||||||||||
String ESP_TOOL_CHIP_ID_CMD = "chip_id"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String ESP_TOOL_ERASE_FLASH_CMD = "erase_flash"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String ESP_WRITE_FLASH_CMD = "write_flash"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
/** | ||||||||||||||||||||||
* Property to store project custom build directory | ||||||||||||||||||||||
*/ | ||||||||||||||||||||||
String BUILD_DIR_PROPERTY = "idf.buildDirectory.property"; //$NON-NLS-1$ | ||||||||||||||||||||||
|
||||||||||||||||||||||
String PROECT_DESCRIPTION_JSON = "project_description.json"; //$NON-NLS-1$ | ||||||||||||||||||||||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Verify command naming consistency ("encrypted-flash" vs "encrypted-app-flash").
The description mentions "encrypted-app-flash" while the new constant reportedly uses "encrypted-flash". Ensure the emitted value exactly matches supported idf.py targets across ESP-IDF versions.
Run:
🏁 Script executed:
Length of output: 14698
Align plugin.xml description with actual command name
In plugin.xml (lines 345–348), replace “encrypted-app-flash” with “encrypted-flash” so the description matches IDFConstants.FLASH_ENCRYPTED_CMD ("encrypted-flash") and the idf.py CLI targets.
🤖 Prompt for AI Agents