esp32-pico-d4 下载启动
Posted: Mon Nov 20, 2023 2:05 am
esp-idf 编译的hello_world工程,下载到esp32-pico-d4,提示:
A fatal error occurred: Secure Boot detected, writing to flash regions < 0x8000 is disabled to protect the bootloader. Use --force to override, please use with caution, otherwise it may brick your device!
芯片是刚买的,是配置不对还是芯片被加过密?
这是下载log:
PS C:\diy\Software\esp\hello_world> idf.py -p COM21 flash
Executing action: flash
Running ninja in directory C:\diy\Software\esp\hello_world\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\diy\Software\esp\hello_world\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/diy/Software/esp/hello_world/build/partition_table/partition-table.bin C:/diy/Software/esp/hello_world/build/hello_world.bin"
hello_world.bin binary size 0x2ad50 bytes. Smallest app partition is 0x100000 bytes. 0xd52b0 bytes (83%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\diy\Software\esp\hello_world\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/diy/Software/esp/hello_world/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/diy/Software/esp/hello_world/build -P C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32 -p COM21 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev2
Serial port COM21
Connecting.......
Chip is ESP32-PICO-D4 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98ac7e:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
A fatal error occurred: Secure Boot detected, writing to flash regions < 0x8000 is disabled to protect the bootloader. Use --force to override, please use with caution, otherwise it may brick your device!
CMake Error at run_serial_tool.cmake:66 (message):
C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32
failed.
FAILED: CMakeFiles/flash C:/diy/Software/esp/hello_world/build/CMakeFiles/flash
cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/diy/Software/esp/hello_world/build -P C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\diy\Software\esp\hello_world\build\log\idf_py_stderr_output_2596 and C:\diy\Software\esp\hello_world\build\log\idf_py_stdout_output_2596
A fatal error occurred: Secure Boot detected, writing to flash regions < 0x8000 is disabled to protect the bootloader. Use --force to override, please use with caution, otherwise it may brick your device!
芯片是刚买的,是配置不对还是芯片被加过密?
这是下载log:
PS C:\diy\Software\esp\hello_world> idf.py -p COM21 flash
Executing action: flash
Running ninja in directory C:\diy\Software\esp\hello_world\build
Executing "ninja flash"...
[1/5] cmd.exe /C "cd /D C:\diy\Software\esp\hello_world\build\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.1/components/partition_table/check_sizes.py --offset 0x8000 partition --type app C:/diy/Software/esp/hello_world/build/partition_table/partition-table.bin C:/diy/Software/esp/hello_world/build/hello_world.bin"
hello_world.bin binary size 0x2ad50 bytes. Smallest app partition is 0x100000 bytes. 0xd52b0 bytes (83%) free.
[2/5] Performing build step for 'bootloader'
[1/1] cmd.exe /C "cd /D C:\diy\Software\esp\hello_world\build\bootloader\esp-idf\esptool_py && C:\Espressif\python_env\idf5.1_py3.11_env\Scripts\python.exe C:/Espressif/frameworks/esp-idf-v5.1.1/components/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 C:/diy/Software/esp/hello_world/build/bootloader/bootloader.bin"
Bootloader binary size 0x6810 bytes. 0x7f0 bytes (7%) free.
[2/3] cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/diy/Software/esp/hello_world/build -P C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/run_serial_tool.cmake"
esptool.py --chip esp32 -p COM21 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 2MB 0x1000 bootloader/bootloader.bin 0x10000 hello_world.bin 0x8000 partition_table/partition-table.bin
esptool.py v4.7.dev2
Serial port COM21
Connecting.......
Chip is ESP32-PICO-D4 (revision v1.0)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 98ac7e:a0
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
A fatal error occurred: Secure Boot detected, writing to flash regions < 0x8000 is disabled to protect the bootloader. Use --force to override, please use with caution, otherwise it may brick your device!
CMake Error at run_serial_tool.cmake:66 (message):
C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32
failed.
FAILED: CMakeFiles/flash C:/diy/Software/esp/hello_world/build/CMakeFiles/flash
cmd.exe /C "cd /D C:\Espressif\frameworks\esp-idf-v5.1.1\components\esptool_py && C:\Espressif\tools\cmake\3.24.0\bin\cmake.exe -D IDF_PATH=C:/Espressif/frameworks/esp-idf-v5.1.1 -D SERIAL_TOOL=C:/Espressif/python_env/idf5.1_py3.11_env/Scripts/python.exe;;C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/esptool/esptool.py;--chip;esp32 -D SERIAL_TOOL_ARGS=--before=default_reset;--after=hard_reset;write_flash;@flash_args -D WORKING_DIRECTORY=C:/diy/Software/esp/hello_world/build -P C:/Espressif/frameworks/esp-idf-v5.1.1/components/esptool_py/run_serial_tool.cmake"
ninja: build stopped: subcommand failed.
ninja failed with exit code 1, output of the command is in the C:\diy\Software\esp\hello_world\build\log\idf_py_stderr_output_2596 and C:\diy\Software\esp\hello_world\build\log\idf_py_stdout_output_2596