2018-01-12 13:49:13 +11:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
2018-01-19 15:47:49 +11:00
|
|
|
if(NOT SDKCONFIG)
|
2018-02-27 15:45:30 +11:00
|
|
|
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed "
|
|
|
|
"in by the parent build process.")
|
2018-01-19 15:47:49 +11:00
|
|
|
endif()
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-06-15 14:59:45 +10:00
|
|
|
if(NOT IDF_PATH)
|
|
|
|
message(FATAL_ERROR "Bootloader subproject expects the IDF_PATH variable to be passed "
|
|
|
|
"in by the parent build process.")
|
|
|
|
endif()
|
|
|
|
|
2018-09-11 09:44:12 +08:00
|
|
|
set(COMPONENTS bootloader esptool_py esp32 partition_table soc bootloader_support log spi_flash micro-ecc soc main)
|
2018-01-12 13:49:13 +11:00
|
|
|
set(BOOTLOADER_BUILD 1)
|
|
|
|
add_definitions(-DBOOTLOADER_BUILD=1)
|
|
|
|
|
2018-03-22 17:27:10 +11:00
|
|
|
set(COMPONENT_REQUIRES_COMMON log esp32 soc)
|
|
|
|
|
2018-06-15 14:59:45 +10:00
|
|
|
include("${IDF_PATH}/tools/cmake/project.cmake")
|
2018-02-15 14:38:58 +11:00
|
|
|
project(bootloader)
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-04-18 09:30:27 +10:00
|
|
|
target_linker_script(bootloader.elf
|
|
|
|
"main/esp32.bootloader.ld"
|
|
|
|
"main/esp32.bootloader.rom.ld")
|
|
|
|
# Imported from esp32 component
|
|
|
|
target_linker_script(bootloader.elf ${ESP32_BOOTLOADER_LINKER_SCRIPTS})
|
|
|
|
|
2018-02-09 16:09:47 +08:00
|
|
|
target_link_libraries(bootloader.elf gcc)
|