mirror of
https://github.com/espressif/esp-idf.git
synced 2024-09-20 00:36:01 -04:00
abef220b13
Refactor IDF "project" functionality under a wrapping of the default "project" command, so we can tweak it a bit... Will need more testing in other environments.
22 lines
771 B
CMake
22 lines
771 B
CMake
cmake_minimum_required(VERSION 3.5)
|
|
|
|
if(NOT SDKCONFIG)
|
|
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed in by the parent build process.")
|
|
endif()
|
|
|
|
set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
|
|
set(BOOTLOADER_BUILD 1)
|
|
add_definitions(-DBOOTLOADER_BUILD=1)
|
|
|
|
set(MAIN_SRCS main/bootloader_start.c)
|
|
|
|
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
|
project(bootloader)
|
|
|
|
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}")
|
|
target_link_libraries(bootloader.elf gcc)
|
|
|