shutdown_time_us_now() was defined unconditionally at file scope but its
only callers (shutdown_worker, px4_reboot_request, px4_shutdown_request)
all live inside
#if defined(CONFIG_SCHED_WORKQUEUE) || \
(!defined(CONFIG_BUILD_FLAT) && defined(CONFIG_LIBC_USRWORK))
On NuttX bootloader builds and on flat-build defconfigs without
CONFIG_LIBC_USRWORK the function was therefore dead code, and the
NuttX build flags include -Werror=unused-function which made it a
fatal error across stm32f4 / stm32h7 / imxrt / s32k / kinetis board
targets.
Move the helper inside the same guard as its callers so it only exists
where it is used. No behavioural change for builds that already linked
against it.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The earlier `style(posix): use nullptr in Windows shim headers` change
silenced clang-tidy hicpp-use-nullptr by writing `nullptr` directly into
the shim header bodies. That worked from C++ TUs but broke Windows SITL
on every C TU that includes those shims (e.g. sitl_led.c via
px4_platform_common/log.h pulling in time.h):
windows_shim/time.h(109): error C2065: 'nullptr': undeclared identifier
windows_shim/time.h:109:41: error: 'nullptr' undeclared
`nullptr` is a C++ keyword and only became a C23 keyword; pre-C23 C
treats it as an undeclared identifier. Add a small `__cplusplus`-guarded
fall-back macro at the top of each affected shim header so the inline
bodies stay valid from C while preserving the lint-clean spelling for
C++ callers. No behavior change.
Affected headers:
- platforms/posix/include/windows_shim/time.h
- platforms/posix/include/windows_shim/libgen.h
- platforms/posix/include/windows_shim/dirent.h
- platforms/posix/include/windows_shim/poll.h
Verified locally with MSVC by building drivers_board (sitl_led.c
compiles clean).
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Gate Checks [check_format] flagged four `auto dt = duration_cast<...>(`
continuation lines in test_windows_shim_headers.cpp where the trailing
`std::chrono::steady_clock::now() - t0).count();` was indented one tab
deeper than astyle 3.1 considers correct continuation alignment with
`indent=force-tab=8`. Drop one leading tab from each so the closing
expression aligns with the opening parenthesis, matching the rest of
the test file.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The Windows-shim PR widened cdev::CDev::ioctl()'s `arg` parameter from
`unsigned long` to `uintptr_t` (and propagated the change to
uORB::DeviceNode and px4_ioctl). On 32-bit ARM NuttX targets uintptr_t
is `unsigned int`, which is a different type than `unsigned long` and
breaks every external override of this method:
src/drivers/px4io/px4io.cpp:133:25:
error: 'int PX4IO::ioctl(file*, int, long unsigned int)' marked
'override', but does not override
This regressed Linux ubuntu:22.04 / 24.04, all NuttX seed targets,
the px4_fmu-v5x/v6xrt CodeQL analyses, and the Checking jobs for
nxp_mr-tropic, nxp_tropic-community, px4_fmu-v5x, px4_fmu-v6xrt.
The NuttX kernel ioctl callback signature is `unsigned long arg` and
all in-tree callers (px4io, IridiumSBD, lib/drivers/device/CDev) match
that. Revert the four signatures back to `unsigned long`. The Windows
shim's ioctl(2) implementation in
platforms/posix/src/px4/windows/posix/sys/ioctl.cpp already uses
`unsigned long`, so no Windows-side change is needed.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Exercise the inline I/O wrappers in unistd.h and sys/stat.h:
pipe()/pipe2() round trip, fsync()/fdatasync() on a regular file
plus error path, dprintf() and vdprintf() formatting, mkdir() via
the px4_mkdir_shim macro (success and EEXIST), and lstat() as a
stat() pass-through with the S_ISLNK escape hatch.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Cover the inline poll() implementation and its fd-classification
helpers in poll.h: argument validation, ignored-fd short circuit,
errno mapping, ready-event masking, classification of socket / pipe /
char / disk / invalid fds, and the integrated polling paths over
loopback UDP, anonymous pipes (with and without pending data, plus
broken pipe), regular files, and mixed socket+pipe sets.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Wire up gtest-based unit tests for the Windows POSIX shim layer using
px4_add_unit_gtest. Adds two test translation units that exercise the
inline header functions (libgen, dirent, sched, syslog, mman, time,
unistd, getopt, fcntl) and the standalone shim sources (errno_map,
env, sysconf, mman, flock, dlfcn, ids, if_query, resolver, sockets).
The test subdirectory is added through a new helper in windows.cmake
guarded on BUILD_TESTING so non-test configurations are unaffected.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Run `make format` (astyle 3.1) over the Windows SITL touchpoint to
satisfy CI `Gate Checks [check_format]`. The DEFINE_PARAMETERS_GROUPED
macro continuation alignment and blank-line-after-early-return rules
from astylerc were not applied during initial development; this commit
brings them in for the affected files plus the windows_shim headers
and Windows posix shim sources.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The Windows compatibility commit replaced __SIZEOF_POINTER__ (an int
literal) with sizeof(void*) (size_t) in PX4_STACK_ADJUSTED so MSVC,
which does not predefine __SIZEOF_POINTER__, would compile. That
silently changed the macro's result type from int to size_t and broke
QURT's WorkQueueManager:
math::max(PTHREAD_STACK_MIN, PX4_STACK_ADJUSTED(wq->stacksize))
error: deduced conflicting types ('int' vs. 'unsigned int')
Define __SIZEOF_POINTER__ ourselves on MSVC (8 on _WIN64/_M_X64,
otherwise 4) and restore the original integer-arithmetic form of the
macro. NuttX, QURT, and Linux SITL keep the GCC/Clang predefine; only
MSVC sees the fallback.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
clang-tidy on Linux flagged \`unknown type name __EXPORT\` for
px4_clock_gettime / px4_clock_settime / px4_usleep / px4_sleep. The
declarations rely on the __EXPORT macro defined in visibility.h, which
the build system normally pulls in indirectly. Make the dependency
explicit so the header parses correctly when included standalone.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
bugprone-empty-catch flagged the std::system_error swallow around the
detached stdin-relay thread. Spell out why the catch body is empty and
add an explicit (void)0 statement so the intent is visible to both the
linter and future readers: stdin forwarding is best-effort, and a
failed thread spawn must not abort the client.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The unlink() block sat inside the `#else` branch of `#ifdef
__PX4_WINDOWS`, so the inner `#ifndef __PX4_WINDOWS` was a no-op that
clang-tidy's readability-redundant-preprocessor caught. Drop the inner
guard.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
modernize-redundant-void-arg flagged closelog(void) in the C++-only
shim. Drop the explicit (void) parameter list to match the rest of the
shim and silence the warning.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
bugprone-macro-parentheses flagged both: PX4_STACK_ADJUSTED(_s)
expanded its argument bare into an expression with `*` and `>>`, and
the ERROR shim defined `-1` without grouping parens. Add the missing
parens so caller-side expressions like `PX4_STACK_ADJUSTED(a + b)` and
`x - ERROR` keep their intended precedence.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The dirent() shim's scandir() growth path used `sizeof(*next)` where the
inner type is `struct dirent **`, which clang-tidy's
bugprone-sizeof-expression flags as a pointer-to-aggregate sizeof. Spell
the element type out (`struct dirent *`) so the realloc/qsort sizes are
unambiguous on both 32- and 64-bit. Convert the remaining NULL tokens in
the shim and the lockstep test to nullptr to satisfy hicpp-use-nullptr.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
clang-tidy hicpp-use-nullptr flags every NULL token in headers consumed
by C++ translation units. Convert the local NULL literals to nullptr in
the poll() shim and the lockstep scheduler test.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
clang-tidy's Linux pre-merge check parses these headers via the global
include path, sees the #error guard, and reports clang-diagnostic-error
on every PR. Wrap the Windows-only bodies in #ifdef _WIN32 / #endif so
the shims are silent no-ops on non-Windows toolchains while still being
correctness-sized on the targets that actually compile against MinGW or
MSVC. Also covers libgen.h / time.h / sys/types.h whose static inlines
referenced MS-specific identifiers (gmtime_s family, basename
redeclaration, quad_t typedef redefinition) and px4_windows_internal.h
which is consumed only by the Windows backend.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
When a user launches `px4 -i N -d <build>/etc` (or any invocation with
explicit `-d` and no `-w`), the daemon previously kept its CWD at the
launch dir. parameters.bson, dataman, log/, and the etc/ symlink all
landed alongside the user's source tree.
Derive `working_directory = parent(data_path)` whenever data_path ends
in a trailing `/etc` segment and no -w was supplied. Track this with
working_directory_from_data_path so the sister-isolation block (-i N
with N >= 1) still appends `/instance_<N>` to the derived path,
keeping multi-instance state in `<build>/instance_N/` rather than
overwriting the primary instance's state at `<build>/`.
Explicit -w still wins for both single- and multi-instance launches.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Tighten the auto per-instance work_dir behavior to match Linux defaults
for single-daemon launches:
- Trigger only when -i N (N >= 1) is explicitly given. The primary
instance (-i 0 or no -i) now stays in the launch cwd, matching the
historical PX4 SITL single-daemon convention.
- Resolve commands_file robustly when data_path is itself a rootfs
ending in /etc (the typical Windows / multi-instance launcher
convention). The default "etc/init.d-posix/rcS" now combines with
data_path either as-is or with its leading "etc/" stripped, picking
whichever exists. Falls back to launch_cwd-relative for non-default
scripts.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
External daemon clients commonly call module status or stop verbs and expect an immediate reply. Teach the example modules to handle those verbs without entering long demo loops, and move px4_mavlink_debug publishing onto a background task so start returns after the task is spawned.
Also reject stray positional arguments for shutdown and sd_bench. Without that guard a mistyped client command could accidentally shut down the daemon or run a multi-second benchmark when the caller only meant to query status.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Native MSVC builds cannot rely on GNU extensions such as typeof, variable-length stack arrays, postfix __declspec exports, or range cases. Replace those constructs with standard C/C++ forms and bounded buffers across the affected modules, tests, and helper libraries.
This also makes a few small runtime safety fixes that surfaced while removing the extensions: bounds-check AtomicBitset access, avoid stack-sized dataman buffers, keep MSP packets within the protocol payload limit, and make Windows-compatible debug/logging paths use PX4 platform wrappers.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Large modules with feature-gated parameters need a way to keep declarations, update calls, and availability metadata in one place. Add grouped parameter macros that can enable or disable whole parameter groups from Kconfig expressions, then convert EKF2, logger, and sensors to the grouped form.
The same commit keeps the ROS 2 platform header in sync by forwarding to the canonical macro implementation, and adjusts generated parameter initialization so MSVC can parse the output without designated initializers or GCC-only aggregate shortcuts.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Windows command clients need a cross-platform path for module stdin and stdout that does not rely on POSIX fdopen semantics over sockets. Extend the daemon protocol and client/server plumbing so module invocations can relay input and command output through explicit IPC messages.
This keeps interactive and one-shot module clients responsive when invoked through pxh or px4-*.exe wrappers, and gives the Windows poll shim a pipe-backed descriptor path to wait on instead of treating every fd as a Winsock socket.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Direct Windows SITL launches can run multiple PX4 daemons from the same working directory, which lets sisters share parameters.bson, dataman, logs, and lock files. Derive an instance_N work_dir when -i is provided without -w, add an opt-in -c cleanup for cached parameter state, and rebase relative startup/data paths before changing directory.
Windows also needs different daemon lock handling than POSIX. Store lock files under the host temp directory, write a PID companion file for stale-lock recovery, and register exit-time close/unlink hooks so graceful pxh shutdown and console-close paths do not leave stale px4_lock files behind.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The embedded Windows shell uses host command fallback for commands it does not handle itself. Check PATH before spawning cmd.exe so unrecognized PX4 shell commands do not leak localized Windows errors, while real host commands still execute normally.
Keep the embedded shell PATH separate from the host process environment and preserve assignment expansion as a single word. That prevents rcS-style PATH edits and variable assignments from being split into bogus host commands on Windows.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
PX4 command clients need poll() to work for more than Winsock sockets on Windows because daemon output is relayed through CRT pipes. Classify descriptors before dispatching to WSAPoll, handle pipe and console readiness locally, and keep socket-only calls on the fast path.
Also avoid duplicate Windows socket control-message declarations, provide common stat predicates, clean up adapter-name allocation failures, and remove the uppercase Windows.h shim now that the Windows include path no longer needs it.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The Windows wait path needs a host-side wakeup primitive in addition to the simulated-time barrier so producer threads can notify consumers without relying on coarse sleeps. Add native event and condition signaling around scheduler updates, and cover the wakeup behavior in the lockstep tests.
This keeps high speed-factor SITL from stalling when the producer advances time while consumers are blocked in a Windows wait, while preserving the existing POSIX-facing scheduler API.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Add host-calibrated sleep and spin-tail handling for Windows SITL, plus scheduler and clock helpers needed to keep short lockstep waits precise under MSVC and MinGW.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Add compiler-specific CMake helpers and use them across Windows-sensitive targets so MSVC and MinGW can share the native SITL build without leaking unsupported flags between compilers.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Use wall-time watchdogs for lockstep component barriers and condition waits so one delayed participant cannot stall the simulator forever.
The HRT work queue gains an explicit semaphore wakeup path on Windows, work queues mark lockstep progress while active, and SIH uses wall-time sleeps/yields so speed factors above realtime are not limited by coarse sleeps.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Use loopback TCP for daemon clients on Windows, strip the .exe suffix from command aliases, and relay command stdout through a CRT pipe instead of fdopen() on WinSock sockets.
The PXH loop now handles Windows console and redirected input explicitly, supports exit/quit commands, and preserves normal shutdown replies so px4-shutdown can return success before the daemon exits.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Route plain text script output through the PX4 log formatter when it already follows the INFO/WARN/ERROR module format.
This keeps color selection centralized, preserves tty-aware color decisions across daemon and shell output, and adds a stdout tty override for embedded-script execution where output is intentionally captured.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Add MinGW-w64 toolchain support, Windows-specific POSIX target wiring, and compiler flag handling for MSVC and MinGW.
The build now copies px4-* command executables instead of relying on symlinks, places dynamic modules where tests expect them, forwards ExternalProject toolchain state, and adds a CI cross-build for px4_sitl_default.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Route POSIX startup scripts through a platform shell hook instead of hard-coding /bin/sh in main.cpp.
Linux keeps the existing external-shell behavior through shell_posix.cpp, while the Windows backend can use an embedded shell implementation. The same path also restores console state and exits through the platform cleanup hook during shutdown.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
Introduce the Win32 backend and POSIX shim headers used by the POSIX SITL platform on Windows hosts.
The backend provides filesystem, networking, process, time, termios, dlfcn, console, and errno translation hooks. Common platform types are also adjusted for MSVC/MinGW portability, including atomics, visibility, ioctl pointer values, task priorities, semaphores, and platform exit.
Signed-off-by: Nuno Marques <n.marques21@hotmail.com>
The bootloader boot-delay feature has been mechanically broken on
every modern FMU board since the STM32F7/H7 transition. It has three
independent bugs that prevent it from ever working:
1. Offset mismatch: BOOT_DELAY_ADDRESS is hardcoded to 0x1a0, but the
NuttX vector table is 504 B (F76x) to 664 B (H743) long. The
linker places _bootdelay_signature at ALIGN(32) past end of
vectors (e.g. 0x2a0 on CubeOrange), never at 0x1a0. The bootloader
reads random exception_common pointers in place of the magic and
never matches BOOT_DELAY_SIGNATURE1/2. Verified on CubeOrange with
objdump of cubepilot_cubeorange_default.elf.
2. Flash cache never flushes: fc_write() stores arbitrary writes in
cache line 1 and only flushes on a very specific condition tied
to the sequential firmware upload flow. A standalone write during
PROTO_SET_DELAY is cached forever. fc_read() then returns the
cached value, so the post-write verify lies and the bootloader
reports success. Nothing ever reaches flash.
3. H7 write granularity: the STM32H7 flash controller requires a
full 32-byte program cycle per write. Single 32-bit writes from
flash_func_write_word() would not be accepted by the controller
even if they reached it.
The feature has been silently dead on every H7/F7 FMU board for
years and no one noticed, which is strong evidence nothing actually
depends on it. Rather than fix it (which would mean rewriting
PROTO_SET_DELAY, the flash cache path, and the H7 flash programming
path), remove it.
Changes:
- bl.c: PROTO_SET_DELAY case now immediately NACKs (goto cmd_bad)
so clients that still send the command get a clear rejection
instead of the previous silent fake-success. The opcode stays in
the protocol enum for backwards compatibility.
- bl.h: drop BOOT_DELAY_SIGNATURE1/2 and BOOT_DELAY_MAX.
- stm/stm32_common/main.c, nxp/imxrt_common/main.c: drop the
startup boot-delay sig check block.
- image_toc.c: decouple find_toc() from BOOT_DELAY_ADDRESS.
BOARD_IMAGE_TOC_OFFSET is now the required define when
BOOTLOADER_USE_TOC is enabled. The body is wrapped in #ifdef
BOOTLOADER_USE_TOC and falls back to a stub returning false when
the TOC is not in use (no upstream board currently enables it).
- Linker scripts: strip EXTERN(_bootdelay_signature) and the
FILL/. += 8 block from all 142 affected .ld files across boards/.
- hw_config.h: strip the #define BOOT_DELAY_ADDRESS and its comment
block entry from all 48 affected boards.
- Tools/px4_uploader.py, Tools/teensy_uploader.py: remove --boot-delay,
set_boot_delay(), and SET_BOOT_DELAY client-side counterpart.
Smoke-built on cubepilot_cubeorange_default and
cubepilot_cubeorange_bootloader; no link errors, no unresolved
symbols, flash usage unchanged.
Tested:
- New BL, new FW
- Old BL, old FW
- Old BL, new FW
- New BL, old FW
The px4-sim / px4-sim-gazebo Homebrew meta-formulae can no longer
pull their Gazebo dependency chain because Homebrew 4.5+ stopped
auto-resolving cross-tap deps. PX4/homebrew-px4#104 already
deprecated px4-dev into a no-op; #111 does the same for the sim
formulae. This PR is the PX4-side counterpart: move the sim install
into Tools/setup/macos.sh with an explicit package list and tap
registration, mirroring the pattern already used for the toolchain
block. Adds xquartz install on --sim-tools.
Beyond install, three runtime and configure gaps kept make px4_sitl
gz_x500 from working on a clean macOS:
- gz-gui8 (pulled in by gz-sim8) links against Qt5, but Homebrew's
qt@5 is keg-only so CMake cannot find it. Add a POSIX-scoped hint
in platforms/posix/cmake/px4_impl_os.cmake that resolves
brew --prefix qt@5 and appends it to CMAKE_PREFIX_PATH. No-ops on
non-APPLE builds and respects a user-set Qt5_DIR.
- On macOS, dyld does not search /opt/homebrew/lib by default.
gobject-introspection typelibs reference libs by bare basename,
causing gst-plugin-scanner to fail to load plugins and adding
~90s of timeout to Gazebo's cold start. Set
DYLD_FALLBACK_LIBRARY_PATH to the Homebrew prefix lib dir in
gz_env.sh so the bridge launch inherits it. Darwin-scoped, no
effect on Linux or CI.
- configure_file on gz_env.sh.in now uses @ONLY so shell ${VAR}
references pass through untouched.
Verified locally on macOS 26.4 / arm64 / Homebrew 5.1.7: configure
clean, 1119/1119 targets compile and link, vehicle spawns in
Gazebo Harmonic 8.11.0 with a single "Waiting for Gazebo world"
wait (was ~18 before the dyld fix).
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
* refactor: make timer_io_channels[].timer_channel 0-indexed
timer_channel was 1-indexed (1-4) to mirror STM32 hardware naming
(TIM_CH1-CH4), but this was purely cosmetic — the ccr_offset field
already handles register mapping. Every consumer did timer_channel - 1
to get a 0-based index, creating underflow bugs when the guard was
missing (e.g. dshot.c capture_complete_callback,
output_channel_from_timer_channel, up_bdshot_get_erpm).
Changes:
- STM32: Timer::Channel enum starts at 0, initIOTimerChannel assigns
directly, removed all timer_channel - 1 in dshot.c and io_timer.c
- NXP (kinetis, s32k1xx, s32k3xx): removed the + 1 in
initIOTimerChannel, removed timer_channel - 1 in io_timer.c,
led_pwm.cpp, and input_capture.c
- RPI: Channel enum starts at 0, removed timer_channel - 1 in
io_timer.c
- Validity checks updated from timer_channel <= 0 || >= 5 to
timer_channel >= 4
Closes#26747
Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
* fix: complete 0-indexed timer_channel migration across all platforms
Address review feedback for incomplete migration:
1. STM32H7 io_timer_hw_description.h: update standalone
initIOTimerChannel() to assign timer_channel from enum
(0-based) instead of hardcoded 1/2/3/4
2. Switch case labels: update all switch(timer_channel) blocks
from 1/2/3/4 to 0/1/2/3 in:
- stm32_common: input_capture.c (4 blocks), led_pwm.cpp (3),
io_timer.c DMA base register switch
- kinetis: input_capture.c (2 filter blocks)
- s32k1xx: input_capture.c (2 filter blocks)
- spix_sync.c (ark/fpv + ark/pi6x, 3 blocks each)
3. Sentinel checks: replace timer_channel != 0 / == 0 (which
now conflicts with valid channel 0) with gpio_out-based
checks in:
- io_timer_validate_channel_index() across all 5 platforms
- led_pwm_channel_init() and led_pwm_servo_get() in all
led_pwm.cpp variants (STM32 + 4 NXP)
- spix_sync_channel_init() and spix_sync_servo_get()
Tested: px4_fmu-v6x_default (H7) build OK, px4_sitl_default
build OK, 154/154 unit tests pass, ASan build clean.
* fix: update NXP board led_pwm_channels to 0-indexed timer_channel
These 4 board files manually specify led_pwm_channels[] with
1-indexed timer_channel values. Since the platform code no longer
subtracts 1, decrement all values to match the new 0-indexed
convention.
* fix: correct FTM CH3 filter mask in kinetis and s32k1xx input capture
Case 3 in up_input_capture_set_filter() was using CH2FVAL_MASK/SHIFT
instead of CH3FVAL_MASK/SHIFT due to a copy-paste error, causing
channel 3 filter writes to modify channel 2's filter register instead.
---------
Signed-off-by: Pavel Guzenfeld <pavelgu@gmail.com>
Co-authored-by: Jacob Dahl <dahl.jakejacob@gmail.com>
CMake 3.27+ warns on cmake_minimum_required(VERSION < 3.10), and CMake
4.x will make it a hard error. Align the lockstep_scheduler subdir with
the root CMakeLists.txt, which is already at 3.10.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>
- Replace all MINDPX/MINDPXv2/PX4FMU board references with SaamPixV1_1
- Update Airmind Development Team to Saam Drones Development Team in copyright headers
- Update PX4 copyright year range to 2020-2026 on all C/C++ files
- Rename bootloader binary to match board version (v1_1)
- Remove untracked backup files
POSIX/SITL builds on macOS produce two classes of benign warnings that
clutter output and obscure real issues:
ranlib: warning: 'lib*.a(foo.o)' has no symbols
ld: warning: ignoring duplicate libraries: ...
The ranlib warnings come from sources wrapped in #if defined(CONFIG_*)
guards (i2c.cpp, spi.cpp, board_common.c, pab_manifest.c,
px4_log_history.cpp) and dummy.cpp placeholders, which legitimately
compile to empty object files on POSIX. GNU ranlib ignores this;
Apple's warns. The warning is emitted by 'ar qc' (which implicitly
builds a symbol table), not by ranlib itself, so overriding only
ARCHIVE_FINISH is insufficient. Use 'ar qcS' to skip the implicit
symbol table, then let ranlib -no_warning_for_no_symbols build it
quietly via ARCHIVE_FINISH.
The duplicate-library warnings come from CMake intentionally
re-emitting static libraries on the link line to resolve circular
dependencies between px4_layer, px4_work_queue, px4_daemon and
lockstep_scheduler. GNU ld silently dedupes; Apple's ld-prime
(Xcode 15+) warns. Pass -no_warn_duplicate_libraries to the linker.
Both fixes are Darwin-only and have no effect on Linux CI or NuttX
builds.
Signed-off-by: Ramon Roche <mrpollo@gmail.com>