feat(platforms): upgrade NuttX to 12.12.0#26215
Conversation
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 5336 byte (0.25 %)]px4_fmu-v6x [Total VM Diff: 7400 byte (0.36 %)]Updated: 2026-04-01T12:19:51 |
c57843c to
dc431f3
Compare
|
Hi @PetervdPerk-NXP, @AlexKlimaj, This is a very large change (around 5,000 commits in NuttX and many changes in the common code), and to be honest I’m not particularly excited about the approach:
Especially when this then requires patching and reviewing fixes like the following just to get things running: This kind of patching being needed already shows that interfaces don't behave the same anymore and we need to understand this and not start patching until it somehow works. This one was detected, but I am very sure there are a lot more of those "quirks" that will occur less often and only in specific situations. Don’t get me wrong, I like the idea of us staying up to date with NuttX. However, with a migration that appears to be largely AI-driven, it effectively shifts a significant amount of risk and workload onto the reviewers and flight testers. They now need to ensure that no low-level or timing-related issues are introduced that might only show up sporadically in real operation. With that in mind, I’d like to ask a few questions:
|
dc431f3 to
11b08f9
Compare
|
Hi @alexcekay,
Beyond Kconfig symbol churn, the PR is quite modest. My reason to upgrade is primarily to enable i.MX93/i.MX95 hardware, which depends on a more mature RPMsg that we can’t realistically backport from our 2-3 year old NuttX. But they're are various other improvements NuttX brings which makes it worthwhile to upgrade. I sense some hesitation about upgrading. If we intend to stay on the current kernel long‑term, the migration cost will only grow. I’m happy to help push this over the line, as I did myself with the previous kernel bump 2 years ago aswell, but I’d appreciate alignment and some shared ownership. If you’d prefer I step back and focus elsewhere, let me know. |
11b08f9 to
ff41669
Compare
|
Hi @PetervdPerk-NXP, Thanks for explaining your rationale and pushing this topic.
No, as stated: Don’t get me wrong, I like the idea of us staying up to date with NuttX and appreciate
I am hesitant about the risk associated with any larger OS change (and the hours needed to debug the issues afterwards) and thus want to de-risk this and emphasize:
When this has a sort of mature state where strange quirks are not needed anymore or are at least clearly understood I would be happy to assist in reviewing it and do testing with our HW. |
845fc70 to
f6d73d0
Compare
|
ARKV6X is booting and sd card works. Doesn't look like free or ps commands work. |
|
Confirmed ethernet is working on the ARKV6X. |
Good to hear SD card works, I've already removed the
This is a bit weird, maybe procfs doesn't properly mount, does
Awesome thanks for testing. |
|
Im also interested in upgrading Nuttx. Happy to assist in bench testing and flight testing to get this over the line confidently. What I will test on my bench so long. I hope to report back in the next week. |
91f6a29 to
99280e0
Compare
🔎 FLASH Analysispx4_fmu-v5x [Total VM Diff: 3884 byte (0.18 %)]px4_fmu-v6x [Total VM Diff: 5872 byte (0.29 %)]Updated: 2026-06-05T08:52:20 |
eafca2e to
b202ea7
Compare
b202ea7 to
ff58bd1
Compare
ff58bd1 to
1a356ac
Compare
| @@ -371,7 +371,7 @@ typedef struct { | |||
| int pid; /* Process ID */ | |||
| uint32_t regs[XCPTCONTEXT_REGS]; /* Interrupt register save area */ | |||
There was a problem hiding this comment.
[error] clang-diagnostic-error [error]
use of undeclared identifier XCPTCONTEXT_REGS
|
@PetervdPerk-NXP : Here is a fix for the MacOS build w. the new nuttx: tiiuae@99035c5 EDIT: I created a separate PR directly against upstream for these build issues, they are mechanical and can be reviewed & merged separately and beforehand: #27509 |
|
@PetervdPerk-NXP , @dakejahl : I see that there are some issues with flash consumption with the new nuttx and the latest PX4 additions. I have a bunch of potential NuttX size optimizations and also one small PX4 size optimization at hand. I will push them somewhere for reference... I think we can save some 2k from NuttX and another 2k from PX4 with ease. Perhaps I will make a separate PR for PX4 size optimization, and push PR:s for upstream NuttX for the nuttx size optimizations, and add links here. EDIT: Here is a PR for PX4, quick fix saving some 2KB: #27546 Let's see what is the reception in nuttx side for those, the last one might be a bit intrusive ! |
1a356ac to
3801886
Compare
|
I can try to fix the remaining clang-tidy issue, unless you are already doing that @PetervdPerk-NXP ? I missed the remaining CDev one previously. Also, for example holybro_kakutef7 still suffers from image growth; the largest optimization which I did previously for the string formatters in NuttX doesn't help that one, because it is not using those (no "date" application nor bbsram storing...). Only the FTL/bad block management will save a bit extra, but it has still some 5K extra now after rebase where something was added to the PX4... Fix for the CDev clang-tidy error: #27570 |
Update git sha's for NuttX
bootloader: update main prototype for NuttX 12.12.0 platforms/nuttx: Add wrapper for queue.h For some reason the queue.h header was moved, add this wrapper so posix and nuttx builds can both still use #include <queue.h> Fix print_load to be compatible with upstream NuttX Also Change tg_filelist -> tg_fdlist as per new NuttX Co-authored-by: Ville Juven <ville.juven@unikie.com> Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
sitl: fix NuttX 11.12.0 upgrade regressions drivers: uavcan: fix TFLM c library conflict With NuttX 12.12.0 the TFLM c library causes a conflict
boards: Disable MMC_IOC_CMD ioctl NuttX default is Y, but it's not used boards: Fix meminfo/free boards: fix libc float setting boards: Reduce flash usage Using strerr short mode Don't cache DNS entries (also saves some ram) fix(boards): kakutef7 disable optical flow ekf2 to save flash kakutef7 overflows with nuttx 12.12.0 also it doesn't have optical flow drivers anyhow. Thus disable ekf2 optical flow
NuttX 12.12 changed symbols for certain calls or inlined them.
Fix a protected kernel link failure caused by static initialization of a shared uORB::Publication in AM32Settings. Which is problematic for NuttX 12.12.0. The NuttX 12.12 PX4 protected kernel does not provide __dso_handle.
NuttX 12.12.0 changed up_assert ABI
d5e98c9 to
50f1b49
Compare
|
The remaining build errors seem to be on
I'll try to claw out the rest of the needed KBs for holybro_kakutef7 and px4_fmu-v5_protected. I have got some good candidates where to save from, and it is not super tricky. I try to refine these into upstreamable form early next week. |
Continuation of #26198 but now the NuttX repo's are on the PX4 repositories.
Some reasons why to upgrade NuttX
PX4 Test Plan
sd_benchand measure write speedtopwhen the system is armeduorb topwhen the system is armedmavlink status