From 809a423fb0648e29ea914f53844123617dd50685 Mon Sep 17 00:00:00 2001 From: Peter Harper <77111776+peterharperuk@users.noreply.github.com> Date: Sat, 9 Nov 2024 00:09:13 +0000 Subject: [PATCH] Fix some header dependencies (#2031) Fixes #1929 --- src/rp2_common/hardware_irq/CMakeLists.txt | 3 ++- src/rp2_common/pico_bootrom/CMakeLists.txt | 4 ++++ src/rp2_common/pico_runtime_init/CMakeLists.txt | 3 +++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/rp2_common/hardware_irq/CMakeLists.txt b/src/rp2_common/hardware_irq/CMakeLists.txt index 4795f85ff..e64a0ec38 100644 --- a/src/rp2_common/hardware_irq/CMakeLists.txt +++ b/src/rp2_common/hardware_irq/CMakeLists.txt @@ -4,7 +4,8 @@ pico_simple_hardware_target(irq) target_sources(hardware_irq INTERFACE ${CMAKE_CURRENT_LIST_DIR}/irq_handler_chain.S) -target_link_libraries(hardware_irq INTERFACE pico_sync) # not mirrored as only implementation requires it +# irq.c includes pico/runtime_init.h +target_link_libraries(hardware_irq INTERFACE pico_sync pico_runtime_init_headers) # not mirrored as only implementation requires it if (PICO_RISCV) pico_mirrored_target_link_libraries(hardware_irq INTERFACE hardware_hazard3) endif() diff --git a/src/rp2_common/pico_bootrom/CMakeLists.txt b/src/rp2_common/pico_bootrom/CMakeLists.txt index 908fb3af2..c7ac816f2 100644 --- a/src/rp2_common/pico_bootrom/CMakeLists.txt +++ b/src/rp2_common/pico_bootrom/CMakeLists.txt @@ -10,3 +10,7 @@ target_sources(pico_bootrom INTERFACE target_link_libraries(pico_bootrom_headers INTERFACE boot_picoboot_headers boot_bootrom_headers) pico_mirrored_target_link_libraries(pico_bootrom INTERFACE pico_base hardware_boot_lock pico_flash) + +# bootrom.c includes boot/picobin.h +# bootrom_lock.c includes pico/runtime_init.h +target_link_libraries(pico_bootrom INTERFACE boot_picobin_headers pico_runtime_init_headers) \ No newline at end of file diff --git a/src/rp2_common/pico_runtime_init/CMakeLists.txt b/src/rp2_common/pico_runtime_init/CMakeLists.txt index 4d43bc555..769e4aa11 100644 --- a/src/rp2_common/pico_runtime_init/CMakeLists.txt +++ b/src/rp2_common/pico_runtime_init/CMakeLists.txt @@ -15,3 +15,6 @@ pico_mirrored_target_link_libraries(pico_runtime_init INTERFACE if (TARGET hardware_clocks) pico_mirrored_target_link_libraries(pico_runtime_init INTERFACE hardware_clocks) endif() + +# pico/runtime_init.h includes pico/runtime.h +target_link_libraries(pico_runtime_init_headers INTERFACE pico_runtime_headers) \ No newline at end of file