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)
|
|
|
|
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed in by the parent build process.")
|
|
|
|
endif()
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-01-19 15:47:49 +11:00
|
|
|
set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
|
2018-01-12 13:49:13 +11:00
|
|
|
set(BOOTLOADER_BUILD 1)
|
|
|
|
add_definitions(-DBOOTLOADER_BUILD=1)
|
|
|
|
|
2018-01-19 16:00:41 +11:00
|
|
|
set(MAIN_SRCS main/bootloader_start.c)
|
2018-01-12 13:49:13 +11:00
|
|
|
|
2018-01-19 15:47:49 +11:00
|
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
2018-02-15 14:38:58 +11:00
|
|
|
project(bootloader)
|
2018-01-12 13:49:13 +11:00
|
|
|
|
|
|
|
target_link_libraries(bootloader.elf "-L ${CMAKE_CURRENT_SOURCE_DIR}/main")
|
|
|
|
target_link_libraries(bootloader.elf "-T esp32.bootloader.ld")
|
|
|
|
target_link_libraries(bootloader.elf "-T esp32.bootloader.rom.ld")
|
|
|
|
target_link_libraries(bootloader.elf "${BOOTLOADER_LINKER_ARGS}")
|
2018-02-09 16:09:47 +08:00
|
|
|
target_link_libraries(bootloader.elf gcc)
|
|
|
|
|