diff --git a/boards/modalai/voxl2-slpi/default.px4board b/boards/modalai/voxl2-slpi/default.px4board index b377bc4898..ae489ecb2f 100644 --- a/boards/modalai/voxl2-slpi/default.px4board +++ b/boards/modalai/voxl2-slpi/default.px4board @@ -3,3 +3,4 @@ CONFIG_BOARD_TOOLCHAIN="qurt" CONFIG_MODULES_MUORB_SLPI=y CONFIG_SYSTEMCMDS_UORB=y CONFIG_ORB_COMMUNICATOR=y +CONFIG_SYSTEMCMDS_PARAM=y diff --git a/boards/modalai/voxl2/default.px4board b/boards/modalai/voxl2/default.px4board index 47d77bce32..b3b6bac4ee 100644 --- a/boards/modalai/voxl2/default.px4board +++ b/boards/modalai/voxl2/default.px4board @@ -5,3 +5,4 @@ CONFIG_MODULES_MUORB_APPS=y CONFIG_SYSTEMCMDS_PERF=y CONFIG_SYSTEMCMDS_UORB=y CONFIG_ORB_COMMUNICATOR=y +CONFIG_SYSTEMCMDS_PARAM=y diff --git a/cmake/px4_add_library.cmake b/cmake/px4_add_library.cmake index cde5508da4..85b16d8c3f 100644 --- a/cmake/px4_add_library.cmake +++ b/cmake/px4_add_library.cmake @@ -48,9 +48,7 @@ function(px4_add_library target) # all PX4 libraries have access to parameters and uORB # TODO: Exclusion of qurt is temporary until these modules # build cleanly. - if(NOT ${PLATFORM} MATCHES "qurt") - add_dependencies(${target} uorb_headers parameters) - endif() + add_dependencies(${target} uorb_headers parameters) target_link_libraries(${target} PRIVATE prebuild_targets) set_property(GLOBAL APPEND PROPERTY PX4_MODULE_PATHS ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/cmake/px4_add_module.cmake b/cmake/px4_add_module.cmake index 1722641734..5c0ee1153d 100644 --- a/cmake/px4_add_module.cmake +++ b/cmake/px4_add_module.cmake @@ -170,9 +170,6 @@ function(px4_add_module) if (${PX4_PLATFORM} STREQUAL "nuttx" AND NOT CONFIG_BUILD_FLAT AND KERNEL) target_link_libraries(${MODULE} PRIVATE kernel_parameters_interface px4_kernel_layer uORB_kernel) set_property(GLOBAL APPEND PROPERTY PX4_KERNEL_MODULE_LIBRARIES ${MODULE}) - elseif(${PX4_PLATFORM} STREQUAL "qurt") - target_link_libraries(${MODULE} PRIVATE px4_layer uORB) - set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES ${MODULE}) else() target_link_libraries(${MODULE} PRIVATE parameters_interface px4_layer uORB) set_property(GLOBAL APPEND PROPERTY PX4_MODULE_LIBRARIES ${MODULE}) diff --git a/platforms/common/include/px4_platform_common/posix.h b/platforms/common/include/px4_platform_common/posix.h index ac99e676e2..40024a18ec 100644 --- a/platforms/common/include/px4_platform_common/posix.h +++ b/platforms/common/include/px4_platform_common/posix.h @@ -100,6 +100,12 @@ typedef struct { #define POLLIN (0x01) #endif +#if defined(__PX4_QURT) +// Qurt has no fsync implementation so need to declare one here +// and then define a fake one in the Qurt platform code. +void fsync(int fd); +#endif + __EXPORT int px4_open(const char *path, int flags, ...); __EXPORT int px4_close(int fd); __EXPORT ssize_t px4_read(int fd, void *buffer, size_t buflen); @@ -114,7 +120,6 @@ __END_DECLS #error "No TARGET OS Provided" #endif - // The stack size is intended for 32-bit architectures; therefore // we often run out of stack space when pointers are larger than 4 bytes. // Double the stack size on posix when we're on a 64-bit architecture. diff --git a/platforms/qurt/cmake/px4_impl_os.cmake b/platforms/qurt/cmake/px4_impl_os.cmake index fc5a67a6e6..a160348a2a 100644 --- a/platforms/qurt/cmake/px4_impl_os.cmake +++ b/platforms/qurt/cmake/px4_impl_os.cmake @@ -50,8 +50,6 @@ include(qurt_reqs) include_directories(${HEXAGON_SDK_INCLUDES}) -set(DISABLE_PARAMS_MODULE_SCOPING TRUE) - #============================================================================= # # Defined functions in this file diff --git a/platforms/qurt/include/qurt_reqs.h b/platforms/qurt/include/qurt_reqs.h index 8ff3ce52c4..76e5581c6c 100644 --- a/platforms/qurt/include/qurt_reqs.h +++ b/platforms/qurt/include/qurt_reqs.h @@ -38,6 +38,8 @@ #include #include +#include +#include __BEGIN_DECLS diff --git a/platforms/qurt/src/px4/px4_qurt_impl.cpp b/platforms/qurt/src/px4/px4_qurt_impl.cpp index 6feb754dec..545b098f20 100644 --- a/platforms/qurt/src/px4/px4_qurt_impl.cpp +++ b/platforms/qurt/src/px4/px4_qurt_impl.cpp @@ -35,5 +35,7 @@ __BEGIN_DECLS long PX4_TICKS_PER_SEC = 1000L; +void fsync(int fd) { return; } +uint32_t crc32part(const uint8_t *src, size_t len, uint32_t crc32val) { return 1; } __END_DECLS