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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Fix mismatch on apps directory naming when it is cloned under 'nuttx-apps' instead of 'apps'.
Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
When a command has no arguments (e.g., 'q', 'quit', 'stop'), the strtok_r()
function returns NULL for the arg parameter. The argument trimming loop was
dereferencing this NULL pointer without checking, causing undefined behavior
and system hang on ESP32-S3.
This commit adds a null check before dereferencing the arg pointer in the
leading space trimming loop.
Tested on ESP32-S3 (lckfb-szpi-esp32s3) - quit command now works correctly.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
SOCK_CLOEXEC and SOCK_NONBLOCK were incorrectly passed as the
third argument (protocol) instead of being OR'd into the second
argument (type). This caused socket() to fail with EPROTONOSUPPORT
(errno 93) on NuttX.
Move SOCK_CLOEXEC | SOCK_NONBLOCK to the type parameter and set
protocol to 0.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
fix compilation error:
sensorscope_main.c:314:3: error: implicit declaration of function 'list_initialize'; did you mean 'fs_initialize'? [-Wimplicit-function-declaration]
Signed-off-by: raiden00pl <raiden00@railab.me>