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

Secure Download Mode - Failed to enter Flash download mode 01060000 (IDFGH-9611) #10959

Closed
3 tasks done
ddomnik opened this issue Mar 9, 2023 · 12 comments
Closed
3 tasks done
Assignees
Labels
Resolution: Done Issue is done internally Status: Done Issue is done internally

Comments

@ddomnik
Copy link

ddomnik commented Mar 9, 2023

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

The Security Features are set as the following:
image

Disable download stub is also selected.
The eFuse is burnt to Secure Download mode.
I am able to flash the app partitions, bootloader and so on. Also via esptool.py.

However, I am not able to flash generic .bins that contain data on e.g. data-nvs partitions.
Is this an intended behavior?

Version / ESP

ESP32-S3-WROOM-1-N16R2
IDF 5.0

@espressif-bot espressif-bot added the Status: Opened Issue is new label Mar 9, 2023
@github-actions github-actions bot changed the title Secure Download Mode - Failed to enter Flash download mode 01060000 Secure Download Mode - Failed to enter Flash download mode 01060000 (IDFGH-9611) Mar 9, 2023
@mahavirj
Copy link
Member

mahavirj commented Mar 10, 2023

I am able to flash the app partitions, bootloader and so on. Also via esptool.py.
However, I am not able to flash generic .bins that contain data on e.g. data-nvs partitions.

What error you are getting for flashing generic binaries? Please share detailed log,

@ddomnik
Copy link
Author

ddomnik commented Mar 10, 2023

@mahavirj Thanks for the reply, sorry missed that. Here are some logs:

Full flashing via IDE:

Executing action: flash
Running ninja in directory c:\users\USER\documents\esp\myApp\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\Users\USER\Documents\esp\myApp\build\esp-idf\esptool_py && python C:/Espressif/frameworks/esp-idf-v5.0/components/partition_table/check_sizes.py --offset 0xc000 partition --type app C:/Users/USER/Documents/esp/myApp/build/partition_table/partition-table.bin C:/Users/USER/Documents/esp/myApp/build/Appl.bin"
Appl.bin binary size 0x1e1000 bytes. Smallest app partition is 0x280000 bytes. 0x9f000 bytes (25%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\Users\USER\Documents\esp\myApp\build\bootloader\esp-idf\esptool_py && python C:/Espressif/frameworks/esp-idf-v5.0/components/partition_table/check_sizes.py --offset 0xc000 bootloader 0x0 C:/Users/USER/Documents/esp/myApp/build/bootloader/bootloader.bin"
Bootloader binary size 0xa000 bytes. 0x2000 bytes (17%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.0\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.0 -D SERIAL_TOOL=python;;C:/Espressif/frameworks/esp-idf-v5.0/components/esptool_py/esptool/esptool.py;--chip;esp32s3 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=no_reset;--no-stub;write_flash;@flash_args -D WORKING_DIRECTORY=C:/Users/USER/Documents/esp/xxx/build -P C:/Espressif/frameworks/esp-idf-v5.0/components/esptool_py/run_serial_tool.cmake"
esptool esp32s3 -p COM4 -b 1500000 --before=default_reset --after=no_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size keep 0x10000 Appl.bin 0xc000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin

esptool.py v4.5.1
Serial port COM4
Connecting....
Chip is ESP32-S3 in Secure Download Mode
Changing baud rate to 1500000
Changed.
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00010000 to 0x001f0fff...
Flash will be erased from 0x0000c000 to 0x0000cfff...
Flash will be erased from 0x0000d000 to 0x0000efff...
Erasing flash...
Took 1.08s to erase flash block
Writing at 0x00010000... (0 %)
Writing at 0x00010400... (0 %)
Writing at 0x00010800... (0 %)
-> works

Generic .bin flashing:

esptool.py -p COM4 write_flash 0x613000 .\generic_data\nvs.bin
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00613000 to 0x0061bfff...
Erasing flash...

A fatal error occurred: Failed to enter Flash download mode (result was 01060000: Operation or feature not supported)

Writing built partition table:

esptool.py -p COM4 write_flash 0xc000 .\build\partition_table\partition-table.bin
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x0000c000 to 0x0000cfff...
Erasing flash...
Took 0.06s to erase flash block
Wrote 3072 bytes at 0x0000c000 in 0.4 seconds (69.8 kbit/s)...

Leaving...
Hard resetting via RTS pin...

Erasing flash:

esptool.py -p COM4 erase_flash
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Erasing flash (this may take a while)...

A fatal error occurred: ESP32-S3 ROM does not support function erase_flash.

Could it be that I have to somehow sign manually created binaries?

Edit:
I tried to manually sign the nvs.bin but no luck either:

espsecure.py sign_data .\generic_data\nvs.bin--version 2 --keyfile .\secure_boot_signing_key.pem
espsecure.py v4.5.1
1 signing key(s) found.
Signed 36864 bytes of data from .\generic_data\nvs.bin. Signature sector now has 1 signature blocks.

esptool.py -p COM4 write_flash 0x613000 .\generic_data\nvs.bin
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Configuring flash size...
Flash will be erased from 0x00613000 to 0x0061cfff...
Erasing flash...

A fatal error occurred: Failed to enter Flash download mode (result was 01060000: Operation or feature not supported)

@gm-jiang
Copy link
Collaborator

@ddomnik Please check the start address + length and flash chip size. (0x00613000 + 0x0061cfff > flash chip size?)

@ddomnik
Copy link
Author

ddomnik commented Mar 13, 2023

@gm-jiang thanks for the reply, but the size and offset should be fine. (And it also worked at that region before enabling secure download mode)

Chip has 16MB flash.

Reading info does not work either now anymore ...

esptool.py -p COM4 chip_id
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Warning: ESP32-S3 has no Chip ID. Reading MAC instead.
Traceback (most recent call last):
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\cmds.py", line 999, in chip_id
    chipid = esp.chip_id()
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\targets\esp32.py", line 284, in chip_id
    raise NotSupportedError(self, "chip_id")
esptool.util.NotSupportedError: Function chip_id is not supported for ESP32-S3.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "runpy.py", line 194, in _run_module_as_main
  File "runpy.py", line 87, in _run_code
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\__main__.py", line 9, in <module>
    esptool._main()
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\__init__.py", line 1032, in _main
    main()
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\__init__.py", line 832, in main
    operation_func(esp, args)
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\cmds.py", line 1003, in chip_id
    read_mac(esp, args)
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\cmds.py", line 989, in read_mac
    mac = esp.read_mac()
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\targets\esp32s3.py", line 212, in read_mac
    mac0 = self.read_reg(self.MAC_EFUSE_REG)
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\loader.py", line 705, in read_reg
    val, data = self.command(
  File "C:\Espressif\python_env\idf5.0_py3.8_env\lib\site-packages\esptool\loader.py", line 418, in command
    raise UnsupportedCommandError(self, op)
esptool.util.UnsupportedCommandError: This command (0xa) is not supported in Secure Download Mode

@gm-jiang
Copy link
Collaborator

@ddomnik Could you please add option --trace for esptool.py, it will show more detailed logs to help debugging.

@mahavirj
Copy link
Member

@ddomnik

Please note that once secure DL mode is enabled, esptool can only support limited commands. Please refer to this section. You may get basic efuse summary using esptool.py get_security_info command.

As I see it from the logs you shared:

esptool esp32s3 -p COM4 -b 1500000 --before=default_reset --after=no_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size keep 0x10000 Appl.bin 0xc000 partition_table/partition-table.bin 0xd000 ota_data_initial.bin

This command works fine.

esptool.py -p COM4 write_flash 0x613000 .\generic_data\nvs.bin

This one fails. Is it possible for you to try this command with similar arguments (flash configuration, baud etc.) as the 1st one and see the result? Also does NVS offset makes any difference here, maybe keep it just after partition table?

Note: Secure signing does not apply to NVS partition. This problem is more of flash programming failure. And it would help if you try these experiments with --trace option to esptool.py.

@ddomnik
Copy link
Author

ddomnik commented Mar 13, 2023

@mahavirj @gm-jiang
Thanks, I am aware that secure download mode limits some functions, although the doc is not very precise here.

esptool.py --trace --chip esp32s3 -p COM4 -b 1500000 --before=default_reset --after=no_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size keep 0x613000 .\generic_data\nvs.bin
esptool.py v4.5.1
Serial port COM4
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
    0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    55555555                          | UUUU
TRACE +0.003 Write 46 bytes:
    c000082400000000 0007071220555555 | ...$........ UUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    5555555555555555 5555555555c0     | UUUUUUUUUUUUU.
TRACE +0.101 No serial data received.
.TRACE +0.056 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
    0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    55555555                          | UUUU
TRACE +0.005 Write 46 bytes:
    c000082400000000 0007071220555555 | ...$........ UUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    5555555555555555 5555555555c0     | UUUUUUUUUUUUU.
TRACE +0.010 Read 1 bytes: c0
TRACE +0.003 Read 58 bytes:
    0108040007071220 00000000c0c00108 | ....... ........
    0400070712200000 0000c0c001080400 | ..... ..........
    0707122000000000 c0c0010804000707 | ... ............
    122000000000c0c0 0108             | . ........
TRACE +0.001 Received full packet: 010804000707122000000000
TRACE +0.003 Received full packet: 010804000707122000000000
TRACE +0.003 Received full packet: 010804000707122000000000
TRACE +0.003 Received full packet: 010804000707122000000000
TRACE +0.006 Read 53 bytes:
    0400070712200000 0000c0c001080400 | ..... ..........
    0707122000000000 c0c0010804000707 | ... ............
    122000000000c0c0 0108040007071220 | . .............
    00000000c0                        | .....
TRACE +0.001 Received full packet: 010804000707122000000000
TRACE +0.001 Received full packet: 010804000707122000000000
TRACE +0.002 Received full packet: 010804000707122000000000
TRACE +0.002 Received full packet: 010804000707122000000000

TRACE +0.005 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00100040
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.000 Read 1 bytes: 01
TRACE +0.016 Read 1 bytes: 08
TRACE +0.001 Read 109 bytes:
    0400070712200105 0000c0c001080400 | ..... ..........
    0707122001050000 c0c0010804000707 | ... ............
    122001050000c0c0 0108040007071220 | . .............
    01050000c0c00108 0400070712200105 | ............. ..
    0000c0c001080400 0707122001050000 | ........... ....
    c0c0010804000707 122001050000c0c0 | ......... ......
    0108040007071220 01050000c0       | ....... .....
TRACE +0.002 Received full packet: 010804000707122001050000
TRACE +0.003 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.009 Read 1 bytes: c0
TRACE +0.000 Read 33 bytes:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000050000 | ................
    c0                                | .
TRACE +0.001 Received full packet:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000050000 | ................
Chip is ESP32-S3 in Secure Download Mode
Changing baud rate to 1500000
TRACE +0.002 command op=0x0f data len=8 wait_response=1 timeout=3.000 data=60e3160000000000
TRACE +0.000 Write 18 bytes:
    c0000f0800000000 0060e31600000000 | .........`......
    00c0                              | ..
TRACE +0.013 Read 1 bytes: c0
TRACE +0.000 Read 15 bytes: 010f04000707122000000000c0c0c0
TRACE +0.001 Received full packet: 010f04000707122000000000
Changed.
Enabling default SPI flash mode...
TRACE +0.054 command op=0x0d data len=8 wait_response=1 timeout=3.000 data=0000000000000000
TRACE +0.001 Write 18 bytes:
    c0000d0800000000 0000000000000000 | ................
    00c0                              | ..
TRACE +0.008 Read 1 bytes: c0
TRACE +0.002 Read 13 bytes: 010d04000707122000000000c0
TRACE +0.000 Received full packet: 010d04000707122000000000
Configuring flash size...
TRACE +0.002 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.011 Read 1 bytes: c0
TRACE +0.000 Read 33 bytes:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000000000 | ................
    c0                                | .
TRACE +0.001 Received full packet:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000000000 | ................
Flash will be erased from 0x00613000 to 0x0061bfff...
Erasing flash...
TRACE +0.003 command op=0x02 data len=20 wait_response=1 timeout=3.000 data=
    0090000024000000 0004000000306100 | ....$........0a.
    00000000                          | ....
TRACE +0.000 Write 30 bytes:
    c000021400000000 0000900000240000 | .............$..
    0000040000003061 0000000000c0     | ......0a......
TRACE +0.012 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010204000707122001060000c0
TRACE +0.001 Received full packet: 010204000707122001060000

A fatal error occurred: Failed to enter Flash download mode (result was 01060000: Operation or feature not supported)
esptool.py --trace --chip esp32s3 -p COM4 write_flash --flash_size keep 0x613000 .\generic_data\nvs.bin
esptool.py v4.5.1
Serial port COM4
Connecting...TRACE +0.000 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
    0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    55555555                          | UUUU
TRACE +0.004 Write 46 bytes:
    c000082400000000 0007071220555555 | ...$........ UUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    5555555555555555 5555555555c0     | UUUUUUUUUUUUU.
TRACE +0.101 No serial data received.
.TRACE +0.056 command op=0x08 data len=36 wait_response=1 timeout=0.100 data=
    0707122055555555 5555555555555555 | ... UUUUUUUUUUUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    55555555                          | UUUU
TRACE +0.005 Write 46 bytes:
    c000082400000000 0007071220555555 | ...$........ UUU
    5555555555555555 5555555555555555 | UUUUUUUUUUUUUUUU
    5555555555555555 5555555555c0     | UUUUUUUUUUUUU.
TRACE +0.010 Read 1 bytes: c0
TRACE +0.003 Read 60 bytes:
    0108040007071220 00000000c0c00108 | ....... ........
    0400070712200000 0000c0c001080400 | ..... ..........
    0707122000000000 c0c0010804000707 | ... ............
    122000000000c0c0 01080400         | . ..........
TRACE +0.001 Received full packet: 010804000707122000000000
TRACE +0.003 Received full packet: 010804000707122000000000
TRACE +0.003 Received full packet: 010804000707122000000000
TRACE +0.001 Received full packet: 010804000707122000000000
TRACE +0.005 Read 1 bytes: 07
TRACE +0.001 Read 50 bytes:
    07122000000000c0 c001080400070712 | .. .............
    2000000000c0c001 0804000707122000 |  ............. .
    000000c0c0010804 0007071220000000 | ............ ...
    00c0                              | ..
TRACE +0.000 Received full packet: 010804000707122000000000
TRACE +0.002 Received full packet: 010804000707122000000000
TRACE +0.002 Received full packet: 010804000707122000000000
TRACE +0.002 Received full packet: 010804000707122000000000

TRACE +0.007 command op=0x0a data len=4 wait_response=1 timeout=3.000 data=00100040
TRACE +0.000 Write 14 bytes: c0000a04000000000000100040c0
TRACE +0.002 Read 1 bytes: c0
TRACE +0.016 Read 1 bytes: 01
TRACE +0.001 Read 110 bytes:
    0804000707122001 050000c0c0010804 | ...... .........
    0007071220010500 00c0c00108040007 | .... ...........
    07122001050000c0 c001080400070712 | .. .............
    2001050000c0c001 0804000707122001 |  ............. .
    050000c0c0010804 0007071220010500 | ............ ...
    00c0c00108040007 07122001050000c0 | .......... .....
    c001080400070712 2001050000c0     | ........ .....
TRACE +0.012 Received full packet: 010804000707122001050000
TRACE +0.002 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.016 Read 1 bytes: c0
TRACE +0.001 Read 33 bytes:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000050000 | ................
    c0                                | .
TRACE +0.001 Received full packet:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000050000 | ................
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
TRACE +0.002 command op=0x0d data len=8 wait_response=1 timeout=3.000 data=0000000000000000
TRACE +0.000 Write 18 bytes:
    c0000d0800000000 0000000000000000 | ................
    00c0                              | ..
TRACE +0.012 Read 1 bytes: c0
TRACE +0.001 Read 13 bytes: 010d04000707122000000000c0
TRACE +0.000 Received full packet: 010d04000707122000000000
Configuring flash size...
TRACE +0.004 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.010 Read 1 bytes: c0
TRACE +0.001 Read 33 bytes:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000000000 | ................
    c0                                | .
TRACE +0.000 Received full packet:
    0114180007071220 0400000000000000 | ....... ........
    0000000c09000000 0000000000000000 | ................
Flash will be erased from 0x00613000 to 0x0061bfff...
Erasing flash...
TRACE +0.004 command op=0x02 data len=20 wait_response=1 timeout=3.000 data=
    0090000024000000 0004000000306100 | ....$........0a.
    00000000                          | ....
TRACE +0.000 Write 30 bytes:
    c000021400000000 0000900000240000 | .............$..
    0000040000003061 0000000000c0     | ......0a......
TRACE +0.011 Read 1 bytes: c0
TRACE +0.000 Read 13 bytes: 010204000707122001060000c0
TRACE +0.000 Received full packet: 010204000707122001060000

A fatal error occurred: Failed to enter Flash download mode (result was 01060000: Operation or feature not supported)

I tested both commands on a board that has secure download mode disabled as well.
The second one with less arguments worked, the one with more arguments failed there as well.

@gm-jiang
Copy link
Collaborator

@mahavirj @ddomnik I think it is a esptool.py bugs, please see these logs

TRACE +0.003 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.009 Read 1 bytes: c0
TRACE +0.000 Read 33 bytes:
0114180007071220 0400000000000000 | ....... ........
0000000c09000000 0000000000050000 | ................
c0 | .
TRACE +0.001 Received full packet:
0114180007071220 0400000000000000 | ....... ........
0000000c09000000 0000000000050000 | ................
Chip is ESP32-S3 in Secure Download Mode

Configuring flash size...
TRACE +0.002 command op=0x14 data len=0 wait_response=1 timeout=3.000 data=
TRACE +0.001 Write 10 bytes: c00014000000000000c0
TRACE +0.011 Read 1 bytes: c0
TRACE +0.000 Read 33 bytes:
0114180007071220 0400000000000000 | ....... ........
0000000c09000000 0000000000000000 | ................
c0 | .
TRACE +0.001 Received full packet:
0114180007071220 0400000000000000 | ....... ........
0000000c09000000 0000000000000000 | ................

In fact, op=0x14 is used for GetSecurityInfo, so the Configuring flash size did not succeed at all, so it will cause erase flash failed. (the default flash size is set to 2MB)

@ddomnik
Copy link
Author

ddomnik commented Mar 13, 2023

@mahavirj thanks for your analysis. Do you have any solution or workaround (e.g. to set default flash size to 16MB) that I could try ?

esptool.py -p COM4 get_security_info
esptool.py v4.5.1
Serial port COM4
Connecting....
Detecting chip type... ESP32-S3
Chip is ESP32-S3 in Secure Download Mode
WARNING: Stub loader is not supported in Secure Download Mode, setting --no-stub
Enabling default SPI flash mode...
Flags: 0x00000004 (0b100)
Flash_Crypt_Cnt: 0x0
Key_Purposes: (0, 0, 0, 0, 0, 0, 12)
Chip_ID: 9
Api_Version: 0
Hard resetting via RTS pin...

@gm-jiang
Copy link
Collaborator

gm-jiang commented Mar 14, 2023

@ddomnik can you have a try esptool.py --trace --chip esp32s3 -p COM4 -b 1500000 --before=default_reset --after=no_reset --no-stub write_flash --flash_mode dio --flash_freq 80m --flash_size 16MB 0x613000 .\generic_data\nvs.bin

@ddomnik
Copy link
Author

ddomnik commented Mar 14, 2023

@gm-jiang Thanks! The --flash_size 16MB parameter does the trick! Ofc erase_flash is still not working, but I could flash an empty bin as a workaround for that.

If this ticket is not needed for internal bug tracking, feel free to close it.

@espressif-bot espressif-bot added Status: In Progress Work is in progress and removed Status: Opened Issue is new labels Apr 3, 2023
espressif-bot pushed a commit to espressif/esptool that referenced this issue Apr 5, 2023
@mahavirj
Copy link
Member

@ddomnik We have added a fix in the esptool (espressif/esptool@0e9c85e) to report an error in case flash size is not specified with --keep option for the secure ROM DL mode case. This should help to detect the scenario reported here. Closing the issue.

@espressif-bot espressif-bot added Resolution: Done Issue is done internally Status: Done Issue is done internally and removed Status: In Progress Work is in progress labels Apr 24, 2023
Jason2866 added a commit to Jason2866/esptool that referenced this issue Nov 4, 2023
* docs: espsecure remote signing using a HSM broken link fix

* fix(rfc2217_server): Use new reset sequences

* fix(ESP32-S3): Lower CPU freq to improve flasher stub stability

Closes espressif#832

* fix: Unknown chip (ID or magic number) error

* pyinstaller: fix glibc dependency on gnu/linux

pyinstaller package for linux is built within the ubuntu-latest image in
github workflow. This may cause prbolem with glibc symbol versions on
older distributions, where the new symbol versions are not available.
Fix this by building on the older ubuntu version.

Closes espressif#843

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>

* tests: Create custom `host_test` marker for tests without real chip connected

Closes espressif#838

* fix(ESP32-S3): Temporarily disable increasing CPU freq

Related to espressif#848

Related to espressif#842

* build: add esp_rfc2217_server to published scripts

Closes espressif#846

* Update version to v4.5.1

* Update version to v4.6-dev

* espefuse: Hide sensitive info by default during burning burn_key and burn_key_digest

Adds --show-sensitive-info flag for two commands:
burn_key and burn_key_digest.

* flasher_stub: pass -mabi=ilp32 to the RISC-V compiler

This is a no-op change for the upstream toolchain (compiled stubs are
binary identical), but is required when building with Debian's
riscv64-unknown-elf-gcc compiler.

* flasher_stub: allow passing extra CFLAGS

The flasher_stub Makefile allows for some system-local configuration,
either through local.mk, or through environment variables.

For example, the compiler prefix can be overridden, by defining e.g.
CROSS_ESPRISCV32. However, passing additional flags to the compiler
isn't possible right now. Add EXTRA_CFLAGS and EXTRA_CFLAGS_ESPRISCV32
to allow for that option.

* flasher_stub: collect all targets at the top, DRY

* flasher_stub: make target selection more modular

Rather than a special "make esp32", create WITHOUT_* variables to
selectively disable chip families. Currently, WITHOUT_ESP8266,
WITHOUT_ESP32_XTENSA and WITHOUT_ESP32_RISCV32 are defined, but the code
can be easily adjusted to allow for all kinds of other
sets/combinations.

* flasher_stub: create %.json targets, make all a proper PHONY

* flasher_stub: drop --embed from wrap_stub.py

Since commit 94f29a5 the flasher stub is not embedded in the Python
source, but rather included as simple json files.

As such, wrap_stub.py --embed was converted to basically just vary the
build dir. Rather than keep this indirection and for better clarity,
remove that piece of code and replace it by a simple "cp" in the
Makefile.

While at it, replace the target name from "embed" to "install", as this
more akin to a "make install" step.

* espefuse: Support burning ECDSA_KEY from pem file

- fix some assert check in test_espefuse.py
- add tests to cover the new functionality

* espefuse(c2): Fix BLOCK_KEY0 view for summary cmd when SB + FE keys are burnt

For C2 secure boot + flash enc block, we saw that in summary cmd
"0's" from secure boot digest part (upper 128 bit) were translated
into "?'s" when the block was read protected.
For C2, we should apply this translation for lower 128 bits only.

* fix(ESP32-C6): Fix get_pkg_version and get_{major,minor}_chip_version

* image_info: removed check that reserved bytes in image header are zero

IDF may start using parts of the reserved bytes in the extended header at any time,
which will break chip auto-detect in image_info.

* build: limit max cryptography version to 40

* fix: Set flash parameters even with --flash_size keep

Related to espressif/esp-idf#10788

Related to espressif/esp-idf#10959

* build: add arm and arm64 as build target

Closes espressif#845

* Fix typo in serial protocol docs

Fixes misspelling of `triggered` in serial protocol docs.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>

* Support more recent reedsolo packages

- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.6.1 - this seems to be related to licenses only.
- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.7.0 - this is related to installation.

Closes espressif#872

* build(arm): add pip extra url for github action build

* ci: Fix libffi symlinks for cryptography>=40

* espefuse: Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5)

eFuse module has a hardware bug.
It is related to ESP32-C3, C6, S3, H2 chips:
    - BLOCK9 (BLOCK_KEY5) can not be used by XTS_AES keys.
For H2 chips, the BLOCK9 (BLOCK_KEY5) can not be used by ECDSA keys.
S2 does not have such a hardware bug.

* image_info: Display disabled WP pin as disabled

The image formats know about the special value 0xee used to disable WP.
Display this with image_info.

E.g.:

ESP32-C3 extended image header
==============================
WP pin: 0xee (disabled)

* image_info: Print chip ID's name if known

Example:

Flash pins drive settings: clk_drv: 0x0, q_drv: 0x0, d_drv: 0x0, cs0_drv: 0x0, hd_drv: 0x0, wp_drv: 0x0
Chip ID: 5 (ESP32-C3)
Minimal chip revision: v0.0, (legacy min_rev = 0)
Maximal chip revision: v655.35

An unknown ID will be printed as:

Chip ID: 42 (Unknown ID)

* tests: Make the testsuite Windows compatible

* espefuse: Adds external esp instance

Closes espressif#873

* espefuse: Improve efuse error viewing

* espefuse: Explicit setting of efuse time settings

EFUSE_PWR_ON_NUM in C3 has default value = 0x2880, now = 0x3000

* docs(Boot log): Add all esp targets to cover boot troubleshooting

Closes espressif#732

* fix: USB-JTAG-Serial PID detection error

* esptool: Move bootdesc on the top of the ram segment

* espefuse: Move some vars under init method to speedup tool after adding yaml support

* espefuse: Adds yaml efuse description files for all chip

- esptool: Updates eFuses wafer major&minor versions
- esptool(esp32c6): Adds package versions
- espefuse(esp32c6): Replace PKG_VERSION BLK_VERSION_MINOR BLK_VERSION_MAJOR
- espefuse(esp32c6): Adds adc calib efuses
- espefuse: Adds yaml files for Build with PyInstaller

* efuse(H2): Adds RF Calibration Information

* espsecure: Improve error message for incorrect PEM format

Closes espressif#881

* bugfix(usb_jtag_serial): Autofeed super watchdog (SWD) to avoid resets during flashing

* esptool: Read 64-bit MAC address on C6 and H2

* bugfix: Adjust wrapper scripts to not import themselves

* bugfix(espsecure): Print a clear error message if incompatible OpenSSL backend is used

Closes espressif#878

* fix: inconsistent usage of dirs separator

* feat(esptool): add option to dump whole flash based on detected size

Closes espressif#461

* Update version to v4.6

* Update version to v4.7-dev

* fix(ESP32-S3): Correct RTC WDT registers to fix resets during flashing

* Update version to v4.6.1

* Update version to v4.7-dev

* docs: add explanation for flash_id example to avoid confusion

* docs(boot-log): fix list formatting

* docs: add c2, c6 and h2 as build targets

* fix(compressed upload): Accept short data blocks with only Adler-32 bytes

* fix(CH9102F): Suggest to install new serial drivers if writing to RAM fails

* esptool & espefuse: Fix byte order in MAC (for C6 and H2)

MAC: 60:55:f9:ff:fe:f7:2c:a2 (EUI64, used for IEEE802154)
BASE MAC: 60:55:f9:f7:2c:a2 (used for BT)
MAC_EXT: ff:fe

* Update version to v4.6.2

* Update version to v4.7

* change: Add conventional precommit linter

* ci(pre-commit): Update version of `conventional-precommit-linter`

* feat(get_security_info): Improved the output format and added more
details

* fix(esp32-c2): Enable flashing in secure download mode

Closes espressif#895

* ci: Add DangerJS checks to GL and GH

* feat(esptool): Add PICO package for ESP32S3 and flash/psram efuses

* feat(esptool): Add tests for get_chip_features

* feat(esptool): Add new packages for ESP32C3 and flash efuses

* fix(expand file args): Correctly print the expanded command

* feat(espsecure): Allow prompting for HSM PIN in read_hsm_config

If hsm_config does not contain "credentials" the user will be
prompted for the HSM PIN.

This avoids the need to have HSM PINs typed in config files
which is not a good security practice.

ADJUNCT: Updated documentation to reflect new usage

Closes espressif#900

* fix(dangerGH): Update token permissions - allow Danger to add comments to PR

* fix(elf2image): fix text/rodata mapping overlap issue on uni-idrom bus chips

* fix: assert in esp32 exclusive workaround

* docs: Add other resources page

* fix(autodetection): Remove the ESP32-S2 ROM class from get_security_info autodetection

* change(pre-commit): Bump version conventional-precommit-linter to 1.2.1

* feat(esptool): added target to esp32p4

* feat(espefuse): Add support for esp32p4 chip

* fix: Fix redirection of STDOUT

Closes espressif#904

* fix(danger-github): Fir Danger GitHub token permission

* ci(danger-github): Fix github-action-bot permissions for posting Danger output

* ci: Shared danger to local stage (remove possible double CI pipelines)

* ci: add 'flake8-import-order' as a dependecy to flake8

* fix(bin_image): Check only ELF sections when searching for .flash.appdesc

Closes espressif#917

* feat(efuse): ESP32P4 adds ecdsa_key support

* feat(efuse): Update key purpose table and tests

* feat(esp32-s3): Support >16MB quad flash chips

Adds support for the W25Q256 and GD25Q256 flash chips.

Closes espressif#883

* ci(dev_release): Upload dev releases to PyPI with GH Actions

* ci: fix pipeline for building docs

* feat(merge_bin): add support for uf2 format

* feat(esp32c3): Support ECO6 and ECO7 magic numbers

* ci(gitlab_ci): Change only/except syntax to rules

* fix(flasher_stub): fix usb-serial-jtag enabled non-related intr source

* fix(loader): Could not open serial port message adjusted

* ci(gitlab): Fix deploying docs to production

* ci(github): Fix pyinstaller builds on ubuntu

* docs(basic-commands): added note for PowerShell users for merge_bin command

Closes espressif#923

* feat: Add support for Python 3.12

* feat(loader): Added hints for some serial port issues when rising port error

Closes espressif/esp-idf#12366

* feat: add support for get_security_info on esp32c3 ECO7

* docs(troubleshooting): Explain issues when flashing with USB-Serial/JTAG or USB-OTG

Closes espressif#924

* feat(espefuse): Update the way to complete the operation

* docs(boot_mode_selection): Correct secondary strapping pin boot mode levels

Closes espressif#928

* feat(espefuse): Adds efuse ADC calibration data for ESP32H2

* feat(rfc2217_server): Add hard reset sequence

* feat(elf2image): add ram-only-header argument

The ram-only-header configuration makes only
the RAM segments visible to the ROM bootloader placing
them at the beginning of the file and altering the
segment count from the image header with the quantity
of these segments, and also writing only their
checksum. This segment placement also may not result
as optimal as the standard way regarding the padding
gap use among the flash segments that could result
in a less fragmented binary.

The image built must then handle the basic hardware
initialization and the flash mapping for code execution
after ROM bootloader boot it.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
Signed-off-by: Almir Okato <almir.okato@espressif.com>

* feat(esp32p4): Stub flasher support

* refactor(stub_flasher): Cleanup, make adding new targets easier

* feat: add support for intel hex format

---------

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Co-authored-by: harshal.patil <harshal.patil@espressif.com>
Co-authored-by: radim.karnis <radim.karnis@espressif.com>
Co-authored-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Co-authored-by: Peter Dragun <peter.dragun@espressif.com>
Co-authored-by: KonstantinKondrashov <konstantin@espressif.com>
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Co-authored-by: XiNGRZ <hi@xingrz.me>
Co-authored-by: Marius Vikhammer <marius.vikhammer@espressif.com>
Co-authored-by: hasheddan <georgedanielmangum@gmail.com>
Co-authored-by: Roland Dobai <roland@espressif.com>
Co-authored-by: Trent Piepho <tpiepho@gmail.com>
Co-authored-by: Dean Gardiner <me@dgardiner.net>
Co-authored-by: Massimiliano Montagni <massimiliano@solutiontech.tech>
Co-authored-by: Tomas Sebestik <tomas.sebestik@espressif.com>
Co-authored-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
Co-authored-by: Richard Retanubun <richard.retanubun@mmbnetworks.com>
Co-authored-by: wuzhenghui <wuzhenghui@espressif.com>
Co-authored-by: Armando <douyiwen@espressif.com>
Co-authored-by: Jakub Kocka <jakub.kocka@espressif.com>
Co-authored-by: 20162026 <36726858+20162026@users.noreply.github.com>
Co-authored-by: Almir Okato <almir.okato@espressif.com>
Jason2866 added a commit to Jason2866/esptool that referenced this issue Nov 7, 2023
* docs: espsecure remote signing using a HSM broken link fix

* fix(rfc2217_server): Use new reset sequences

* fix(ESP32-S3): Lower CPU freq to improve flasher stub stability

Closes espressif#832

* fix: Unknown chip (ID or magic number) error

* pyinstaller: fix glibc dependency on gnu/linux

pyinstaller package for linux is built within the ubuntu-latest image in
github workflow. This may cause prbolem with glibc symbol versions on
older distributions, where the new symbol versions are not available.
Fix this by building on the older ubuntu version.

Closes espressif#843

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>

* tests: Create custom `host_test` marker for tests without real chip connected

Closes espressif#838

* fix(ESP32-S3): Temporarily disable increasing CPU freq

Related to espressif#848

Related to espressif#842

* build: add esp_rfc2217_server to published scripts

Closes espressif#846

* Update version to v4.5.1

* Update version to v4.6-dev

* espefuse: Hide sensitive info by default during burning burn_key and burn_key_digest

Adds --show-sensitive-info flag for two commands:
burn_key and burn_key_digest.

* flasher_stub: pass -mabi=ilp32 to the RISC-V compiler

This is a no-op change for the upstream toolchain (compiled stubs are
binary identical), but is required when building with Debian's
riscv64-unknown-elf-gcc compiler.

* flasher_stub: allow passing extra CFLAGS

The flasher_stub Makefile allows for some system-local configuration,
either through local.mk, or through environment variables.

For example, the compiler prefix can be overridden, by defining e.g.
CROSS_ESPRISCV32. However, passing additional flags to the compiler
isn't possible right now. Add EXTRA_CFLAGS and EXTRA_CFLAGS_ESPRISCV32
to allow for that option.

* flasher_stub: collect all targets at the top, DRY

* flasher_stub: make target selection more modular

Rather than a special "make esp32", create WITHOUT_* variables to
selectively disable chip families. Currently, WITHOUT_ESP8266,
WITHOUT_ESP32_XTENSA and WITHOUT_ESP32_RISCV32 are defined, but the code
can be easily adjusted to allow for all kinds of other
sets/combinations.

* flasher_stub: create %.json targets, make all a proper PHONY

* flasher_stub: drop --embed from wrap_stub.py

Since commit 94f29a5 the flasher stub is not embedded in the Python
source, but rather included as simple json files.

As such, wrap_stub.py --embed was converted to basically just vary the
build dir. Rather than keep this indirection and for better clarity,
remove that piece of code and replace it by a simple "cp" in the
Makefile.

While at it, replace the target name from "embed" to "install", as this
more akin to a "make install" step.

* espefuse: Support burning ECDSA_KEY from pem file

- fix some assert check in test_espefuse.py
- add tests to cover the new functionality

* espefuse(c2): Fix BLOCK_KEY0 view for summary cmd when SB + FE keys are burnt

For C2 secure boot + flash enc block, we saw that in summary cmd
"0's" from secure boot digest part (upper 128 bit) were translated
into "?'s" when the block was read protected.
For C2, we should apply this translation for lower 128 bits only.

* fix(ESP32-C6): Fix get_pkg_version and get_{major,minor}_chip_version

* image_info: removed check that reserved bytes in image header are zero

IDF may start using parts of the reserved bytes in the extended header at any time,
which will break chip auto-detect in image_info.

* build: limit max cryptography version to 40

* fix: Set flash parameters even with --flash_size keep

Related to espressif/esp-idf#10788

Related to espressif/esp-idf#10959

* build: add arm and arm64 as build target

Closes espressif#845

* Fix typo in serial protocol docs

Fixes misspelling of `triggered` in serial protocol docs.

Signed-off-by: hasheddan <georgedanielmangum@gmail.com>

* Support more recent reedsolo packages

- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.6.1 - this seems to be related to licenses only.
- https://github.com/tomerfiliba-org/reedsolomon/releases/tag/v1.7.0 - this is related to installation.

Closes espressif#872

* build(arm): add pip extra url for github action build

* ci: Fix libffi symlinks for cryptography>=40

* espefuse: Prevent burning XTS_AES and ECDSA keys into BLOCK9 (BLOCK_KEY5)

eFuse module has a hardware bug.
It is related to ESP32-C3, C6, S3, H2 chips:
    - BLOCK9 (BLOCK_KEY5) can not be used by XTS_AES keys.
For H2 chips, the BLOCK9 (BLOCK_KEY5) can not be used by ECDSA keys.
S2 does not have such a hardware bug.

* image_info: Display disabled WP pin as disabled

The image formats know about the special value 0xee used to disable WP.
Display this with image_info.

E.g.:

ESP32-C3 extended image header
==============================
WP pin: 0xee (disabled)

* image_info: Print chip ID's name if known

Example:

Flash pins drive settings: clk_drv: 0x0, q_drv: 0x0, d_drv: 0x0, cs0_drv: 0x0, hd_drv: 0x0, wp_drv: 0x0
Chip ID: 5 (ESP32-C3)
Minimal chip revision: v0.0, (legacy min_rev = 0)
Maximal chip revision: v655.35

An unknown ID will be printed as:

Chip ID: 42 (Unknown ID)

* tests: Make the testsuite Windows compatible

* espefuse: Adds external esp instance

Closes espressif#873

* espefuse: Improve efuse error viewing

* espefuse: Explicit setting of efuse time settings

EFUSE_PWR_ON_NUM in C3 has default value = 0x2880, now = 0x3000

* docs(Boot log): Add all esp targets to cover boot troubleshooting

Closes espressif#732

* fix: USB-JTAG-Serial PID detection error

* esptool: Move bootdesc on the top of the ram segment

* espefuse: Move some vars under init method to speedup tool after adding yaml support

* espefuse: Adds yaml efuse description files for all chip

- esptool: Updates eFuses wafer major&minor versions
- esptool(esp32c6): Adds package versions
- espefuse(esp32c6): Replace PKG_VERSION BLK_VERSION_MINOR BLK_VERSION_MAJOR
- espefuse(esp32c6): Adds adc calib efuses
- espefuse: Adds yaml files for Build with PyInstaller

* efuse(H2): Adds RF Calibration Information

* espsecure: Improve error message for incorrect PEM format

Closes espressif#881

* bugfix(usb_jtag_serial): Autofeed super watchdog (SWD) to avoid resets during flashing

* esptool: Read 64-bit MAC address on C6 and H2

* bugfix: Adjust wrapper scripts to not import themselves

* bugfix(espsecure): Print a clear error message if incompatible OpenSSL backend is used

Closes espressif#878

* fix: inconsistent usage of dirs separator

* feat(esptool): add option to dump whole flash based on detected size

Closes espressif#461

* Update version to v4.6

* Update version to v4.7-dev

* fix(ESP32-S3): Correct RTC WDT registers to fix resets during flashing

* Update version to v4.6.1

* Update version to v4.7-dev

* docs: add explanation for flash_id example to avoid confusion

* docs(boot-log): fix list formatting

* docs: add c2, c6 and h2 as build targets

* fix(compressed upload): Accept short data blocks with only Adler-32 bytes

* fix(CH9102F): Suggest to install new serial drivers if writing to RAM fails

* esptool & espefuse: Fix byte order in MAC (for C6 and H2)

MAC: 60:55:f9:ff:fe:f7:2c:a2 (EUI64, used for IEEE802154)
BASE MAC: 60:55:f9:f7:2c:a2 (used for BT)
MAC_EXT: ff:fe

* Update version to v4.6.2

* Update version to v4.7

* change: Add conventional precommit linter

* ci(pre-commit): Update version of `conventional-precommit-linter`

* feat(get_security_info): Improved the output format and added more
details

* fix(esp32-c2): Enable flashing in secure download mode

Closes espressif#895

* ci: Add DangerJS checks to GL and GH

* feat(esptool): Add PICO package for ESP32S3 and flash/psram efuses

* feat(esptool): Add tests for get_chip_features

* feat(esptool): Add new packages for ESP32C3 and flash efuses

* fix(expand file args): Correctly print the expanded command

* feat(espsecure): Allow prompting for HSM PIN in read_hsm_config

If hsm_config does not contain "credentials" the user will be
prompted for the HSM PIN.

This avoids the need to have HSM PINs typed in config files
which is not a good security practice.

ADJUNCT: Updated documentation to reflect new usage

Closes espressif#900

* fix(dangerGH): Update token permissions - allow Danger to add comments to PR

* fix(elf2image): fix text/rodata mapping overlap issue on uni-idrom bus chips

* fix: assert in esp32 exclusive workaround

* docs: Add other resources page

* fix(autodetection): Remove the ESP32-S2 ROM class from get_security_info autodetection

* change(pre-commit): Bump version conventional-precommit-linter to 1.2.1

* feat(esptool): added target to esp32p4

* feat(espefuse): Add support for esp32p4 chip

* fix: Fix redirection of STDOUT

Closes espressif#904

* fix(danger-github): Fir Danger GitHub token permission

* ci(danger-github): Fix github-action-bot permissions for posting Danger output

* ci: Shared danger to local stage (remove possible double CI pipelines)

* ci: add 'flake8-import-order' as a dependecy to flake8

* fix(bin_image): Check only ELF sections when searching for .flash.appdesc

Closes espressif#917

* feat(efuse): ESP32P4 adds ecdsa_key support

* feat(efuse): Update key purpose table and tests

* feat(esp32-s3): Support >16MB quad flash chips

Adds support for the W25Q256 and GD25Q256 flash chips.

Closes espressif#883

* ci(dev_release): Upload dev releases to PyPI with GH Actions

* ci: fix pipeline for building docs

* feat(merge_bin): add support for uf2 format

* feat(esp32c3): Support ECO6 and ECO7 magic numbers

* ci(gitlab_ci): Change only/except syntax to rules

* fix(flasher_stub): fix usb-serial-jtag enabled non-related intr source

* fix(loader): Could not open serial port message adjusted

* ci(gitlab): Fix deploying docs to production

* ci(github): Fix pyinstaller builds on ubuntu

* docs(basic-commands): added note for PowerShell users for merge_bin command

Closes espressif#923

* feat: Add support for Python 3.12

* feat(loader): Added hints for some serial port issues when rising port error

Closes espressif/esp-idf#12366

* feat: add support for get_security_info on esp32c3 ECO7

* docs(troubleshooting): Explain issues when flashing with USB-Serial/JTAG or USB-OTG

Closes espressif#924

* feat(espefuse): Update the way to complete the operation

* docs(boot_mode_selection): Correct secondary strapping pin boot mode levels

Closes espressif#928

* feat(espefuse): Adds efuse ADC calibration data for ESP32H2

* feat(rfc2217_server): Add hard reset sequence

* feat(elf2image): add ram-only-header argument

The ram-only-header configuration makes only
the RAM segments visible to the ROM bootloader placing
them at the beginning of the file and altering the
segment count from the image header with the quantity
of these segments, and also writing only their
checksum. This segment placement also may not result
as optimal as the standard way regarding the padding
gap use among the flash segments that could result
in a less fragmented binary.

The image built must then handle the basic hardware
initialization and the flash mapping for code execution
after ROM bootloader boot it.

Signed-off-by: Marek Matej <marek.matej@espressif.com>
Signed-off-by: Almir Okato <almir.okato@espressif.com>

* feat(esp32p4): Stub flasher support

* refactor(stub_flasher): Cleanup, make adding new targets easier

* feat: add support for intel hex format

* feat(xip_psram): support xip psram feature on esp32p4

Expanded IROM / DROM range to include psram space as well

* Delete docs directory

* Delete .gitlab-ci.yml

* Delete .pre-commit-config.yaml

* Delete MANIFEST.in

* Update build_esptool.yml

* Delete .github/workflows/test_esptool.yml

---------

Signed-off-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Signed-off-by: hasheddan <georgedanielmangum@gmail.com>
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Signed-off-by: Almir Okato <almir.okato@espressif.com>
Co-authored-by: harshal.patil <harshal.patil@espressif.com>
Co-authored-by: radim.karnis <radim.karnis@espressif.com>
Co-authored-by: Frantisek Hrbata <frantisek.hrbata@espressif.com>
Co-authored-by: Peter Dragun <peter.dragun@espressif.com>
Co-authored-by: KonstantinKondrashov <konstantin@espressif.com>
Co-authored-by: Faidon Liambotis <paravoid@debian.org>
Co-authored-by: XiNGRZ <hi@xingrz.me>
Co-authored-by: Marius Vikhammer <marius.vikhammer@espressif.com>
Co-authored-by: hasheddan <georgedanielmangum@gmail.com>
Co-authored-by: Roland Dobai <roland@espressif.com>
Co-authored-by: Trent Piepho <tpiepho@gmail.com>
Co-authored-by: Dean Gardiner <me@dgardiner.net>
Co-authored-by: Massimiliano Montagni <massimiliano@solutiontech.tech>
Co-authored-by: Tomas Sebestik <tomas.sebestik@espressif.com>
Co-authored-by: Aditya Patwardhan <aditya.patwardhan@espressif.com>
Co-authored-by: Richard Retanubun <richard.retanubun@mmbnetworks.com>
Co-authored-by: wuzhenghui <wuzhenghui@espressif.com>
Co-authored-by: Armando <douyiwen@espressif.com>
Co-authored-by: Jakub Kocka <jakub.kocka@espressif.com>
Co-authored-by: 20162026 <36726858+20162026@users.noreply.github.com>
Co-authored-by: Almir Okato <almir.okato@espressif.com>
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

5 participants