mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
cmake: Add partition table, and .bin file targets
This commit is contained in:

committed by
Angus Gratton

parent
3ae4822115
commit
674d398c93
@@ -1,24 +1,21 @@
|
||||
cmake_minimum_required(VERSION 3.5)
|
||||
set(CMAKE_TOOLCHAIN_FILE $ENV{IDF_PATH}/toolchain.cmake)
|
||||
project(idf_bootloader ASM C CXX)
|
||||
|
||||
if(NOT SDKCONFIG)
|
||||
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed in by the parent build process.")
|
||||
endif()
|
||||
|
||||
project(bootloader ASM C CXX)
|
||||
|
||||
set(COMPONENTS bootloader esptool_py esp32 soc bootloader_support log spi_flash micro-ecc soc)
|
||||
|
||||
set(BOOTLOADER_BUILD 1)
|
||||
set(IS_BOOTLOADER_BUILD 1) # deprecated, use BOOTLOADER_BUILD
|
||||
add_definitions(-DBOOTLOADER_BUILD=1)
|
||||
|
||||
if(NOT SDKCONFIG)
|
||||
message(FATAL_ERROR "Bootloader subproject expects the SDKCONFIG variable to be passed in by the app build process.")
|
||||
endif()
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
add_executable(bootloader.elf
|
||||
main/bootloader_start.c
|
||||
set(MAIN_SRCS main/bootloader_start.c
|
||||
main/flash_qio_mode.c)
|
||||
|
||||
target_link_libraries(bootloader.elf ${COMPONENT_LIBRARIES})
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
|
||||
target_link_libraries(bootloader.elf "-L ${CMAKE_CURRENT_SOURCE_DIR}/main")
|
||||
target_link_libraries(bootloader.elf "-T esp32.bootloader.ld")
|
||||
|
Reference in New Issue
Block a user