Skip to content

Commit ade3088

Browse files
committed
feat(espefuse): Rename all commands to use dashes and add tests for deprecated commands
1 parent a45d824 commit ade3088

17 files changed

+354
-332
lines changed

docs/en/espefuse/adc-info-cmd.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,24 @@
33
Adc Info
44
========
55

6-
The ``espefuse.py adc_info`` command displays information about ADC calibration data stored in eFuse.
6+
The ``espefuse.py adc-info`` command displays information about ADC calibration data stored in eFuse.
77

88
.. only:: esp32
99

1010
.. code-block:: none
1111
12-
> espefuse.py adc_info
12+
> espefuse.py adc-info
1313
14-
=== Run "adc_info" command ===
14+
=== Run "adc-info" command ===
1515
ADC VRef calibration: 1121mV
1616
1717
.. only:: esp32c3 or esp32s2 or esp32s3
1818

1919
.. code-block:: none
2020
21-
> espefuse.py adc_info
21+
> espefuse.py adc-info
2222
23-
=== Run "adc_info" command ===
23+
=== Run "adc-info" command ===
2424
Temperature Sensor Calibration = -2.1C
2525
2626
ADC1 readings stored in efuse BLOCK2:
@@ -47,9 +47,9 @@ The ``espefuse.py adc_info`` command displays information about ADC calibration
4747

4848
.. code-block:: none
4949
50-
> espefuse.py adc_info
50+
> espefuse.py adc-info
5151
52-
=== Run "adc_info" command ===
52+
=== Run "adc-info" command ===
5353
RF_REF_I_BIAS_CONFIG: 0
5454
LDO_VOL_BIAS_CONFIG_LOW: 0
5555
LDO_VOL_BIAS_CONFIG_HIGH: 0

docs/en/espefuse/burn-bit-cmd.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Burn Bit
44
========
55

6-
The ``espefuse.py burn_bit`` command burns bits in eFuse blocks by bit number. This is useful when the fields are not represented in the eFuse table.
6+
The ``espefuse.py burn-bit`` command burns bits in eFuse blocks by bit number. This is useful when the fields are not represented in the eFuse table.
77

88
Positional arguments:
99

@@ -21,9 +21,9 @@ Burning bits to BLOCK2:
2121

2222
.. code-block:: none
2323
24-
> espefuse.py burn_bit BLOCK2 15 16 17 18 19 20
24+
> espefuse.py burn-bit BLOCK2 15 16 17 18 19 20
2525
26-
=== Run "burn_bit" command ===
26+
=== Run "burn-bit" command ===
2727
bit_number: [255]........................................................[0]
2828
BLOCK2 : 0x00000000000000000000000000000000000000000000000000000000001f8000
2929
BLOCK2 (secure_boot_v1 s) [2 ] regs_to_write: 001f8000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
@@ -44,17 +44,17 @@ Burning in Multiple Blocks
4444

4545
.. code-block:: none
4646
47-
> espefuse.py --virt burn_bit BLOCK2 15 16 17 18 19 20 \
48-
burn_bit BLOCK3 15 16 17 18 19 20
47+
> espefuse.py --virt burn-bit BLOCK2 15 16 17 18 19 20 \
48+
burn-bit BLOCK3 15 16 17 18 19 20
4949
50-
=== Run "burn_bit" command ===
50+
=== Run "burn-bit" command ===
5151
bit_number: [255]........................................................[0]
5252
BLOCK2 : 0x00000000000000000000000000000000000000000000000000000000001f8000
5353
BLOCK2 (secure_boot_v1 s) [2 ] regs_to_write: 001f8000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
5454
5555
Batch mode is enabled, the burn will be done at the end of the command.
5656
57-
=== Run "burn_bit" command ===
57+
=== Run "burn-bit" command ===
5858
bit_number: [255]........................................................[0]
5959
BLOCK3 : 0x00000000000000000000000000000000000000000000000000000000001f8000
6060
BLOCK3 ( ) [3 ] regs_to_write: 001f8000 00000000 00000000 00000000 00000000 00000000 00000000 00000000

docs/en/espefuse/burn-block-data-cmd.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Burn Block Data
44
===============
55

6-
The ``espefuse.py burn_block_data`` command allows writing arbitrary data (non-key data) from a file into an eFuse block, for software use.
6+
The ``espefuse.py burn-block-data`` command allows writing arbitrary data (non-key data) from a file into an eFuse block, for software use.
77

88
This command is available in ``espefuse.py`` v2.6 and newer.
99

@@ -23,9 +23,9 @@ Optional arguments:
2323

2424
.. code-block:: none
2525
26-
> espefuse.py -p PORT burn_block_data --offset 6 BLOCK3 device_id.bin
26+
> espefuse.py -p PORT burn-block-data --offset 6 BLOCK3 device_id.bin
2727
28-
=== Run "burn_block_data" command ===
28+
=== Run "burn-block-data" command ===
2929
[03] BLOCK3 size=32 bytes, offset=06 - > [00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 00 00 00 00 00 00 00 00].
3030
3131
Check all blocks for burn...
@@ -56,4 +56,4 @@ Peculiarities
5656
= 00 00 00 00 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f 00 00 00 00 00 00 00 00 00 00 R/W
5757
5858
2. Part of the eFuse block can be written at a time. The ``--offset`` argument allows writing to a byte offset inside the eFuse block itself.
59-
3. This command is not suitable for writing key data which will be used by flash encryption or secure boot hardware, use ``burn_key`` for this.
59+
3. This command is not suitable for writing key data which will be used by flash encryption or secure boot hardware, use ``burn-key`` for this.

docs/en/espefuse/burn-custom-mac-cmd.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Burn Custom Mac
44
===============
55

6-
The ``espefuse.py burn_custom_mac`` command burns a 48-bit Custom MAC Address.
6+
The ``espefuse.py burn-custom-mac`` command burns a 48-bit Custom MAC Address.
77

88
Positional arguments:
99

@@ -25,9 +25,9 @@ If ``CUSTOM_MAC`` is placed in an eFuse block with a coding scheme and already h
2525

2626
.. code-block:: none
2727
28-
> espefuse.py burn_custom_mac 48:63:92:15:72:16
28+
> espefuse.py burn-custom-mac 48:63:92:15:72:16
2929
30-
=== Run "burn_custom_mac" command ===
30+
=== Run "burn-custom-mac" command ===
3131
- 'MAC_VERSION' (Version of the MAC field) 0x00 -> 0x1
3232
- 'CUSTOM_MAC' (Custom MAC) 0x000000000000 -> 0x167215926348
3333
- 'CUSTOM_MAC_CRC' (CRC of custom MAC) 0x00 -> 0x75
@@ -63,9 +63,9 @@ If ``CUSTOM_MAC`` is placed in an eFuse block with a coding scheme and already h
6363

6464
.. code-block:: none
6565
66-
> espefuse.py burn_custom_mac 48:63:92:15:72:16
66+
> espefuse.py burn-custom-mac 48:63:92:15:72:16
6767
68-
=== Run "burn_custom_mac" command ===
68+
=== Run "burn-custom-mac" command ===
6969
- 'CUSTOM_MAC' (Custom MAC addr) 0x000000000000 -> 0x167215926348
7070
7171
Check all blocks for burn...
@@ -97,9 +97,9 @@ If ``CUSTOM_MAC`` is placed in an eFuse block with a coding scheme and already h
9797

9898
.. code-block:: none
9999
100-
> espefuse.py burn_custom_mac 48:63:92:15:72:16
100+
> espefuse.py burn-custom-mac 48:63:92:15:72:16
101101
102-
=== Run "burn_custom_mac" command ===
102+
=== Run "burn-custom-mac" command ===
103103
- 'CUSTOM_MAC' (Custom MAC Address) 0x000000000000 -> 0x167215926348
104104
105105
Check all blocks for burn...

docs/en/espefuse/burn-efuse-cmd.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Burn eFuse
44
==========
55

6-
The ``espefuse.py burn_efuse`` command burns eFuses. The arguments to ``burn_efuse`` are eFuse names (as shown in summary output) and new values.
6+
The ``espefuse.py burn-efuse`` command burns eFuses. The arguments to ``burn-efuse`` are eFuse names (as shown in summary output) and new values.
77

88
Positional arguments:
99

@@ -16,15 +16,15 @@ Optional arguments:
1616

1717
It can be list of eFuse names and values (like EFUSE_NAME1 1 EFUSE_NAME2 7 EFUSE_NAME3 10 etc.).
1818

19-
New values can be a numeric value in decimal or hex (with "0x" prefix). eFuse bits can only be burned from 0 to 1, attempting to set any back to 0 will have no effect. Most eFuses have a limited bit width (many are only 1-bit flags). Longer eFuses (MAC addresses, keys) can be set with this command, but it's better to use a specific command (``burn_custom_mac``, ``burn_key``) for a specific field.
19+
New values can be a numeric value in decimal or hex (with "0x" prefix). eFuse bits can only be burned from 0 to 1, attempting to set any back to 0 will have no effect. Most eFuses have a limited bit width (many are only 1-bit flags). Longer eFuses (MAC addresses, keys) can be set with this command, but it's better to use a specific command (``burn-custom-mac``, ``burn-key``) for a specific field.
2020

2121
This command supports simultaneous burning of multiple eFuses, it doesn't matter if they are from different eFuse blocks or not. The format is the same as for burning just one eFuse, just list the eFuse name and value pairs, see the example below.
2222

2323
.. code-block:: none
2424
25-
> espefuse.py --port /dev/ttyUSB0 burn_efuse DIS_USB_JTAG 1 VDD_SPI_AS_GPIO 1
25+
> espefuse.py --port /dev/ttyUSB0 burn-efuse DIS_USB_JTAG 1 VDD_SPI_AS_GPIO 1
2626
27-
=== Run "burn_efuse" command ===
27+
=== Run "burn-efuse" command ===
2828
The efuses to burn:
2929
from BLOCK0
3030
- DIS_USB_JTAG
@@ -102,4 +102,4 @@ For example:
102102
103103
SPI_PAD_CONFIG_CS0 Override SD_CMD pad (GPIO11/SPICS0) = 32 R/W (0x1e)
104104
105-
If using the ``burn_efuse`` command to configure these pins, always specify the actual GPIO number you wish to set.
105+
If using the ``burn-efuse`` command to configure these pins, always specify the actual GPIO number you wish to set.

docs/en/espefuse/burn-key-cmd.rst

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Burn Key
44
========
55

6-
The ``espefuse.py burn_key`` command burns keys to eFuse blocks:
6+
The ``espefuse.py burn-key`` command burns keys to eFuse blocks:
77

88
.. list::
99

@@ -78,7 +78,7 @@ Optional arguments:
7878

7979
.. only:: esp32h2
8080

81-
{IDF_TARGET_NAME} has the ECDSA accelerator for signature purposes and supports private keys based on the NIST192p or NIST256p curve. These two commands below can be used to generate such keys (``PEM`` file). The ``burn_key`` command with the ``ECDSA_KEY`` purpose takes the ``PEM`` file and writes the private key into a eFuse block. The key is written to the block in reverse byte order.
81+
{IDF_TARGET_NAME} has the ECDSA accelerator for signature purposes and supports private keys based on the NIST192p or NIST256p curve. These two commands below can be used to generate such keys (``PEM`` file). The ``burn-key`` command with the ``ECDSA_KEY`` purpose takes the ``PEM`` file and writes the private key into a eFuse block. The key is written to the block in reverse byte order.
8282

8383
For NIST192p, the private key is 192 bits long, so 8 padding bytes ("0x00") are added.
8484

@@ -146,7 +146,7 @@ By default, when an encryption key block is burned it is also read and write pro
146146

147147
.. code-block:: none
148148
149-
espefuse.py burn_key secure_boot_v1 secure_boot_key_v1.bin
149+
espefuse.py burn-key secure_boot_v1 secure_boot_key_v1.bin
150150
151151
.. only:: esp32
152152

@@ -166,9 +166,9 @@ Usage
166166

167167
.. code-block:: none
168168
169-
> espefuse.py burn_key flash_encryption 256bit_fe_key.bin
169+
> espefuse.py burn-key flash_encryption 256bit_fe_key.bin
170170
171-
=== Run "burn_key" command ===
171+
=== Run "burn-key" command ===
172172
Sensitive data will be hidden (see --show-sensitive-info)
173173
Burn keys to blocks:
174174
- BLOCK1 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
@@ -209,9 +209,9 @@ Usage
209209

210210
.. code-block:: none
211211
212-
> espefuse.py burn_key flash_encryption 256bit_fe_key.bin --no-protect-key
212+
> espefuse.py burn-key flash_encryption 256bit_fe_key.bin --no-protect-key
213213
214-
=== Run "burn_key" command ===
214+
=== Run "burn-key" command ===
215215
Sensitive data will be hidden (see --show-sensitive-info)
216216
Burn keys to blocks:
217217
- BLOCK1 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
@@ -256,9 +256,9 @@ Usage
256256
257257
.. code-block:: none
258258
259-
> espefuse.py burn_key BLOCK_KEY0 ~/esp/tests/efuse/512bits_0.bin XTS_AES_256_KEY --no-read-protect
259+
> espefuse.py burn-key BLOCK_KEY0 ~/esp/tests/efuse/512bits_0.bin XTS_AES_256_KEY --no-read-protect
260260
261-
=== Run "burn_key" command ===
261+
=== Run "burn-key" command ===
262262
Sensitive data will be hidden (see --show-sensitive-info)
263263
Burn keys to blocks:
264264
- BLOCK_KEY0 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
@@ -309,10 +309,10 @@ Usage
309309
.. code-block:: none
310310
311311
> espefuse.py -c esp32c2 \
312-
burn_key_digest secure_images/ecdsa256_secure_boot_signing_key_v2.pem \
313-
burn_key BLOCK_KEY0 images/efuse/128bit_key.bin XTS_AES_128_KEY_DERIVED_FROM_128_EFUSE_BITS
312+
burn-key-digest secure_images/ecdsa256_secure_boot_signing_key_v2.pem \
313+
burn-key BLOCK_KEY0 images/efuse/128bit_key.bin XTS_AES_128_KEY_DERIVED_FROM_128_EFUSE_BITS
314314
315-
=== Run "burn_key_digest" command ===
315+
=== Run "burn-key-digest" command ===
316316
Sensitive data will be hidden (see --show-sensitive-info)
317317
Burn keys to blocks:
318318
- BLOCK_KEY0_HI_128 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
@@ -321,7 +321,7 @@ Usage
321321
322322
Batch mode is enabled, the burn will be done at the end of the command.
323323
324-
=== Run "burn_key" command ===
324+
=== Run "burn-key" command ===
325325
Sensitive data will be hidden (see --show-sensitive-info)
326326
Burn keys to blocks:
327327
- BLOCK_KEY0_LOW_128 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]

docs/en/espefuse/burn-key-digest-cmd.rst

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
.. _burn-key-digest-cmd:
22

3-
Burn key Digest
3+
Burn Key Digest
44
===============
55

6-
The ``espefuse.py burn_key_digest`` command parses a RSA public key and burns the digest to eFuse block for use with `Secure Boot V2 <https://docs.espressif.com/projects/esp-idf/en/latest/{IDF_TARGET_PATH_NAME}/security/secure-boot-v2.html#signature-block-format>`_.
6+
The ``espefuse.py burn-key-digest`` command parses a RSA public key and burns the digest to eFuse block for use with `Secure Boot V2 <https://docs.espressif.com/projects/esp-idf/en/latest/{IDF_TARGET_PATH_NAME}/security/secure-boot-v2.html#signature-block-format>`_.
77

88
Positional arguments:
99

@@ -44,9 +44,9 @@ Usage
4444

4545
.. code-block:: none
4646
47-
> espefuse.py burn_key_digest secure_boot_key_v2_0.pem
47+
> espefuse.py burn-key-digest secure_boot_key_v2_0.pem
4848
49-
=== Run "burn_key_digest" command ===
49+
=== Run "burn-key-digest" command ===
5050
Sensitive data will be hidden (see --show-sensitive-info)
5151
- BLOCK2 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
5252
Disabling write to efuse BLOCK2...
@@ -75,9 +75,9 @@ Usage
7575

7676
.. code-block:: none
7777
78-
> espefuse.py burn_key_digest secure_boot_v2_ecdsa192.pem
78+
> espefuse.py burn-key-digest secure_boot_v2_ecdsa192.pem
7979
80-
=== Run "burn_key_digest" command ===
80+
=== Run "burn-key-digest" command ===
8181
Sensitive data will be hidden (see --show-sensitive-info)
8282
Burn keys to blocks:
8383
- BLOCK_KEY0_HI_128 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]
@@ -114,12 +114,12 @@ Usage
114114

115115
.. code-block:: none
116116
117-
> espefuse.py burn_key_digest \
117+
> espefuse.py burn-key-digest \
118118
BLOCK_KEY0 ~/esp/tests/efuse/secure_boot_key_v2_0.pem SECURE_BOOT_DIGEST0 \
119119
BLOCK_KEY1 ~/esp/tests/efuse/secure_boot_key_v2_1.pem SECURE_BOOT_DIGEST1 \
120120
BLOCK_KEY2 ~/esp/tests/efuse/secure_boot_key_v2_2.pem SECURE_BOOT_DIGEST2
121121
122-
=== Run "burn_key_digest" command ===
122+
=== Run "burn-key-digest" command ===
123123
Sensitive data will be hidden (see --show-sensitive-info)
124124
Burn keys to blocks:
125125
- BLOCK_KEY0 -> [?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ??]

docs/en/espefuse/check-error-cmd.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Check Error
44
===========
55

6-
The ``espefuse.py check_error`` command checks eFuse errors. It triggers several reads to force the eFuse controller to reload eFuses and update status registers. This command can be run after burn operations to make sure that there is not errors.
6+
The ``espefuse.py check-error`` command checks eFuse errors. It triggers several reads to force the eFuse controller to reload eFuses and update status registers. This command can be run after burn operations to make sure that there is not errors.
77

88
Optional argument:
99

@@ -31,7 +31,7 @@ Checks the status registers of eFuse blocks and throws an error if there is an e
3131

3232
.. code-block:: none
3333
34-
> espefuse.py check_error
34+
> espefuse.py check-error
3535
3636
Error(s) in BLOCK1 [ERRORS:0 FAIL:1]
3737
Error(s) in BLOCK2 [ERRORS:1 FAIL:1]
@@ -41,7 +41,7 @@ Checks the status registers of eFuse blocks and throws an error if there is an e
4141
EFUSE_RD_RS_ERR0_REG 0x00008990
4242
EFUSE_RD_RS_ERR1_REG 0x00000000
4343
44-
=== Run "check_error" command ===
44+
=== Run "check-error" command ===
4545
Error(s) in BLOCK1 [ERRORS:0 FAIL:1]
4646
Error(s) in BLOCK2 [ERRORS:1 FAIL:1]
4747
Error(s) in BLOCK3 [ERRORS:1 FAIL:1]
@@ -56,7 +56,7 @@ Repairs encoding errors in eFuse blocks, if possible.
5656

5757
.. code-block:: none
5858
59-
> espefuse.py check_error --recovery
59+
> espefuse.py check-error --recovery
6060
6161
Error(s) in BLOCK1 [ERRORS:0 FAIL:1]
6262
Error(s) in BLOCK2 [ERRORS:1 FAIL:1]
@@ -66,7 +66,7 @@ Repairs encoding errors in eFuse blocks, if possible.
6666
EFUSE_RD_RS_ERR0_REG 0x00008990
6767
EFUSE_RD_RS_ERR1_REG 0x00000000
6868
69-
=== Run "check_error" command ===
69+
=== Run "check-error" command ===
7070
Error(s) in BLOCK1 [ERRORS:0 FAIL:1]
7171
Error(s) in BLOCK2 [ERRORS:1 FAIL:1]
7272
Error(s) in BLOCK3 [ERRORS:1 FAIL:1]

0 commit comments

Comments
 (0)