* feat(boards/syro): add Syro FMUv6X
STM32H7 flight controller based on the FMUv6X reference design, with its
own board ID.
Sensors: two ICM-45686 and a BMI088 IMU, two BMP581 barometers, and a
BMM350 compass. The external compass on GPS1 is started as an IST8310,
and the common magnetometer drivers are built in for other GPS modules.
The baseboard carries a PX4IO co-processor and Ethernet.
Flight-tested as a quadcopter on auto missions; logs are linked in the
pull request.
Assisted-by: Claude
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* feat(boards/syro): identify the Syro baseboard by base ID 0x110
The Syro baseboard's version divider reads 7, so PX4 takes the base ID
from the base EEPROM. Add base ID 0x110 to the base manifest with the
standard FMUv6X base configuration (PX4IO, CAN2, second power module,
Ethernet), so these are enabled on the Syro base.
Build mft_cfg so the IDs can be written to each board during production:
mft_cfg set hwver -i 0x110 and mft_cfg set hwrev -i 0x10.
Assisted-by: Claude
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* docs(boards/syro): add Syro V6X flight controller page
The board support guide requires a docs page for a new flight
controller, with the pinout and a block diagram. Add one for the
Syro V6X and list it in the sidebar and with the
manufacturer-supported boards.
The page documents what the firmware target defines: the serial
port mapping, I2C buses and their reserved addresses (0x46 on I2C2,
0x51 on I2C3), power module inputs, PWM output groups and DShot
support, Ethernet, the TELEM2-only bootloader, and the hardware
IDs written with mft_cfg in production.
Assisted-by: Claude
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* fix(boards/syro): regulate the IMU heater on IMU1 and enable it by default
The heater sits next to IMU1, IMU2, BARO1 and the internal mag. With
HEATER1_SENS_ID left at 0 the heater auto-selects IMU0, which is outside
the heated area, so it never reaches its 55 C target and runs at 100 %.
In flight logs IMU0 stayed at 26-30 C while IMU1, IMU2, BARO1 and the
internal mag reached 65-76 C.
Regulate on IMU1 (ICM-45686 on SPI2, device ID 3407890), which is fixed by
the board design, and enable thermal control since the heater is fitted.
Assisted-by: Claude
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* refactor(boards/syro): remove the unused MS5611 driver
No MS5611 is fitted and the board startup script never starts the driver.
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* docs(boards/syro): add pinouts, port drawings and block diagram
Fill in the connector list, the pin tables, the power input range and the store link, and add the Syro V6X to the release notes.
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* docs(boards/syro): align the tables in the Syro V6X page
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
* docs(boards/syro): say which sensors the heater warms
The heater sits on the IMU board, so the ICM-45686 on SPI1 and the BMP581 on I2C2 stay unheated.
Assisted-by: Claude:claude-fable-5-2
Signed-off-by: Volkan Bozdogan <vlknbzdn@gmail.com>
Signed-off-by: Hamish Willee <hamishwillee@gmail.com>
The avionics power check used fixed 4.7V and 5.4V limits for every
board, while the valid range depends on what the 5V rail supplies.
A board can now set BOARD_AVIONICS_5V_MIN_V and BOARD_AVIONICS_5V_MAX_V;
the defaults keep the current limits.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: alexcekay <alexander@auterion.com>
ESCs can stay powered without a battery, e.g. when VBAT is back-fed from
USB, and then report a low voltage that is flagged as a low battery.
A board can now set BOARD_ESC_BATTERY_OPEN_CIRCUIT_V so that such a
reading counts as no battery connected. The default of 0V keeps the
current behavior.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: alexcekay <alexander@auterion.com>
* fix(cmake): link the functional gtest libraries as a group
px4_platform, parameters and uorb_msgs all reference uORB, but uORB is
listed before them, so a test only linked when something earlier
happened to pull in px4_log.o. Inlined param_get() type checks did that
for any test using DEFINE_PARAMETERS; without them PerformanceModel and
StickYaw failed with undefined orb_advertise and orb_publish.
Assisted-by: Claude:claude-opus-5-5
* refactor(platform): load DEFINE_PARAMETERS members from a table
Every parameter cost a param_get_mark_used() call in its class
constructor and a param_get() call in updateParamsImpl(), about 12 bytes
each, for roughly 2000 parameters. Each Param now takes one
pointer-sized slot, so the members a DEFINE_PARAMETERS list declares
form an array. A ParamTable member declared right after them holds the
handles and loads them all with one call, in the constructor and on
update. External parameters keep a pointer instead of a reference so
the loader can follow it.
Assisted-by: Claude:claude-opus-5-5
* refactor(platform): use param_t for parameter table entries
Each entry is a parameter handle with the storage kind in its top bits,
so it takes the handle's type.
Assisted-by: Claude:claude-opus-5-5
* refactor(platform): keep each Param at its natural size
Padding every Param to a pointer-sized slot doubled float and int32
members on 64-bit targets and grew ParamBool from 1 to 4 bytes. The
macro now passes the first parameter's address to the table, and the
loader steps through the members at each kind's own size and alignment.
A table placed before the parameters would instead load through the
external parameters before their pointers are set.
Assisted-by: Claude:claude-opus-5-5
* refactor(platform): drop the parameter table end marker
APPLY_ALL leaves a comma after every entry, so the template argument
list needed a closing element, which every class then stored in its
entry array. The entries are now a static array of the class, whose
braced initializer accepts the trailing comma.
Assisted-by: Claude:claude-opus-5-5
* refactor(platform): check the parameter layout at compile time
The language leaves padding between members to the compiler, so the
table loader relies on the ABI placing each member at the next address
its alignment allows. Each class's updateParamsImpl() now checks every
parameter's offsetof against where the loader steps, so a compiler that
pads differently fails the build instead of loading into the wrong
members.
Assisted-by: Claude:claude-opus-5-5
* docs(platform): describe how DEFINE_PARAMETERS loads parameters
The table loader walks the members of a class from the first parameter's
address, which is not obvious from the macros or the loader alone. A
block above the macros now states the flash cost it removes, what the
macro adds to a class, how the loader steps, and which static_asserts
guard the layout it relies on.
The namespace comment said a Param does not depend on the macro. That
stopped being true when the constructors stopped loading.
Assisted-by: Claude:claude-fable-5-2
* docs(platform): drop the flash figure from the parameter table comment
A measured saving for one board goes stale as parameters are added. The
comment now states what the table replaces the per-parameter calls with.
Assisted-by: Claude:claude-fable-5-2
* fix(platform): build the parameter layout check on GCC before 9
GCC 7 and 8 ignore _Pragma diagnostics inside a macro expansion, so the
offsetof warning in the DEFINE_PARAMETERS layout check stays an error on
the VOXL 2 toolchain. Those compilers now build with
-Wno-invalid-offsetof. The static_assert still runs there.
Assisted-by: Claude:claude-opus-5-5
Pulls in PX4/NuttX#454. The STM32 and AT32 I2C drivers left NACKIE
enabled after a transfer ended. A late NACK from a timed-out transfer
could then fire the ISR while the next transfer was being set up, set
priv->msgv to NULL and hard fault in stm32_i2c_sendstart().
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: danielbuleandra <daniel.buleandra@auterion.com>
Boards with a px4io took the IO firmware from a binary committed under
boards/<vendor>/io-v2/extras/. It had to be regenerated by hand with
"make px4io_update" whenever px4iofirmware, lib/rc, the IO board or
NuttX changed, and a CI job failed until it was.
Build it from source instead. A target with CONFIG_BOARD_IO set now
builds that IO target as part of its own build and puts the result in
its ROMFS. NuttX builds inside its source tree, so the IO build gets its
own copy of the NuttX sources in build/px4io/<BOARD_IO>/, shared by
every target built in the checkout. The IO build runs on every build of
the embedding target, so an IO source change reaches the ROMFS without
a clean.
PX4_NUTTX_TREE_DIR points a NuttX build at such a copy, and the
hardcoded platforms/nuttx/NuttX/{nuttx,apps} paths now go through
NUTTX_DIR and NUTTX_APPS_DIR.
Remove the two committed binaries, the px4io_update and check_px4io
make targets, and the CI job that compared them.
Assisted-by: Claude:claude-fable-5-2
* feat(nuttx): bump submodule for the STM32 pre-clock hook
Brings in the backport of apache/nuttx#22076, a weak
stm32_preclock_hook() that every STM32 __start calls before the clock
setup. The bootloader needs it to hand over to the ROM's DFU
bootloader for reboot -i.
Assisted-by: Claude:claude-opus-5-5
* build(px4io): regenerate the IO firmware for the NuttX bump
The STM32F1 __start now calls the pre-clock hook, which grows both IO
binaries by 12 bytes, and check_px4io compares against them.
Assisted-by: Claude:claude-opus-5-5
* fix(logger): use selected device_id to choose sensor in fifo logging
* fix(logger): keep logger_topics.txt fifo instances and skip profile fifo without a matching selected imu
* docs(logger): describe fifo logging of the selected imu
Returning from a QuRT task bypasses px4_task_exit(), while normal module
shutdown does not call px4_task_join(). Repeated starts and stops therefore
leak task descriptors and eventually exhaust the 24-slot task table.
Route task returns through px4_task_exit() and reap exiting threads before
spawning another task. Keep each slot reserved until pthread_join()
completes, serialize competing joiners without holding the task mutex
across the join, and reject cancellation of tasks waiting on these joins.
Use monotonically increasing task handles so a late join, delete, or signal
cannot act on a replacement task after its table slot has been reused.
Ported from modalai/px4-firmware commit
1fe92691127df29e72af05f99d462c62428d3994 without code changes.
Assisted-by: Codex
Signed-off-by: Eric Katzfey <eric.katzfey@modalai.com>
Each NuttX library and the apps are built by a make invocation that
ninja treats as a single opaque custom command, so they compiled one
file at a time.
Run them through a wrapper that honours a job count given to the
toplevel build (e.g. `make px4_fmu-v5x_default -j1`), which reaches it
through MAKEFLAGS, and otherwise uses the number of CPUs available to
the process. Unlike CMake's logical core count, nproc respects docker
--cpuset-cpus. A load limit keeps the concurrently running NuttX makes
from oversubscribing the host.
Mark the toplevel cmake build recipe as a sub-make with '+'. GNU make
before 4.4 (e.g. Ubuntu 22.04/24.04) passes its jobserver as pipe file
descriptors, which it otherwise closes for that recipe, leaving the
NuttX makes to fall back to serial builds.
Mention how to disable parallel builds in the docker docs.
Assisted-by: Claude Code (claude-opus-5-5)
NuttX's tools/Config.mk defines DEFINE_PREFIX, INCDIR_PREFIX and
INCSYSDIR_PREFIX as exported recursive variables that run a shell
script on every expansion. Because they are exported, make expands
them for every recipe it spawns, serially in its main process.
The NuttX toplevel make hides this by handing the expanded values to
its sub-makes through the environment. PX4 calls the per-directory
sub-makes directly, so each one re-ran define.sh and incdir about 30
times per compiled file. That throttled the NuttX library builds to a
few objects per second regardless of the job count. Since the NuttX
12.12 upgrade, CINCPATH and CFLAGS reference these variables, which
turned this into a build time regression.
Evaluate them once with := after CC is defined. The generated compile
commands are unchanged. Rebuilding sched for fmu-v5x from scratch
drops from 37 s to under 4 s.
Assisted-by: Claude Code (claude-opus-5-5)
Drivers and arch code no longer include a header from inside the IO
firmware module.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Michael Rogov Papernov <michael@membrowse.com>
crc8_tab and crc_packet() were static in protocol.h, so every flight
controller image carried two copies of the table: one for the px4io
driver and one for the arch serial code.
Move them into a px4io_protocol library. This saves 304 bytes of FLASH
on px4_fmu-v6x; the IO firmware is unchanged.
Assisted-by: Claude:claude-fable-5-1
Signed-off-by: Michael Rogov Papernov <michael@membrowse.com>
Point platforms/nuttx/NuttX/nuttx at the PX4/NuttX branch tip, which now
has the merged backports:
- PX4/NuttX#447: arch/arm/imxrt: a fixed link when no PHY answers
(apache/nuttx#20457)
- PX4/NuttX#449: arch/arm/imxrt: hold RX frames while the ENET TX ring
is full (apache/nuttx#20562)
The tip also carries the i.MX 9 backports #439 to #445, which do not
touch arch/arm/src/imxrt.
Assisted-by: Claude:claude-opus-5
Signed-off-by: TheLukaDragar <lukadragarbusiness@gmail.com>
- platforms/nuttx/NuttX/nuttx: bump to the backport of apache/nuttx
eafd01cecc ("arch/arm/imxrt: a fixed link when no PHY answers").
- boards/px4/fmu-v6xrt: enable CONFIG_IMXRT_ENET_FIXED_LINK. The driver
still probes the board's PHY list first. If no PHY answers, the MAC
runs at 100 Mbps full duplex, so a carrier that wires the FMU's RMII
bus straight to a switch port or another MAC brings eth0 up. Carriers
with a PHY are unchanged.
Assisted-by: Claude:claude-opus-5
Signed-off-by: TheLukaDragar <lukadragarbusiness@gmail.com>
90 driver main functions repeated the same three strcmp() checks and
calls. I2CSPIDriver<T>::module_main() does it once; drivers with extra
verbs keep their own dispatch.
Assisted-by: Claude:claude-opus-5-5
When no output is configured for DShot, init fails and the destructor
calls up_dshot_arm(false) before up_dshot_init() ever ran. Since the
FlexIO driver rework up_dshot_arm() writes SHIFTSIEN and TIMIEN
unconditionally, but FlexIO1 is still clock gated at that point and an
access to a gated i.MX RT peripheral stalls the bus: the app dies about
12 s after boot with no fault, before the USB autostart. Seen on the
RT1064 (MR-VMU-TROPIC); RT1176 boards init DShot successfully first.
Return early when the channel mask is empty.
- USB VALID/CONNECTED set to 0
- TPM: reject OneShot when the clock can't support it, fix W1C status
and hw channel indexing, scale TPM3 to its correct tick
- Set pad pulls through the iomux
- Calibrate LOOPSPERMSEC on hardware (159856)
- Drop I2C_LATEINIT, the ADC critical section and the FAT DMA pool
- Add validateSPIConfig
- Round the LPIT reload up
- Make imx9 its own CI chip family, with its own group and seeder
- Reject BDShot150 and fall back to plain DShot (also a long-standing
bug on i.MX RT)
Signed-off-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Add the PX4 arch layer for the i.MX9 family: ADC, HRT on LPTMR with
LPIT deadlines, TPM io timers, pin interrupts, LPSPI with chip selects
for all eight instances, critmon on the DWT cycle counter, a tone alarm
on a TPM channel, version reporting with the 128-bit ECID read from the
Fuse Status Block as the UUID, the board reset entry point, plus the
i.MX95 chip include set, the chip mapping in px4_impl_os.cmake and the
PX4_SOC_ARCH_ID_IMX95 id. DShot uses the shared NXP FlexIO driver with
the i.MX9 FlexIO base, offsets, IRQ, clock root and pad hooks.
Not implemented yet: reset of the M7 through the System Manager, LED
PWM and PWM input capture.
i.MX9 timer configs name their timers Timer::TPMn and mark DShot
capable ones with initIOTimerDshot(), so teach
output_groups_from_timer_config.py both forms.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
The FlexIO block and the driver logic are the same on every NXP part
that has FlexIO. Move the driver next to the other shared NXP code and
gather the chip-specific pieces (FlexIO base, register offset prefix,
IRQ number, clock enable, pad configuration, unused-channel test) in one
block at the top, so another chip only has to provide that block.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
Boards started by MCUboot, such as the i.MX95 flash build, need the
raw objcopy output wrapped in the MCUboot header and TLV trailer before
it boots. Add CONFIG_BOARD_MCUBOOT_IMGTOOL_ARGS, a board option holding
the imgtool sign arguments, and build <config>.signed.bin next to the
plain .bin from the NuttX CMake, the way Zephyr's west sign does. The
plain .bin and everything derived from it stay as they are.
A signing key is passed through BOARD_MCUBOOT_KEY in the environment
at configure time, so private keys stay out of the board files.
imgtool comes from PyPI via Tools/setup/requirements.txt. When it is
missing, CMake warns and skips the signed image instead of failing the
configure.
The .px4 package is only built when the board has a firmware.prototype,
so a board that boots through MCUboot and has no PX4 bootloader needs
no board_id.
Co-authored-by: Andre Heinemans <andre.heinemans@nxp.com>
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 <andre.heinemans@nxp.com>
Illegal 5-bit GCR symbols decoded to 0x0, so a corrupted frame could alias a valid zero nibble and pass the 4-bit checksum, producing a false eRPM or EDT sample. Of all 2^20 received words the old decoder accepted 61440; only the 4096 valid codewords should pass.
Assisted-by: Claude:claude-opus-5-5
About 1700 call sites loaded the log level as the first argument of
px4_log_modulename(). Per-level functions drop that load and leave one
more register for the format arguments.
Assisted-by: Claude:claude-opus-5-5
CONSTRAINED_FLASH_NO_HELP only emptied the PRINT_MODULE_USAGE_* bodies,
so every call site and its strings stayed in flash. Make the helpers
no-op inlines there, as PRINT_MODULE_DESCRIPTION already is on NuttX;
only the usage line with the docs link is still printed.
Assisted-by: Claude:claude-opus-5-5
The constructor loop that assigns and subscribes every instance was
expanded into each of the ~55 SubscriptionMultiArray members in the
firmware. Move it into a non-template function in Subscription.cpp,
called with the array, its size and the topic.
px4_fmu-v6x_default: 1918712 -> 1917160 bytes of text, -1552 B.
Assisted-by: Claude:claude-fable-5-1
Co-authored-by: Balduin <balduin@auterion.com>
The constructor was defined in the header, so every one of the ~150
module and library classes deriving from ModuleParams expanded it into
its own constructor: the ListNode and child-list initialisation plus
the setParent() call, repeated per class.
Moving the body next to setParent() in module_params.cpp leaves a single
call at each site. px4_fmu-v6x_default: 1934288 -> 1932520 bytes of
text, -1768 B.
Assisted-by: Claude:claude-fable-5-1
Co-authored-by: Balduin <balduin@auterion.com>
The constructor was defined in the header, so each of the ~75 I2C/SPI
drivers expanded the ScheduledWorkItem and I2CSPIInstance initialisation
into its own constructor.
Moving the body to i2c_spi_buses.cpp leaves one call per driver.
px4_fmu-v6x_default: 1932520 -> 1930616 bytes of text, -1904 B.
Assisted-by: Claude:claude-fable-5-1
Co-authored-by: Balduin <balduin@auterion.com>
The base implementation, which walks the child list and then calls
updateParamsImpl(), was defined in the class body. Every module that
calls updateParams() on a parameter update therefore inlined the list
walk. Define it in module_params.cpp next to setParent().
px4_fmu-v6x_default: 1917160 -> 1915056 bytes of text, -2104 B.
Assisted-by: Claude:claude-fable-5-1
Co-authored-by: Balduin <balduin@auterion.com>
Adds secureboot and bootloader_secureboot variants for fmu-v6xrt
(ed25519 image signing).
The image starts with the 0x2000 FlexSPI boot header, so the TOC sits
at 0x2800, past the vector table, and its first entry starts at
APP_LOAD_ADDRESS.
bl.c: apply APP_VECTOR_OFFSET to the vector base when the TOC has no
vectors entry. No change for boards with a zero offset.
Bootloader grows 8192 B to 96656 B (73.7% of 128 KB).
Tested on hardware: signed image boots; unsigned, tampered and
test-key-signed images are refused.
Signed-off-by: abhijithcv <abhijithcv1212@gmail.com>
* fix(vectornav): limit init based on retries, set max thread prio
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
* fix(vnav): set lower priority than max
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
* chore(vnav): remove unused variable
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
* fix(vnav): set scheduler priority definition in tasks header, base off of PX4_WQ_HP_BASE
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
---------
Signed-off-by: dirksavage88 <dirksavage88@gmail.com>
A publisher calls call() under the node lock until the subscription is
unregistered. SubscriptionBlocking, SubscriptionCallbackWorkItem and
the MCP CallbackHandler left that to ~SubscriptionCallback(), which runs
after the subclass is gone, so a publication during destruction aborted
with "pure virtual method called". SubscriptionBlocking could also signal
its already destroyed condition variable. SITL mag calibration in SIH hit
this on almost every side.
The new functional test aborts on both subscription types within about
a second without the fix.
Assisted-by: Claude:claude-opus-5-5
wait_for_beginfirmwareupdate() subtracted the source_node_id field from
the received length without checking the request was that long, so an
empty request wrapped the firmware path length to SIZE_MAX and the
following GetInfo and Read requests were built from far past the path
buffer. Keep waiting until a request long enough to hold the field
arrives.
The programming progress divided by fw_image_size / 100, which is zero
for images under 100 bytes, and an image down to the size of the app
descriptor is accepted. Scale the offset instead.
Reported by @doridoriJJ.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Julian Oes <julian@oes.ch>
Removing a file while it is open, for example time_save.bin which
time_persistor keeps open, could make its next sync overwrite the entry
that follows it, if the file was the last entry of a split metadata
pair. A directory hit by this fails every lookup with "Bad address".
This is a regression in littlefs v2.5.0. Pick up the local littlefs
patch until the fix is in a littlefs release.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: alexcekay <alexander@auterion.com>
The previous bump pinned the PX4/NuttX#433 branch commit, which the squash merge replaced and the branch deletion left unreachable, so fresh clones fail to fetch the submodule. The merged commit has the identical tree.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Jacob Dahl <dahl.jakejacob@gmail.com>
While a topic has no device node, every Subscription::update(), copy(),
updated() and advertised() repeats the device node lookup and fails
again. Polling modules touch many optional topics on every loop: in a
SITL flight about 8% of all instructions, and about a quarter of each
MAVLink thread, were such failed lookups.
Device nodes are never removed, so a lookup that failed cannot succeed
before a node is added. Count the nodes added in DeviceMaster and only
retry the lookup once that count has changed. Protected builds, where
user space has no cheap access to it, keep retrying every time.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
astyle indents the character-shift initializer as a continuation; the
same values as hex words with comments pass check_format.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
This reverts commit d92a0c6b3. In protected builds px4_work_queue is also
linked into the kernel image, where px4_layer's user-side objects collide
with the kernel ones (px4_fmu-v5_protected). The Erbium target no longer
needs the link dependency, since its modules pull in px4_task_spawn_cmd()
and px4_task_join() before px4_work_queue is linked.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Erbium is a RISC-V RV64IMFC chip whose NuttX port is in PX4/NuttX. Add
the PX4 platform layer for it: HRT, board reset, critmon time base and
board identity, the riscv-none-elf toolchain file and the rv64imfc
compiler flags, which include -mno-fdiv because the ET-Minion core has
no hardware for FDIV.S and FSQRT.S.
The HRT reads the machine timer and runs its callouts in a task, since
the NuttX RISC-V trap path does not save the FP registers that callouts
may use.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
NuttX builds the startup code of a RISC-V chip as a separate head
object next to libarch instead of into it, so the final link did not
include the reset entry point. Declare the object as a byproduct of the
arch build and link it.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
px4_at24c_initialize() takes a struct i2c_master_s pointer. Without a
declaration in scope the struct is local to the prototype, which is an
error with -Werror on a target that does not include the NuttX I2C
headers before px4_mtd.h.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
WorkQueueManager starts and joins its thread with px4_task_spawn_cmd()
and px4_task_join() from px4_layer, but px4_work_queue did not declare
that dependency. Targets with many modules pull those objects in before
px4_work_queue is linked; a target with only a few system commands
fails to link.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
Module stack sizes are tuned for 32-bit targets. The POSIX task spawn
and the work queues already pass them through PX4_STACK_ADJUSTED(),
which doubles them when pointers are 64-bit; px4_task_spawn_cmd() on
NuttX did not, so a 64-bit NuttX target overflows stacks such as the
SIH simulator's. On 32-bit targets PX4_STACK_ADJUSTED() leaves the size
unchanged.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Afonso Oliveira <afonso.oliveira707@gmail.com>
NuttX 12.12 switches an SD card to the 4-bit bus only when the host
driver reports SDIO_CAPS_4BIT. The STM32 SDIO and SDMMC drivers never
reported it, so STM32 boards with an SDIO/SDMMC card slot ran it on a
1-bit bus, cutting SD write throughput by about 40% against v1.18.
Pick up the backport that makes the drivers report it.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: alexklimaj <alex@arkelectron.com>
Move to the fork tip, which adds the CAAM job ring and RNG drivers for
RT117x (PX4/NuttX#432) so a board can register /dev/random and
/dev/urandom backed by the hardware generator. The bump also carries
the RISC-V erbium emulator port that landed on the fork before it.
Assisted-by: Claude:claude-fable-5-1