mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
a79acb413e
Add the possibility to have user bootloader components. This is performed from an application/project, by creating bootloader components. To do so, it is required to create a `bootloader_component` directory containing the custom modules to be compiled with the bootloader. Thanks to this, two solutions are available to override the bootloader now: - Using hooks within a user bootloader component - Using a user defined `main` bootloader component to totally override the old implementation Please check the two new examples in `examples/custom_bootloader` * Closes https://github.com/espressif/esp-idf/issues/7043
14 lines
439 B
CMake
14 lines
439 B
CMake
idf_component_register(SRCS "bootloader_start.c"
|
|
REQUIRES bootloader bootloader_support)
|
|
|
|
idf_build_get_property(target IDF_TARGET)
|
|
set(scripts "ld/${target}/bootloader.ld")
|
|
|
|
if(NOT CONFIG_IDF_TARGET_ESP32H2)
|
|
list(APPEND scripts "ld/${target}/bootloader.rom.ld")
|
|
endif()
|
|
|
|
target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}")
|
|
|
|
target_link_libraries(${COMPONENT_LIB} INTERFACE "-u bootloader_hooks_include")
|