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

espefuse.py options? (IDFGH-6793) #8420

Closed
fpgamaster opened this issue Feb 16, 2022 · 2 comments
Closed

espefuse.py options? (IDFGH-6793) #8420

fpgamaster opened this issue Feb 16, 2022 · 2 comments
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@fpgamaster
Copy link

  • IDF version: v5.0-dev-1426-ge899edd793
  • Operating System: Linux

Problem Description

espefuse.py execute_scripts ./my_efuses.py --do-not-confirm --chip esp32 --force-write-always
Connecting....
usage: espefuse.py [-h] [--chip {auto,esp32,esp32s2,esp32s3beta2,esp32s3,esp32c3,esp32h2beta1}] [--baud BAUD] [--port PORT]
[--before {default_reset,no_reset,esp32r1,no_reset_no_sync}] [--debug] [--virt]
[--path-efuse-file PATH_EFUSE_FILE] [--do-not-confirm]
{burn_efuse,read_protect_efuse,write_protect_efuse,burn_block_data,burn_bit,adc_info,dump,summary,execute_scripts,check_error,burn_key,burn_key_digest,set_flash_voltage,burn_custom_mac,get_custom_mac}
...
espefuse.py: error: unrecognized arguments: --force-write-always

At the same time:
espefuse.py execute_scripts ./my_efuses.py --do-not-confirm --chip esp32
Connecting......
espefuse.py v3.3-dev
connected chip: ESP32-D0WD-V3 (revision 3), coding scheme NONE (BLK1-3 len=256 bits)
Burn keys to blocks:

  • BLOCK2 -> [85 5e ea e1 3e 78 b5 68 a6 c7 14 31 04 5f 00 46 8e d6 25 63 55 8b 35 ab 81 76 69 1f c0 b4 7b 1d]
    Reversing the byte order

A fatal error occurred: BLOCK2 is read-protected. The written value can not be read, the efuse/block looks as all 0.
Burn in this case may damage an already written value.(use '--force-write-always' option to ignore it)

@espressif-bot espressif-bot added the Status: Opened Issue is new label Feb 16, 2022
@github-actions github-actions bot changed the title espefuse.py options? espefuse.py options? (IDFGH-6793) Feb 16, 2022
@KonstantinKondrashov
Copy link
Collaborator

Hi @fpgamaster!
The execute_scripts command does not have the --force-write-always flag. You can see what options are available for the command with --help. espefuse.py -c esp32 execute_scripts -h.

Seems inside your my_efuses.py you use something burn_key flash_encryption file_to_key.bin.

A fatal error occurred: BLOCK2 is read-protected. The written value can not be read, the efuse/block looks as all 0.
Burn in this case may damage an already written value.(use '--force-write-always' option to ignore it)

This message is related to the burn_key from the script. If you want to force it just change it to burn_key flash_encryption file_to_key.bin --force-write-always.

Note: seems like you already run this script once, it is why you see the message, maybe you need to skip this command based on read-protection efuses["BLOCK2"].is_readable().

@fpgamaster
Copy link
Author

Hi @KonstantinKondrashov,
Thanks for the reply!
Ok, the execute_scripts command does not have the force option but the error message is misleading.

Best regards

@espressif-bot espressif-bot added Status: In Progress Work is in progress Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally and removed Status: Opened Issue is new Status: In Progress Work is in progress labels Feb 18, 2022
@espressif-bot espressif-bot added Status: Opened Issue is new and removed Resolution: NA Issue resolution is unavailable Status: Done Issue is done internally labels Feb 22, 2022
@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally and removed Status: Opened Issue is new labels Mar 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally
Projects
None yet
Development

No branches or pull requests

3 participants