Commit graph

8901 commits

Author SHA1 Message Date
Shoji Tokunaga
bb7c83b01c apps:cmake: Add APPLE to a build target for sim's configuration using CMake.
* Add Rust target conversion support for `aarch64` on acOS/Linux (and Linux `arm`).
* When a Rust target is unsupported and results in an empty configuration, trigger a CMake `FATAL_ERROR`.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-18 12:22:48 +08:00
Shoji Tokunaga
c10ce6aa4f apps/cmake: Make hello_rust_cargo buildable with cmake
* Resolve APPDIR.
* Remove "debug" from RUST_PROFILE_FLAG.
* Add JSON specification compatibility flag.
* Correct the directory structure for RUST_LIB_PATH.

Signed-off-by: Shoji Tokunaga <toku@mac.com>
2026-05-14 07:16:15 -04:00
xiaoxiang781216
21b28a4126 testing/ltp: silence -Wshift-count-overflow on -Werror builds
The LTP open_posix_testsuite header timespec.h has, since 2019:

  #define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)

When time_t is 64 bits (the default after sched/remove-system-time64),
the shift reaches the sign bit of the underlying type and toolchains
emit -Wshift-count-overflow, which the LTP build promotes to a hard
error via -Werror.  This breaks rv-virt/citest and rv-virt/citest64
on CI.

The diagnostic is benign here (TIME_T_MAX itself is correct) and the
defect is in upstream LTP, so disable the warning alongside the other
'should be removed in the future' relaxations until upstream is fixed.

Signed-off-by: xiaoxiang781216 <xiaoxiang781216@gmail.com>
2026-05-14 09:42:44 +02:00
zhanghongyu
5d15d97418 netlib: replace DNS ping with gateway ping for connectivity check
Refactor netlib_check_ipconnectivity() to use gateway/router ping instead
of DNS server ping for network connectivity checks. Add IPv6 support.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-05-14 11:58:15 +08:00
zhanghongyu
97485342aa netlib_ipv6route.c: fix the issue of parsing IPv6 routing entries
Update the column ruler and field labels in route_ipv6_entry comment
to match the actual output: lowercase to uppercase, remove colons.
Consistent with Nuttx definition

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-05-14 11:58:15 +08:00
raiden00pl
275a083464 ci: retry git clone for nuttx-ntfc-testing
github infra is not stable so even "git clone" from github repos can fail with error: 500.
With this commit we try to clone repo few more times.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-12 11:31:11 -04:00
Xiang Xiao
a6477ec8dc !apps: replace sclock_t with clock_t and drop redundant time_t/off_t casts
Align with the upstream nuttx change that drops the sclock_t alias now
that clock_t is itself a signed 64-bit type (int64_t).  Beyond the pure
sclock_t -> clock_t rename, this commit also removes the
now-unnecessary (time_t)-1 / (time_t)0 / (off_t)-1 casts that were
papering over the previously-unsigned time_t.

Files touched:

  - examples/alarm/alarm_main.c:        sclock_t -> clock_t
  - netutils/dhcpd/dhcpd.c:             sclock_t -> clock_t
  - netutils/ftpd/ftpd.c:               sclock_t -> clock_t
  - netutils/thttpd/libhttpd.c,
    netutils/thttpd/tdate_parse.c:      drop (time_t)-1 / (time_t)0 /
                                        (off_t)-1 sentinel casts
  - system/resmonitor/filldisk.c,
    system/zmodem/zm_receive.c:         sclock_t -> clock_t
  - testing/ostest/wdog.c:              sclock_t -> clock_t (the bulk
                                        of the rename, 30 sites)
  - testing/testsuites/kernel/syscall/cases/{clock_nanosleep_test,
    fsync_test,time_test}.c:            drop (time_t)-1 casts in the
                                        new signed-time_t world

No behavioural change.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-11 17:38:32 +08:00
Xiang Xiao
72837c8d26 !apps: drop CONFIG_SYSTEM_TIME64 conditionals
NuttX always uses a 64-bit system clock now (time_t/clock_t are
always 64-bit). Remove the obsolete CONFIG_SYSTEM_TIME64 #ifdef
branches and Kconfig dependency.

  - examples/dronecan: drop SYSTEM_TIME64 dependency
  - examples/netlink_route: always use PRIx64
  - netutils/netinit: always use the 1-hour LONG_TIME_SEC
  - netutils/ptpd: always pack the 48-bit seconds field and apply
    the 64-bit overflow guard in timespec_delta_ns()
  - testing/ostest/semtimed: always validate tv_sec >= 0

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-11 17:38:32 +08:00
Xiang Xiao
ed746548ca !testing/libc/scanftest: drop CONFIG_LIBC_LONG_LONG from help text
CONFIG_LIBC_LONG_LONG has been removed; long long support is now
unconditional.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-11 17:38:32 +08:00
Xiang Xiao
3adb14f12d !compiler: drop CONFIG_HAVE_LONG_LONG and require long long support
The matching nuttx commit removes CONFIG_HAVE_LONG_LONG; clean up the
remaining users in nuttx-apps so that "long long" is always assumed:

  - examples/noteprintf, examples/nxscope:
        unconditionally exercise the %lld / long long branch.
  - fsutils/mkfatfs/configfat.c:
        drop the 32-bit fall-back paths in mkfatfs_nfatsect12/16/32;
        always use uint64_t for the FAT-size arithmetic.
  - logging/nxscope/nxscope_chan.c:
        drop the CONFIG_HAVE_LONG_LONG guard around the 64-bit
        sample helpers.
  - netutils/ftpd, netutils/ntpclient:
        always emit the 64-bit format strings.
  - testing/fs/fstest/fstest_main.c:
        drop the parallel 32-bit verification path; keep only the
        64-bit (long long) random pattern generator.
  - system/zmodem/host/nuttx/compiler.h:
        remove the host-side CONFIG_HAVE_LONG_LONG stub macro.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-05-11 17:38:32 +08:00
raiden00pl
783957da07 system/uorb: DEBUG_UORB depends on float data
DEBUG_UORB depends on float data, FIXED16 not supported

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-06 08:54:32 +02:00
raiden00pl
b3cf222836 system/sensorscope: support for fixe16 data
system/sensorscope: support for fixe16 data

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-06 08:54:32 +02:00
Matteo Golin
dca76ccb78 codespell: Ignore lines without typos
Ignore some new lines with incorrect spelling error detection.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-06 13:27:05 +08:00
Matteo Golin
5b0cae9ab0 !apps: Simplify NuttX initialization
BREAKING: In an effort to simplify board initialization logic for NuttX,
NSH will no longer support architecture initialization. This will happen
during boot via the BOARD_LATE_INITIALIZE option. The boardctl command
BOARDIOC_INIT is also no longer available from user-space.

Quick fix:
Any application relying on BOARDIOC_INIT should now enable
BOARD_LATE_INITIALIZE to have initialization performed by the kernel in
advance of the application running. If control over initialization is
still necessary, BOARDIOC_FINALINIT should be implemented and used.
Boards relying on NSH for initialization should also enable
BOARD_LATE_INITIALIZE instead.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-05-06 13:27:05 +08:00
raiden00pl
a9881037ea nimble: remove -Wno-pointer-to-int-cast from CFLAGS
it's not needed and cause warnings for C++ builds:

cc1plus: warning: command-line option '-Wno-pointer-to-int-cast' is valid for C/ObjC but not for C++
Signed-off-by: raiden00pl <raiden00@railab.me>
2026-05-05 13:29:11 -04:00
Serg Podtynnyi
ded0a17514 graphics/lvgl: bump version to 9.2.2
Update lvlg version to 9.2.2, includes fix for nuttx lcd release
Get version from config in Makefile
Get version from config in cmake file

Signed-off-by: Serg Podtynnyi <serg@podtynnyi.com>
2026-05-03 17:39:10 +02:00
shichunma
0105a9b238 netutils/ntpclient: guard DHCP-only helpers
fix a warning that static function defined by not used

Signed-off-by: Jerry Ma <masc2008@gmail.com>
2026-04-30 13:29:42 +02:00
shichunma
c82957109f netutils: prefer DHCP-provided NTP servers for ntpc
Use the DHCP-learned NTP server list as the default ntpc server source when DHCP option 42 is available.

Fall back to CONFIG_NETUTILS_NTPCLIENT_SERVER only when DHCP does not provide any NTP servers, and restart ntpc when the DHCP-provided server list changes.

Signed-off-by: Jerry Ma <masc2008@gmail.com>
2026-04-24 10:44:08 -03:00
shichunma
4b705721ca netutils/dhcpc: parse DHCP NTP server option
Request DHCP option 42 and store the returned IPv4 NTP server
addresses in struct dhcpc_state for later consumers.

Signed-off-by: Jerry Ma <masc2008@gmail.com>
2026-04-24 10:44:08 -03:00
wangjianyu3
62f3d37041 examples/vncviewer: add VNC viewer for LCD display
Add a minimal VNC viewer application that connects to a VNC server
and renders the remote desktop on a local LCD.

Features:
- RFB 3.8 protocol with VNC Authentication (DES, pure software)
- Raw encoding with pixel format auto-detected from LCD driver
- Row-by-row rendering via LCDDEVIO_PUTAREA (minimal RAM usage)
- LCD resolution and format queried at runtime via LCDDEVIO_GETVIDEOINFO
- Auto-reconnect on connection loss with 2-second retry

Usage:
  vncviewer <host> [port]
  vncviewer -p <password> <host> [port]
  vncviewer -p <password> -d <lcd_devno> <host> [port]

Assisted-by: GitHubCopilot:claude-4.6-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-24 14:58:49 +02:00
Tiago Medicci
6379e531de system/irtest: Set irtest command line size to CONFIG_LINE_MAX
Let `irtest` command line size be equal to CONFIG_LINE_MAX so that
bigger (or smaller) commands can be set.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-04-24 14:58:05 +02:00
Tiago Medicci
9b6b7607f2 system/irtest: Avoids silently truncating long write_data commands
Long write_data commands can be truncated without any check due to
the maximum size of CONFIG_SYSTEM_IRTEST_MAX_SIRDATA. This commit
adds a check to avoid a silent fail.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-04-24 14:58:05 +02:00
Tiago Medicci
6cb1a04fe7 system/irtest: Fix issues regarding portability and buffer size
This commit fixes issues regarding portability by using variables
with fixed width (and their format macro constants).

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-04-24 14:58:05 +02:00
Tiago Medicci
901278a4ba examples: Remove deprecated rmtchar example application
The upper-half RMT driver is no longer available on NuttX. Instead,
Espressif's RMT peripheral was bound directly to the lirc driver.
For testing purposes, use the `irtest` application. NuttX OS PR
https://github.com/apache/nuttx/pull/18654 removed the upper-half
driver interface used by this application, so removing it does not
break any existing feature on NuttX.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-04-24 14:58:05 +02:00
raiden00pl
eccfba4776 .github: use ntfc test cases from Apache repo
use ntfc test cases from Apache repo

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-24 19:55:57 +08:00
raiden00pl
180607372a .github/build.yml: improve ntfc installation
increase retries and timeout for pip install and try again in case of failure

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-24 19:55:57 +08:00
raiden00pl
773f69d5d9 modbus: add nxmodbus
NxModbus is a lightweight Modbus protocol stack implementation for NuttX RTOS.

This commit adds:
- nxmodbus stack
- nxmbserver - Modbus Server (Slave) example
- nxmbclient - Modbus Client (Master) tool

Supported Modbus transports:
- ASCII
- RTU over serial port
- TCP
- RAW (ADU) for custom transport implementations

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-20 12:45:17 -03:00
Alan Carvalho de Assis
2016c0b6ae apps/modbus: Move modbus to inside industry/
Modbus is a protocol mostly used on industries and since it is a
protocol it is not a category to be at root of apps/

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-20 08:42:37 +02:00
Alan Carvalho de Assis
2ee08209a0 apps/modbus: Move modbus to inside industry/
Modbus is a protocol mostly used on industries and since it is a
protocol it is not a category to be at root of apps/

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-04-20 08:42:37 +02:00
Michal Lenc
8e9f5a8d3a nshlib/nsh_timcmds.c: fix incorrect time set during summer time
Value zero in tm_isdst means daylight saving time (or summer
time) is not in effect. This is obviously not true for half of the year
in most timezones and keeping it at zero leads to incorrect time
being set. This commit sets tm_isdst to -1, which means the information
is not available and it should be handled according to timezone rules.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-17 11:11:53 -03:00
raiden00pl
722f3193ce modbus: move freemodbus to a separate directory
move freemodbus to modbus/freemodbus so it is possible to add other
modbus implementations

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-14 09:09:42 +02:00
dependabot[bot]
f22a8d0d4f build(deps): bump actions/upload-artifact from 7.0.0 to 7.0.1
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 7.0.0 to 7.0.1.
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](https://github.com/actions/upload-artifact/compare/v7...v7.0.1)

---
updated-dependencies:
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 11:01:10 +08:00
dependabot[bot]
a6c11a1db7 build(deps): bump actions/github-script from 8.0.0 to 9.0.0
Bumps [actions/github-script](https://github.com/actions/github-script) from 8.0.0 to 9.0.0.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v8...v9)

---
updated-dependencies:
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-14 11:00:57 +08:00
Michal Lenc
7dc8cec1ac examples/hello_nim/Kconfig: name consistent with other Hello World apps
Use "Hello, language" scheme to keep the naming consistency with other
Hello World applications for different languages.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-13 00:28:32 +08:00
Piyush Patle
96a003072d include/debug.h: fix checkpatch fallout in touched apps files
Clean up style issues in the files touched by the <nuttx/debug.h> include
migration so the full apps-side PR passes checkpatch.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-11 10:39:27 -03:00
Piyush Patle
9d849adfab include/debug.h: Use <nuttx/debug.h> in apps
Replace app-side includes of <debug.h> with <nuttx/debug.h> to use the
header from the NuttX tree explicitly after the header move.

Signed-off-by: Piyush Patle <piyushpatle228@gmail.com>
2026-04-11 10:39:27 -03:00
Filipe Cavalcanti
3591378113 crypto/mbedtls: expose include paths as public
Expose include paths as public when using CMake.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-10 12:23:37 -03:00
Filipe Cavalcanti
bfbeafabbf netutils/mqttc: fix patch and add mbedtls dependency
Add mbedtls dependecy and fix patch path.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2026-04-10 12:23:37 -03:00
wangjianyu3
f95b53d15b examples/camera: add -m option for horizontal mirror preview
Add -m command line option to enable horizontal mirror on the
camera sensor via VIDIOC_S_CTRL + V4L2_CID_HFLIP.  This uses
the sensor hardware mirror (e.g. GC0308 register 0x14 bit[0])
with zero CPU overhead.

Also refactor parse_arguments to use a loop-based parser so
options can appear in any order.

Usage: camera 0 -m    (mirror preview)
       camera -jpg -m (mirror still capture)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-09 10:34:06 -03:00
wangjianyu3
21dd3082c1 examples/camera: handle RGB565X (BE) format from 8-bit DVP camera
Some image sensors on 8-bit DVP buses (e.g. GC0308) produce RGB565X
(big-endian) pixel data — the high byte is clocked out first and
stored first in PSRAM by the ESP32-S3 CAM controller.

The V4L2 framework does not negotiate formats automatically, so try
RGB565 first and fall back to RGB565X if S_FMT fails.

When the sensor reports RGB565X:
 - Invalidate D-Cache after DQBUF so the CPU reads fresh DMA data
 - Byte-swap each pixel in place from BE to LE RGB565 for display

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-09 10:34:06 -03:00
wangjianyu3
52b36deb13 examples/camera: use MMAP with USERPTR fallback and fix NX stride
Use MMAP buffer allocation by default so the driver can manage
DMA-capable memory with proper alignment and cache attributes.
Fall back to USERPTR if the driver does not support MMAP.

Also fix NX framebuffer stride calculation to use the actual
display width instead of hardcoded values.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-04-09 10:34:06 -03:00
liuhongchao
a6286ee0ea graphics/input: Add getevent input event monitor tool.
Add getevent utility for monitoring input events including
mouse clicks/movement, multi-touch coordinates/pressure,
and keyboard key presses. Supports automatic device detection
in /dev and command-line device path specification with
non-blocking I/O.

Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-09 11:59:19 +02:00
Lup Yuen Lee
9db3e26c85 graphics/libyuv: Download libyuv from NuttX Mirror Repo
NuttX Build Target `sim:nxcamera` failed to build because chromium.googlesource.com is blocking our download of libyuv library: https://github.com/apache/nuttx/actions/runs/24106742084/job/70356374433#step:10:603

```
Configuration/Tool: sim/nxcamera
Building NuttX...
curl -L https://chromium.googlesource.com/libyuv/libyuv/+archive/refs/heads/stable.tar.gz -o libyuv.tar.gz
gzip: stdin: not in gzip format
```

This PR updates the libyuv Makefile to download libyuv from the NuttX Mirror Repo instead: https://github.com/NuttX/nuttx/releases/tag/libyuv

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2026-04-08 18:40:26 +08:00
Shunchao Hu
231ac397a7 canutils/lely-canopen: avoid patch reapply on repeated builds.
The patch step currently uses a phony target, so it is executed
again when the build is repeated in the same source tree. In that
case `patch -N` detects previously applied patches and returns 1,
which make treats as a failure.

Replace the phony patch target with a stamped `.patched` file so
the patch step is not re-run unnecessarily.

Fixes #3188

Signed-off-by: Shunchao Hu <ankohuu@gmail.com>
2026-04-03 11:18:21 +02:00
raiden00pl
5c867b21e6 examples/nxscope: control stream interval from CLI
add the ability to control the stream interval from the CLI
which is useful for performance testing

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-04-02 10:02:16 -03:00
simbit18
b8718d8c52 build.yml: Fix No files were found with the provided path
Fix

Warning: No files were found with the provided path: buildartifacts/.

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-04-02 06:41:51 +08:00
wangjianyu3
073df9d1de examples/uvc_cam: add UVC camera streaming app
Usage: uvc_cam [nframes] [video_dev] [uvc_dev]

V4L2 capture -> write UVC gadget device.
Uses boardctl to initialize/deinitialize UVC gadget.
Queries sensor pixel format, resolution and frame rate via V4L2.
Uses poll() to wait for USB host streaming state.
Supports optional device path arguments (default /dev/video0, /dev/uvc0).
Supports configurable frame count (0=infinite).

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-03-30 14:52:06 +08:00
Tiago Medicci
dc4ecc973e ci: split xtensa jobs into three separate jobs (instead of two)
This is necessary because new defconfig were recently added to
Xtensa-based Espressif SoCs and the build job may exceed 2 hours.
In order to avoid increasing job timeout, a specific job for each
supported SoC (ESP32, ESP32-S2 and ESP32-S3) was created instead.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-03-28 09:40:28 +08:00
Vlad Pruteanu
cd2b0c0e87 testing/crypto: Add pbkdf2 test app
This adds support for testing PBKDF2 implementation. Test
vectors for SHA1 are taken from RFC6070. SHA256 vectors
were extrapolated using an online PBKDF2 generator which
was checked against RFC6070.

Signed-off-by: Vlad Pruteanu <pruteanuvlad1611@yahoo.com>
2026-03-27 21:46:08 +08:00
raiden00pl
e564816e1d .github: install NTFC from PIP
install NTFC package from PIP

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-03-27 20:37:09 +08:00