esp32: add ESP-IDF bootloader option

add ESP-IDF bootloader support

Signed-off-by: Gautier Seidel <gautier.seidel@tado.com>
This commit is contained in:
Gautier Seidel 2018-06-14 13:02:19 +02:00 committed by Anas Nashif
parent 7ba7119f82
commit 52ed379912
2 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,11 @@
if(CONFIG_BOOTLOADER_ESP_IDF)
add_custom_target(EspIdfBootloader
COMMAND PATH=$ENV{PATH}:${ESPRESSIF_TOOLCHAIN_PATH}/bin make IDF_PATH=${ESP_IDF_PATH} -C ${ESP_IDF_PATH}/examples/get-started/hello_world/ BUILD_DIR_BASE=${CMAKE_BINARY_DIR}/esp-idf defconfig
COMMAND PATH=$ENV{PATH}:${ESPRESSIF_TOOLCHAIN_PATH}/bin make IDF_PATH=${ESP_IDF_PATH} -C ${ESP_IDF_PATH}/examples/get-started/hello_world/ BUILD_DIR_BASE=${CMAKE_BINARY_DIR}/esp-idf bootloader
COMMAND PATH=$ENV{PATH}:${ESPRESSIF_TOOLCHAIN_PATH}/bin make IDF_PATH=${ESP_IDF_PATH} -C ${ESP_IDF_PATH}/examples/get-started/hello_world/ BUILD_DIR_BASE=${CMAKE_BINARY_DIR}/esp-idf partition_table
)
add_dependencies(app EspIdfBootloader)
endif()

View file

@ -338,6 +338,16 @@ config BOOTLOADER_MCUBOOT
* Including dts/common/mcuboot.overlay when building the Device
Tree in order to place and link the image at the slot0 offset
config BOOTLOADER_ESP_IDF
bool
prompt "ESP-IDF bootloader support"
default n
help
This option will trigger the compilation of the ESP-IDF booloader
inside the build folder.
At flash time, the bootloader will be flashed with the zephyr image
depends on SOC_ESP32
config BOOTLOADER_KEXEC
bool
prompt "Boot using Linux kexec() system call"