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

soc: espressif: Simple boot validity #78478

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions soc/espressif/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@ config ESP32_USE_UNSUPPORTED_REVISION
set this option to enable support for them. Note that this is not recommended and
may lead to unexpected behavior.

config ESP_SIMPLE_BOOT
bool "Simple Boot method"
default y if !BOOTLOADER_MCUBOOT && !MCUBOOT
help
The Simple Boot is a booting method that doesn't need a 2nd stage bootloader.
Output is a single image that should be flashed at a offset defined by used SOC.
Please note that this method brings the system up with all memories set-up, but
all other features, such as secure boot OTA or slots management are not available.

rsource "Kconfig.spiram"
rsource "Kconfig.esptool"
rsource "Kconfig.flash"
Expand Down
8 changes: 0 additions & 8 deletions soc/espressif/common/Kconfig.flash
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,4 @@ config SPI_FLASH_HPM_ENABLE
This option is invisible, and will be selected automatically
when ``ESPTOOLPY_FLASHFREQ_120M`` is selected.

config ESP_SIMPLE_BOOT
bool "Simple Boot method"
default y if !BOOTLOADER_MCUBOOT
help
The Simple Boot is a method of booting that doesn't depend on a
2nd stage bootloader. Please note that some of the bootloader features
are not available using simple boot, such secure boot and OTA.

endif # SOC_FAMILY_ESPRESSIF_ESP32
6 changes: 3 additions & 3 deletions soc/espressif/esp32/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ else()
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
dt_reg_addr(img_0_off PATH ${dts_partition_path})

if(CONFIG_ESP_SIMPLE_BOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

endif()
Expand Down
6 changes: 3 additions & 3 deletions soc/espressif/esp32c2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ dt_prop(monitor_baud PATH ${dts_shell_uart} PROPERTY "current-speed")
board_runner_args(esp32 "--esp-flash-freq=60m")
board_runner_args(esp32 "--esp-monitor-baud=${monitor_baud}")

if(CONFIG_ESP_SIMPLE_BOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

if(CONFIG_MCUBOOT)
Expand Down
6 changes: 3 additions & 3 deletions soc/espressif/esp32c3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ dt_reg_addr(img_0_off PATH ${dts_partition_path})
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_addr(boot_off PATH ${dts_partition_path})

if(CONFIG_ESP_SIMPLE_BOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

if(CONFIG_MCUBOOT)
Expand Down
6 changes: 3 additions & 3 deletions soc/espressif/esp32c6/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ dt_reg_addr(img_0_off PATH ${dts_partition_path})
dt_nodelabel(dts_partition_path NODELABEL "boot_partition")
dt_reg_addr(boot_off PATH ${dts_partition_path})

if(CONFIG_ESP_SIMPLE_BOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

if(CONFIG_MCUBOOT)
Expand Down
6 changes: 3 additions & 3 deletions soc/espressif/esp32s2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ dt_reg_addr(boot_off PATH ${dts_partition_path})
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
dt_reg_addr(img_0_off PATH ${dts_partition_path})

if(CONFIG_ESP_SIMPLE_BOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

if(CONFIG_MCUBOOT)
Expand Down
6 changes: 3 additions & 3 deletions soc/espressif/esp32s3/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,10 @@ else()
dt_nodelabel(dts_partition_path NODELABEL "slot0_partition")
dt_reg_addr(img_0_off PATH ${dts_partition_path})

if(NOT CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
else()
if(CONFIG_BOOTLOADER_MCUBOOT)
board_finalize_runner_args(esp32 "--esp-app-address=${img_0_off}")
else()
board_finalize_runner_args(esp32 "--esp-app-address=${boot_off}")
endif()

endif()
Expand Down
2 changes: 1 addition & 1 deletion west.yml
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ manifest:
groups:
- hal
- name: hal_espressif
revision: aa6a967d1ab4077691aa046229a782102960218a
revision: de5ea5987baaa5492fb9cc0d01222e8b07c78a70
path: modules/hal/espressif
west-commands: west/west-commands.yml
groups:
Expand Down
Loading