From e6cc771c638585eb3d063a31d0322316ea383129 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Fri, 14 Jan 2022 15:29:34 -0300 Subject: [PATCH] boards: esp_wrover_kit: use default configs from soc Set esp_wrover_kit board to use default soc cmakelists and remove hardcoded bootloader as it is automatically selected by kconfig options. Signed-off-by: Sylvio Alves --- boards/xtensa/esp_wrover_kit/CMakeLists.txt | 64 ------------------- .../xtensa/esp_wrover_kit/Kconfig.defconfig | 2 +- .../esp_wrover_kit/esp_wrover_kit_defconfig | 2 - 3 files changed, 1 insertion(+), 67 deletions(-) diff --git a/boards/xtensa/esp_wrover_kit/CMakeLists.txt b/boards/xtensa/esp_wrover_kit/CMakeLists.txt index 8a7e10ec0df..1ad978e0d75 100644 --- a/boards/xtensa/esp_wrover_kit/CMakeLists.txt +++ b/boards/xtensa/esp_wrover_kit/CMakeLists.txt @@ -1,69 +1,5 @@ # SPDX-License-Identifier: Apache-2.0 -if(CONFIG_BOOTLOADER_ESP_IDF) - include(ExternalProject) - - ## we use hello-world project, but I think any can be used. - set(espidf_components_dir ${ESP_IDF_PATH}/components) - set(espidf_prefix ${CMAKE_BINARY_DIR}/esp-idf) - set(espidf_build_dir ${espidf_prefix}/build) - - ExternalProject_Add( - EspIdfBootloader - PREFIX ${espidf_prefix} - SOURCE_DIR ${espidf_components_dir}/bootloader/subproject - BINARY_DIR ${espidf_build_dir}/bootloader - CONFIGURE_COMMAND - ${CMAKE_COMMAND} -G${CMAKE_GENERATOR} - -S ${espidf_components_dir}/bootloader/subproject - -B ${espidf_build_dir}/bootloader -DSDKCONFIG=${espidf_build_dir}/sdkconfig - -DIDF_PATH=${ESP_IDF_PATH} -DIDF_TARGET=${CONFIG_BOARD} - -DPYTHON_DEPS_CHECKED=1 - -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} - -DCMAKE_ASM_COMPILER=${CMAKE_ASM_COMPILER} - -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} - -DPYTHON=${PYTHON_EXECUTABLE} - BUILD_COMMAND - ${CMAKE_COMMAND} --build . - INSTALL_COMMAND "" # This particular build system has no install command - ) - - ExternalProject_Add( - EspPartitionTable - SOURCE_DIR ${espidf_components_dir}/partition_table - BINARY_DIR ${espidf_build_dir} - CONFIGURE_COMMAND "" - BUILD_COMMAND - ${PYTHON_EXECUTABLE} ${ESP_IDF_PATH}/components/partition_table/gen_esp32part.py -q - --offset 0x8000 --flash-size 4MB ${ESP_IDF_PATH}/components/partition_table/partitions_singleapp.csv ${espidf_build_dir}/partitions_singleapp.bin - INSTALL_COMMAND "" - ) - - if(CONFIG_BUILD_OUTPUT_BIN) - set_property(GLOBAL APPEND PROPERTY extra_post_build_commands - COMMAND ${PYTHON_EXECUTABLE} ${ESP_IDF_PATH}/components/esptool_py/esptool/esptool.py - ARGS --chip esp32 elf2image --flash_mode dio --flash_freq 40m - -o ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.bin - ${CMAKE_BINARY_DIR}/zephyr/${CONFIG_KERNEL_BIN_NAME}.elf) - endif() - - set_property(TARGET bintools PROPERTY disassembly_flag_inline_source) - - add_dependencies(app EspIdfBootloader EspPartitionTable) - - board_finalize_runner_args(esp32 "--esp-flash-bootloader=${espidf_build_dir}/bootloader/bootloader.bin") - - board_finalize_runner_args(esp32 "--esp-flash-partition_table=${espidf_build_dir}/partitions_singleapp.bin") - - board_finalize_runner_args(esp32 "--esp-boot-address=0x1000") - - board_finalize_runner_args(esp32 "--esp-partition-table-address=0x8000") - - board_finalize_runner_args(esp32 "--esp-app-address=0x10000") - -endif() - if(CONFIG_PINMUX_ESP32) zephyr_library() zephyr_library_sources(board_init.c) diff --git a/boards/xtensa/esp_wrover_kit/Kconfig.defconfig b/boards/xtensa/esp_wrover_kit/Kconfig.defconfig index 569cdcce65f..9ef0f8f9db9 100644 --- a/boards/xtensa/esp_wrover_kit/Kconfig.defconfig +++ b/boards/xtensa/esp_wrover_kit/Kconfig.defconfig @@ -4,7 +4,7 @@ # SPDX-License-Identifier: Apache-2.0 config BOARD - default "esp32" + default "esp_wrover_kit" depends on BOARD_ESP_WROVER_KIT config ENTROPY_ESP32_RNG diff --git a/boards/xtensa/esp_wrover_kit/esp_wrover_kit_defconfig b/boards/xtensa/esp_wrover_kit/esp_wrover_kit_defconfig index 7a5e583f558..efeb43e4de9 100644 --- a/boards/xtensa/esp_wrover_kit/esp_wrover_kit_defconfig +++ b/boards/xtensa/esp_wrover_kit/esp_wrover_kit_defconfig @@ -26,5 +26,3 @@ CONFIG_GEN_IRQ_VECTOR_TABLE=n CONFIG_I2C=y CONFIG_CLOCK_CONTROL=y - -CONFIG_BOOTLOADER_ESP_IDF=y