Commit graph

61616 commits

Author SHA1 Message Date
simbit18
b37b22eacd cmake: Moved the creation of the nxtmpdir folder to the root CMake file
- Moved the creation of the `nxtmpdir` folder for third-party packages to the root  `CMakeLists.txt` file.

cmake/nuttx_3rdparty.cmake

- Add the nuttx_remove_nxtmpdir function to remove the third-party cache directory under nuttx/../nxtmpdir

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
simbit18
9035fba275 ci/testlist/risc-v-02.dat: Added boards build with CMake
-  Boards build by CMake

    esp32c3-xiao

    esp32-c3-zero

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
simbit18
ce7326bf14 testbuild.sh: CMake Added -DNXTMPDIR
- It is now possible to create folder for third-party packages in CMake as well. (Aligned with Make)

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-22 06:22:36 +08:00
shichunma
7897729bec net/tcp: improve tcp_send_txnotify
Use conn->dev directly when it is already available

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
2026-04-21 22:13:36 +08:00
Shunchao Hu
04cc4740ea arch/xtensa: Scope Wi-Fi disconnect case declarations.
- fix a "a label can only be part of a statement and
  a declaration is not a statement" compile error.
- toolchain xtensa-esp32s3-elf-gcc
  (crosstool-NG esp-2021r2) 8.4.0

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-04-21 22:06:52 +08:00
raiden00pl
7141f487c0 boards/qemu-intel64: align _etbss to fix TLS block size mismatch
Align _etbss in the linker script so (_etbss - _stdata) matches the
compiler's aligned TLS block size.

Fix ostest failure for CONFIG_SCHED_THREAD_LOCAL=y

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl
a9e9607d95 arch/x86_64/intel64: fix signal delivery race in x86_64_sigdeliver
copy logic from arm64 to fix SMP bugs in the signal trampoline
caused signals to be lost or mis-delivered in ostest signest_test
on qemu-intel64/jumbo.

Also update comments so this logic is easier to follow

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl
e79cade0e3 boards/qemu-intel64/nsh: enable assertions and full opt
enable assertions and full opt for qemu-intel64/nsh

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl
78eae568ea boards/qemu-intel64/jumbo: enable assertions and full opt
enable assertions and full opt for qemu-intel64/jumbo

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
raiden00pl
9416b1a606 boards/qemu-intel64/ostest: enable assertions
enable assertions for qemu-intel64/ostest

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 21:57:44 +08:00
Filipe Cavalcanti
c47a984b63 arch/xtensa: remove _info from startup of ESP32
During startup we should avoid using _info since the system is not
fully initialized. Default to use ets_printf which is safe for
this scenario.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-21 09:43:38 +08:00
raiden00pl
6f9d6f3d94 boards/nucleo-c071rb: add nxmodbus examples to jumbo
add nxmodbus client and server examples to jumbo

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl
4c38d9be04 boards/sim: add nxmodbus over RTU demo
add nxmodbus over RTU demo for sim

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl
287051ef09 boards/qemu-intel64: add nxmodbus tools for jumbo config
add nxmodbus tools for qemu-intel64/jumbo config

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
raiden00pl
d1c8c7e480 Documentation: add nxmodbus doc
add nxmodbus doc

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-21 09:39:04 +08:00
yanxingyu17
02407ad192 arch/risc-v/cmake: fix linker option case in Toolchain.cmake.
Fix lowercase -wl to correct -Wl for GCC linker pass-through
option in LTO full configuration. The lowercase form is not
recognized by the linker, causing --print-memory-usage to be
silently ignored.

Signed-off-by: v-yanxingyu <v-yanxingyu@xiaomi.com>
2026-04-20 17:44:39 +02:00
Eren Terzioglu
50fb11492c arch/risc-v/espressif: Fix auto light sleep enable flag
Fix auto light sleep enable flag

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-20 15:08:27 +02:00
Alan Carvalho de Assis
e5efaf9f5d boards: Fix modbus configs after moving it to apps/industry
The modbus was moved to inside apps/industry, so these defconfigs
need to be updated

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-20 08:35:15 +02:00
Alexey Matveev
e9de74d3a9 boards/stm32f103-minimum: Add CAN bring-up, char/socket drivers, and defconfig
Add board support for on-chip bxCAN: stm32_can.c registers /dev/can0 via stm32_caninitialize() when CONFIG_STM32_CAN_CHARDRIVER is set; stm32_cansock.c calls stm32_cansockinitialize() for the socket-CAN path when CONFIG_STM32_CAN_SOCKET is set.

Signed-off-by: Alexey Matveev <tippet@yandex.ru>
2026-04-19 22:56:46 +08:00
aviralgarg05
87bebead38 boards/arm/cxd56xx/spresense: Add ostest, coremark and getprime configs.
Add dedicated Spresense defconfigs for ostest, coremark and\ngetprime so the board has focused test and benchmark entry\npoints for these workloads.\n\nThis keeps the change scoped to new board configurations and\nfollows the existing Spresense baseline settings for the new\ntargets.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-04-19 10:41:47 -03:00
Filipe Cavalcanti
fc003777c5 documentation: update ESP32-C3|C6|H2 flash allocation table
Update the user documentation for flash allocation when using MCUboot.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-19 07:10:31 -03:00
Filipe Cavalcanti
0e5e71cc08 arch/risc-v: update MCUBoot slot size and offsets
Increase image slot size from ~1MB to ~1.4MB to allow more features by default.
Solves issues when enabling debug features would extrapolate the slot size.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-19 07:10:31 -03:00
daniellizewski
1632beaede arch/arm/src/stm32h5/stm32_usbdrdhost.c: Fixed Hub support
Fixed a few bugs in the initial stm32_usbdrdhost.c implementation
when using a USB hub. Fixed fault when freeing control endpoints.
Fixed crash when disconnecting devices from hubs due ot use after free.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-04-19 14:24:40 +08:00
Lup Yuen Lee
3e570aa219 CI: Remove corrupted downloads for build retry
We have implemented CI Build Retry for mitigating Download Failures. But right now it will reuse any Corrupted Downloads (instead of deleting them), which will cause CI Build Retry to fail repeatedly: https://github.com/apache/nuttx/actions/runs/24611381081/job/71966407518#step:10:627

```
Ignored files: system/argtable3/v3.2.0.7402e6e.tar.gz
gzip: stdin: not in gzip format
make[3]: *** [Makefile:76: argtable3] Error 2
```

This PR proposes to change `git clean -fd` to `git clean -xfdq`. This will remove any Corrupted Downloads, preventing their reuse for CI Build Retry:

```bash
## Simulate a corrupted download for argtable3
$ tools/configure.sh qemu-armv8a/netnsh
$ Downloading v3.2.0.7402e6e.tar.gz--argtable3
## Press Ctrl-C to stop the build

## `git clean -fd` won't remove the corrupted download
$ cd ../apps
$ git clean -fd
$ find . -name "v3.2.0.7402e6e.tar.gz"
./system/argtable3/v3.2.0.7402e6e.tar.gz

## `git clean -xfdq` removes the corrupted download
$ git clean -xfdq
$ find . -name "v3.2.0.7402e6e.tar.gz"
## Corrupted download is deleted correctly
```

`git clean -xfdq` is also found in the same testbuild script, so we are using it consistently:

12e8f92a28/tools/testbuild.sh (L286-L291)

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-19 14:21:58 +08:00
Shunchao Hu
eb4df019af net/ipforward: Forbid non-forwardable multicast scopes.
RFC 3171 reserves 224.0.0.0/24 for link-local IPv4 multicast
scope, so packets in this range must not be forwarded by routers,
regardless of the TTL value.

IPv6 also defines multicast scopes that must not be forwarded beyond
the local topology. In particular, interface-local and link-local
multicast destinations must not be routed across interfaces.

Add IPv4/IPv6 scope checks so non-forwardable multicast packets are
rejected before entering the multicast forwarding path.

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-04-18 19:54:59 -03:00
Tiago Medicci Serrano
08a1953193 Documentation: Document esp32p4-function-ev-board:psram_usrheap
This commit adds an entry for the ESP32-P4-Function-EV-Board's
`psram_usrheap` defconfig on docs.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-18 19:17:31 -03:00
Tiago Medicci Serrano
92a0b18ca1 boards/risc-v/esp32p4: Enable PSRAM for ESP32-P4-Function-EV-Board
This commit enables using ESP32-P4's PSRAM on Function-EV-Board.
The in-chip PSRAM memory is added to the user heap and the internal
memory is dedicated to a kernel heap.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-18 19:17:31 -03:00
Tiago Medicci Serrano
d6a55824b3 arch/risc-v/esp32p4: Implements PSRAM support for ESP32-P4
This commit implements the in-package PSRAM support for ESP32-P4.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-18 19:17:31 -03:00
shichunma
73be35c3a8 Documentation/ntpc: document DHCP NTP server support
Document that ntpc can use NTP servers learned from DHCP option 42 when DHCP client support is enabled.

Signed-off-by: Jerry Ma <shichunma@bestechnic.com>
2026-04-18 19:14:20 -03:00
Tomasz 'CeDeROM' CEDRO
865356908d doc: Contributing tools/checkpatch.sh example update.
* Add `./tools/checkpatch.sh -c -u -m -g HEAD~...HEAD` example
  to match checks performed by our CI.
* Add cross-reference to checkpatch.sh documentation.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2026-04-18 19:06:06 -03:00
raiden00pl
a33c555b5e arch/stm32f0l0g0/stm32_serial_v2.c: fix compilation error
fix compilation error for CONFIG_SERIAL_TERMIOS=y

chip/stm32_serial_v2.c:923:35: error: 'struct up_dev_s' has no member named 'rxftcfg'
  923 |   regval |= USART_CR3_RXFTCFG(priv->rxftcfg);

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-17 14:18:51 +02:00
Norihiko Itou
83efa44f0c arch/arm: add STM32H755XI chip
Support STM32H755XI chip.
The STM32H755XI is a chip with a different package than the STM32H755II.

Signed-off-by: Norihiko Itou <itounrh@jae.co.jp>
2026-04-17 13:18:02 +02:00
Tiago Medicci Serrano
27ae597fbc boards: Increase esp32h2-devkit:efuse IDLETHREAD stack to 3072
The idle task is used during initialization and its stack size is
operating near the boundaries of a stack overflow, causing
occasional crashes during board's bringup. This commit increases
the idle task stack size to solve such an issue.

Signed-off-by: Tiago Medicci Serrano <tiago.medicci@espressif.com>
2026-04-17 10:37:47 +02:00
daniellizewski
c205505ca9 arch/arm/src/stm32h5/stm32_serial.c: Fixed compiler warning
Added missing #ifdef to avoid compiler warning when DMA is not used.

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-04-17 12:42:12 +08:00
daniellizewski
532fede38b arch/arm/src/stm32h5: Add support for USB host
Added stm32_usbdrdhost.c which adds USB FS host mode support using the
embedded PHY. Added Kconfig to select Device or Host.

Example config nucleo-h563zi:usbmsc added to test functionality

Signed-off-by: daniellizewski <daniellizewski@geotab.com>
2026-04-17 12:42:12 +08:00
Abhishek Mishra
5c9de46c79 fs/vfs/fs_fstat.c: fix write capability check in proxy_fstat()
In proxy_fstat(), the write permission bits for a block driver proxy
were gated on `i_ops->read` instead of `i_ops->write`:
The effect is that a driver implementing read but not write would have
S_IWOTH | S_IWGRP | S_IWUSR incorrectly set in the fstat() result,
reporting the file as writable when it is not.

Fix: replace `->read` with `->write` in the write check condition.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-04-16 13:35:41 +02:00
Daniel Monteiro
7139b02cd6 boards/raspberrypi-pico-2-rv: fix formatting mistake on docs
Signed-off-by: Daniel Monteiro <monteiroquiet@gmail.com>
2026-04-16 10:40:06 +08:00
simbit18
de87075134 tools/CMakeLists.txt: Add mkpasswd binaries
- Add mkpasswd binaries

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-16 01:45:48 +08:00
simbit18
edd796bb27 CMakeLists.txt: Added QUIET option for Python package search
The QUIET option turns off unnecessary informational messages.

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-16 01:45:48 +08:00
Eren Terzioglu
d8872255e8 Docs/platforms/risc-v: Add DFS docs for esp32[-c3|-c6|-h2|-p4]
Add DFS docs for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-15 18:38:02 +02:00
Eren Terzioglu
54b3edae0a boards/risc-v/espressif: Add DFS board support
Add DFS board support for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-15 18:38:02 +02:00
Eren Terzioglu
56a4a05b34 arch/risc-v/espressif: Add DFS feature
Add DFS feature for riscv based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-15 18:38:02 +02:00
Eren Terzioglu
5cc000ceb0 arch/risc-vespressif: Fix i2c slave irq callback build error
Fix i2c slave irq callback build error for risc-v based Espressif devices

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-15 18:38:02 +02:00
likun17
2e27767b0c drivers/sensors: fix misplaced endif in bmi160_base.c
Move the #endif preprocessor guard to after bmi160_transferspi()
so that both bmi160_configspi() and bmi160_transferspi() are
properly enclosed within the SPI conditional compilation block.

Signed-off-by: likun17 <likun17@xiaomi.com>
2026-04-15 17:47:46 +02:00
zhanxiaoqi
249df8c1d9 video/fb: guarantee fb read-write integrity to prevent display tearing
Serialization has been added to the paths of fb_read/fb_write, as well as
partial reading of plane/video information, updatearea, pandisplay, etc.
This covers the scenario where "one thread draws/switches via the character
device interface while another thread reads the framebuffer via the
character device interface", ensuring that the read framebuffer data
is complete and preventing screen tearing.

Signed-off-by: zhanxiaoqi <zhanxiaoqi@bytedance.com>
2026-04-15 10:18:16 -03:00
Eren Terzioglu
3acfea8efc arch/risc-v/espressif: Fix Kconfig option for TWAI
Fix Kconfig option for about on risc-v based Espressif chips

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2026-04-15 14:29:17 +02:00
Lup Yuen Lee
12e8f92a28 CI: Retry build upon failure
In Jan-Feb 2026: NuttX CI hit a [record high usage of GitHub Runners](https://github.com/apache/nuttx/issues/17914), exceeding the limit enforced by ASF Infrastructure Team. We analysed the PRs and discovered that most GitHub Runners were wasted on __(1) Failure to Download the Build Dependencies__ for DTC Device Tree, OpenAMP Messaging, MicroADB Debugger, MCUBoot Bootloader, NimBLE Bluetooth, etc __(2) Resubmitting PR Commits__:

- [Video: Analysing the Most Expensive PR](https://youtu.be/swFaxaTCEQg)
- [Video: Second Most Expensive PR](https://youtu.be/uSpQkzBogEw)
- [Video: Third Most Expensive PR](https://youtu.be/J7w1gyjwZ1w)
- [Video: Most Expensive Apps PR](https://youtu.be/182h8cRpfvI)
- [Spreadsheet: Most Expensive PRs](https://docs.google.com/spreadsheets/d/1HY7fIZzd_fs3QPyA0TX7vsYOjL86m1fNOf1Wls93luI/edit?gid=70515654#gid=70515654)

Why would __Download Failures__ waste GitHub Runners? That's because Download Failures will terminate the Entire CI Build (across All CI Jobs), requiring a restart of the CI Build. And the CI Build isn't terminated immediately upon failure: NuttX CI waits for the CI Job to complete (e.g. arm-01), before terminating the CI Build. Which means that CI Builds can get terminated 2.5 hours into the CI Build, wasting 2.5 elapsed hours x [7.4 parallel processes](https://lupyuen.org/articles/ci3#live-metric-for-full-time-runners) of GitHub Runners.

This PR proposes to __Retry the Build for Each CI Target__. NuttX CI shall rebuild each CI Target (e.g. `sim:nsh`), upon failure, up to 3 times (total 4 builds). Each rebuild will be attempted after a Randomised Delay with Exponential
Backoff, initially set to 60 seconds, then 120 seconds, 240 seconds. The rebuilds will mitigate the effects of Intermittent Download Failures that occur in GitHub Actions. (And eliminate developer frustration)

If the build fails after 3 retries: Subsequent CI Targets will __not be allowed to rebuild__ upon failure. This is to prevent cascading build failures from overloading GitHub Actions, and consuming too many GitHub Runners.

Note that NuttX CI shall retry the build for __Any Kind of Build Failure__, including Download Failures, Compile Errors and Config Errors. We designed it simplistically due to our current constraints: (1) Lack of CI Expertise (2) NuttX CI is Mission Critical (3) Legacy CI Scripts are Highly Complex. To prevent Compile Errors and Config Errors: We expect NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before submitting to NuttX.

What about __Resubmitting PR Commits__ and its wastage of GitHub Runners? We also require NuttX Devs to [Build and Test PRs in Our Own Repos](https://github.com/apache/nuttx/issues/18568), before resubmitting to NuttX. GitHub Runners will then be charged to the developer's quota, without affecting the GitHub Runners quota for Apache NuttX Project. We plan to [Kill All CI Jobs](https://youtu.be/182h8cRpfvI?si=MmAuwLISZPPMoqDq&t=1479) for PRs that have been switched to Draft Mode. We'll monitor this through the [NuttX Build Monitor](https://github.com/apache/nuttx/issues/18659).

Modified Files:

`tools/testbuild.sh`: We introduce a New Wrapper Function `retrytest` that will call the Existing Function `dotest`, to build the CI Target and retry on error.

`Documentation/components/tools/testbuild.rst`: Updated the `testbuild.sh` doc with the Retry Logic.

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-15 12:30:17 +02:00
simbit18
9fd11a01d5 tools/Unix.mk: fix Untracked files defconfig.tmp-e on macOS
fix

On branch fix_sim_mac
Your branch is up to date with 'origin/fix_sim_mac'.

Untracked files:
	defconfig.tmp-e

nothing added to commit but untracked files present

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-15 17:10:22 +08:00
Filipe Cavalcanti
3f16c4a06e arch/risc-v: custom compilation options on some cache sources
This change sets three new compilation flags for avoiding cache miss
when using optimized builds and cache is manipulated.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-14 17:44:07 -03:00
Filipe Cavalcanti
723051d322 arch/risc-v/espressif: fix CMake linking of mbedtls on Wi-Fi support
Fix improper linking against 'arch' when it should link against 'nuttx' target.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-14 17:44:07 -03:00