2018-01-11 21:49:13 -05:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
|
|
|
|
2018-01-18 23:47:49 -05:00
|
|
|
if(NOT SDKCONFIG)
|
2018-02-26 23:45:30 -05:00
|
|
|
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed "
|
|
|
|
"in by the parent build process.")
|
2018-01-18 23:47:49 -05:00
|
|
|
endif()
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-01-18 23:47:49 -05:00
|
|
|
set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
|
2018-01-11 21:49:13 -05:00
|
|
|
set(BOOTLOADER_BUILD 1)
|
|
|
|
add_definitions(-DBOOTLOADER_BUILD=1)
|
|
|
|
|
2018-03-22 02:27:10 -04:00
|
|
|
set(COMPONENT_REQUIRES_COMMON log esp32 soc)
|
|
|
|
|
2018-01-19 00:00:41 -05:00
|
|
|
set(MAIN_SRCS main/bootloader_start.c)
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-01-18 23:47:49 -05:00
|
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
2018-02-14 22:38:58 -05:00
|
|
|
project(bootloader)
|
2018-01-11 21:49:13 -05:00
|
|
|
|
2018-04-17 19:30:27 -04: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 03:09:47 -05:00
|
|
|
target_link_libraries(bootloader.elf gcc)
|