fix(CI): Prerequisites for nuttx update (#27509)

* src/drivers/cdcacm_autostart: Include posix.h for px4_close

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* platforms/nuttx/CMakeLists.txt: Fix linking of nuttx libaries for memalign

This fixes memalign not found in linking step for some boards

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* Add "flock" to macos.sh setup script

"flock" is not standard on macOS, and a dependency was missing from the
macOS setup path.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* Fix clang-tidy errors in Bitset.hpp and in src/lib/matrix

Fix the "bugprone-dynamic-static-initializers" linter errors.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* systemlib/hardfault_log: Fix clang-diagnostics error

Fix for
"[error] clang-diagnostic-error [error]
 use of undeclared identifier XCPTCONTEXT_REGS".

XCPTCONTEXT_REGS is defined in nuttx irq.h, so include that.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* uORB: Fix clang-tidy error "bugprone-dynamic-static-initializers"

Fix the clang-tidy error appearing on uORBManager _Instance variable by
adding a getter for the reference to the _Instance and using that instead.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

* CI: Add default ubuntu mirrors as fallback

In case of specified aws mirror doesn't have the package idicated by the
metadata, a the default ubuntu mirror as a backup.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>

---------

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen
2026-06-02 20:27:50 +03:00
committed by GitHub
parent fe077b6c58
commit 839b7a470f
13 changed files with 79 additions and 37 deletions

View File

@@ -52,25 +52,23 @@
pthread_mutex_t uORB::Manager::_communicator_mutex = PTHREAD_MUTEX_INITIALIZER;
#endif
uORB::Manager *uORB::Manager::_Instance = nullptr;
bool uORB::Manager::initialize()
{
if (_Instance == nullptr) {
_Instance = new uORB::Manager();
if (instance_ref() == nullptr) {
instance_ref() = new uORB::Manager();
}
#if defined(__PX4_NUTTX) && !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
px4_register_boardct_ioctl(_ORBIOCDEVBASE, orb_ioctl);
#endif
return _Instance != nullptr;
return instance_ref() != nullptr;
}
bool uORB::Manager::terminate()
{
if (_Instance != nullptr) {
delete _Instance;
_Instance = nullptr;
if (instance_ref() != nullptr) {
delete instance_ref();
instance_ref() = nullptr;
return true;
}

View File

@@ -482,6 +482,9 @@ public:
private: // class methods
/** Internal method to get a reference to the instance pointer */
static uORB::Manager *&instance_ref() { return _Instance; }
/**
* Common implementation for orb_advertise and orb_subscribe.
*
@@ -491,7 +494,7 @@ private: // class methods
int node_open(const struct orb_metadata *meta, bool advertiser, int *instance = nullptr);
private: // data members
static Manager *_Instance;
static inline Manager *_Instance = nullptr;
#ifdef CONFIG_ORB_COMMUNICATOR
// the communicator channel instance.

View File

@@ -46,8 +46,6 @@
#include "uORBUtils.hpp"
#include "uORBManager.hpp"
uORB::Manager *uORB::Manager::_Instance = nullptr;
bool uORB::Manager::initialize()
{
if (_Instance == nullptr) {

View File

@@ -360,7 +360,7 @@ else()
target_link_libraries(nuttx_c INTERFACE nuttx_drivers)
target_link_libraries(nuttx_drivers INTERFACE nuttx_c)
target_link_libraries(nuttx_xx INTERFACE nuttx_c)
target_link_libraries(nuttx_fs INTERFACE nuttx_c)
target_link_libraries(nuttx_fs INTERFACE nuttx_c nuttx_mm)
target_link_libraries(px4 PRIVATE