mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
Separate i2c and spi board bus configuration into and own library for protected build target
This info is needed on both kernel and user sides, and is just data. Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
committed by
Beat Küng
parent
543c7bd0c5
commit
4658a627d7
@@ -31,14 +31,18 @@
|
|||||||
#
|
#
|
||||||
############################################################################
|
############################################################################
|
||||||
|
|
||||||
|
add_library(board_bus_info
|
||||||
|
i2c.cpp
|
||||||
|
spi.cpp
|
||||||
|
)
|
||||||
|
add_dependencies(board_bus_info nuttx_context)
|
||||||
|
|
||||||
add_library(drivers_board
|
add_library(drivers_board
|
||||||
can.c
|
can.c
|
||||||
i2c.cpp
|
|
||||||
init.c
|
init.c
|
||||||
led.c
|
led.c
|
||||||
manifest.c
|
manifest.c
|
||||||
sdio.c
|
sdio.c
|
||||||
spi.cpp
|
|
||||||
timer_config.cpp
|
timer_config.cpp
|
||||||
usb.c
|
usb.c
|
||||||
toc.c
|
toc.c
|
||||||
@@ -57,7 +61,7 @@ target_link_libraries(drivers_board
|
|||||||
if (NOT DEFINED CONFIG_BUILD_FLAT)
|
if (NOT DEFINED CONFIG_BUILD_FLAT)
|
||||||
target_link_libraries(drivers_board PRIVATE px4_kernel_layer)
|
target_link_libraries(drivers_board PRIVATE px4_kernel_layer)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(drivers_board PRIVATE px4_layer)
|
target_link_libraries(drivers_board PRIVATE px4_layer board_bus_info)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(drivers_userspace
|
add_library(drivers_userspace
|
||||||
|
|||||||
@@ -29,6 +29,11 @@ add_library(px4_board_ctrl
|
|||||||
|
|
||||||
add_dependencies(px4_board_ctrl nuttx_context px4_kernel_builtin_list_target)
|
add_dependencies(px4_board_ctrl nuttx_context px4_kernel_builtin_list_target)
|
||||||
|
|
||||||
|
target_link_libraries(px4_layer
|
||||||
|
PUBLIC
|
||||||
|
board_bus_info
|
||||||
|
)
|
||||||
|
|
||||||
# Build the kernel side px4_kernel_layer
|
# Build the kernel side px4_kernel_layer
|
||||||
|
|
||||||
add_library(px4_kernel_layer
|
add_library(px4_kernel_layer
|
||||||
@@ -43,6 +48,11 @@ target_link_libraries(px4_kernel_layer
|
|||||||
nuttx_kmm
|
nuttx_kmm
|
||||||
)
|
)
|
||||||
|
|
||||||
|
target_link_libraries(px4_kernel_layer
|
||||||
|
PUBLIC
|
||||||
|
board_bus_info
|
||||||
|
)
|
||||||
|
|
||||||
if (DEFINED PX4_CRYPTO)
|
if (DEFINED PX4_CRYPTO)
|
||||||
target_link_libraries(px4_kernel_layer PUBLIC crypto_backend)
|
target_link_libraries(px4_kernel_layer PUBLIC crypto_backend)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Reference in New Issue
Block a user