1 cmake_minimum_required(VERSION 3.5)
4 message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed "
5 "in by the parent build process.")
9 message(FATAL_ERROR "Bootloader subproject expects the IDF_PATH variable to be passed "
10 "in by the parent build process.")
13 set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
14 set(BOOTLOADER_BUILD 1)
15 add_definitions(-DBOOTLOADER_BUILD=1)
17 set(COMPONENT_REQUIRES_COMMON log esp32 soc)
19 set(MAIN_SRCS main/bootloader_start.c)
21 include("${IDF_PATH}/tools/cmake/project.cmake")
24 target_linker_script(bootloader.elf
25 "main/esp32.bootloader.ld"
26 "main/esp32.bootloader.rom.ld")
27 # Imported from esp32 component
28 target_linker_script(bootloader.elf ${ESP32_BOOTLOADER_LINKER_SCRIPTS})
30 target_link_libraries(bootloader.elf gcc)