From 071f45d28a8f6887c0ec0423ecf368f55b05dbd8 Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Mon, 13 Apr 2026 14:48:17 +0200 Subject: [PATCH] build(nuttx): build openamp and link it with the drivers RPMsg based ttys and filesystems live in NuttX's openamp directory, which the PX4 build did not compile. Build it and link it with the driver and memory manager libraries it depends on, guarded by CONFIG_OPENAMP so boards without RPMsg keep their build and link line. Co-authored-by: Andre Heinemans --- platforms/nuttx/CMakeLists.txt | 6 +++++- platforms/nuttx/NuttX/CMakeLists.txt | 5 +++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/platforms/nuttx/CMakeLists.txt b/platforms/nuttx/CMakeLists.txt index c0aa1b1577c..fdc07bb42e1 100644 --- a/platforms/nuttx/CMakeLists.txt +++ b/platforms/nuttx/CMakeLists.txt @@ -358,7 +358,11 @@ else() ) target_link_libraries(nuttx_c INTERFACE nuttx_drivers) - target_link_libraries(nuttx_drivers INTERFACE nuttx_c nuttx_fs) + target_link_libraries(nuttx_drivers INTERFACE nuttx_c nuttx_fs nuttx_mm) + if(CONFIG_OPENAMP) + target_link_libraries(nuttx_drivers INTERFACE nuttx_openamp) + target_link_libraries(nuttx_openamp INTERFACE nuttx_drivers) + endif() target_link_libraries(nuttx_xx INTERFACE nuttx_c) target_link_libraries(nuttx_fs INTERFACE nuttx_c nuttx_mm) diff --git a/platforms/nuttx/NuttX/CMakeLists.txt b/platforms/nuttx/NuttX/CMakeLists.txt index dde46499e3a..3f6134d0e37 100644 --- a/platforms/nuttx/NuttX/CMakeLists.txt +++ b/platforms/nuttx/NuttX/CMakeLists.txt @@ -242,6 +242,11 @@ if(CONFIG_NET) add_nuttx_dir(net net y -D__KERNEL__ all) endif() +if(CONFIG_OPENAMP) + add_nuttx_dir(openamp openamp y -D__KERNEL__ all) + add_dependencies(nuttx_openamp nuttx_drivers) +endif() + ############################################################################### # NuttX oldconfig: Update a configuration using a provided .config as base add_custom_target(oldconfig_nuttx