Commit graph

9065 commits

Author SHA1 Message Date
Old-Ding
3dc9bd4598 README: Fix application directory wording.
Fix two wording issues in the apps README.

Signed-off-by: Old-Ding <ai.neo.ae86@gmail.com>
2026-07-09 09:26:16 +08:00
hanzhijian
81accb0832 apps: fix distclean for partial builds and residual .kconfig files
The current distclean implementation has two issues:

1. Application.mk does not remove .kconfig on distclean, so stale
   config fragments from earlier builds can pollute subsequent ones.

2. Several external-library Makefiles (lame, libshvc, libulut) run
   "make -C <subdir> distclean" without checking whether the
   subdirectory exists.  When the library was never downloaded (common
   in CI partial-build environments), distclean fails with "No such
   file or directory".

Fix:

- Application.mk: add $(call DELFILE, .kconfig) to the distclean
  target so that .kconfig is cleaned along with .built, .depend, etc.

- audioutils/lame/Makefile: guard the distclean recipe with
  "if [ -d $(DST_PATH) ]; then ...; fi" and use $(MAKE) instead
  of bare make.

- netutils/libshvc/Makefile, netutils/libulut/Makefile: same
  directory-existence guard for their distclean recipes.

- crypto/wolfssl/Makefile: change "distclean:" to "distclean::"
  (double-colon) so it does not override the distclean:: rule
  inherited from Application.mk.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-07-09 09:25:33 +08:00
raiden00pl
cb7097a4e7 interial: fix SPDX License Identifier
licence is Apache-2.0, not BSD

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-09 02:08:43 +02:00
raiden00pl
dd109a88de inertial/madgwick: add CMake build support
add CMake build support for madgwick and update inertial/madgwick/.gitignore

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-09 02:08:43 +02:00
Matteo Golin
26c5dd8305 games/NXDoom: Use dirent for glob implementation
NuttX has dirent, so the glob implementation can be used. This removes
the warning for no native glob implementation.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-07-09 01:51:54 +02:00
Matteo Golin
3f04a28cbd games/NXDoom: Add LIBC_LOCALE dependency
The locale functions of libc are necessary for some parts of NXDoom.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-07-09 01:51:54 +02:00
Jorge Guzman
dd24407c71 examples/lvglterm: add USB HID keyboard input with cursor scrolling
Rework the terminal input selection into an explicit three-way Kconfig
choice so the format each keyboard delivers is picked up front:

  - On-screen keyboard (touch) - default, unchanged behaviour.
  - Matrix / upper-half keyboard - reads struct keyboard_event_s events
    (for example the M5Stack Cardputer matrix on /dev/kbd0).
  - USB HID keyboard - reads a byte stream (for example /dev/kbda with
    CONFIG_USBHOST_HIDKBD).

The physical-keyboard variant now polls the device non-blocking from the
LVGL thread (no dedicated task), mirroring the touch variant.  The USB
path decodes the stream with the keyboard codec, so with a driver built
for CONFIG_HIDKBD_ENCODED the Up/Down cursor keys scroll the terminal;
a plain-ASCII stream still works as ordinary key presses.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-07-07 09:52:42 +08:00
dependabot[bot]
5971d9c19f build(deps): bump docker/login-action from 4.2.0 to 4.4.0
Bumps [docker/login-action](https://github.com/docker/login-action) from 4.2.0 to 4.4.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](650006c6eb...af1e73f918)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: 4.4.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-07 09:48:55 +08:00
Old-Ding
64f9e8a4b7 system: nxinit: bound debug argv dump
Check the service argv array bound before reading the current entry in the debug dump loop. A full argument array may not have an in-array NULL terminator, so the old condition could read one entry past the array while CONFIG_SYSTEM_NXINIT_DEBUG is enabled.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-07 09:47:23 +08:00
raiden00pl
c785d40af7 examples: add Lely CANopen slave example
add Lely CANopen slave example

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-06 11:02:13 -03:00
raiden00pl
962d90bb6e examples: add Lely CANopen master example
add Lely CANopen master example

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-06 11:02:13 -03:00
Alan Carvalho de Assis
caa7d7faa5 apps/nsh: Don't disable error by default
NSH error shouldn't be disabled by default, even when in SMALL
Memory because it will make difficult to discover why things are
not working. It should be disabled manually by experienced dev.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-07-06 09:13:02 -03:00
raiden00pl
c706dd87a7 canutils/lely: fix unreliable download/unpack/patch logic
Rebuild from a clean tree in one recipe so a stale state no longer breaks the build.

This commit also simplify some build logic.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-06 20:04:57 +08:00
Old-Ding
e94e89113a examples: gps: bound NMEA line reads
The GPS example appends serial input to a fixed-size NMEA line buffer until CR or LF without checking the buffer limit. A malformed or overlong input line can write past the end of line[], and the code also uses ch even when read() does not return a byte.

Read bytes only after a successful read(), stop storing at MINMEA_MAX_LENGTH - 1, drain overlong lines until the line ending, and skip parsing truncated sentences.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-06 16:31:53 +08:00
Old-Ding
f1d53c875d tools: format bitmap converter
Run the bitmap converter through the Python formatter required by checkpatch so the Python 3 print syntax fix passes the project style checks.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-06 16:31:47 +08:00
Old-Ding
c0228d7b57 tools: Fix bitmap converter print syntax
Use Python 3 print function syntax so bitmap_converter.py can be parsed by current Python interpreters while preserving the existing usage message and exit path.

Generated-by: OpenAI Codex
Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-06 16:31:47 +08:00
Old-Ding
6eead56aa9 system: resmonitor: check CPU load reads
Keep the default zero CPU value when the procfs load file cannot be read, and trim only the newline that was actually present. This avoids parsing uninitialized stack data in fillcpu and avoids writing before the showinfo CPU buffer when fgets returns no data.

Signed-off-by: Old-Ding <35417409+Old-Ding@users.noreply.github.com>
2026-07-06 16:31:38 +08:00
Abhishek Mishra
da3234f936 !fsutils/passwd: remove insecure default TEA encryption keys
Use 0 as a Kconfig placeholder. The nuttx build rejects unset keys
and can generate random values when configured.

BREAKING CHANGE: CONFIG_FSUTILS_PASSWD_KEY1..4 no longer default to
0x12345678 / 0x9abcdef0. Configs that relied on those defaults must
set keys manually or enable BOARD_ETC_ROMFS_PASSWD_RANDOMIZE_KEYS in
nuttx. Fix: set keys in menuconfig or enable random key generation.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-07-06 16:30:13 +08:00
raiden00pl
afe2a0eafc canutils/lely: add dependencies for Kconfig options
some options depends on others and not selecting them can cause compilation errors.

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-07-06 08:24:00 +02:00
Felipe Moura
4d5f60005c netutils/dropbear: add scp support via SSH exec requests
Code Clean up - Remove unnecessary code.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-07-05 15:06:17 +08:00
Felipe Moura
ec134a99a8 netutils/dropbear: add scp support via SSH exec requests
Add SCP support do the dropbear server.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-07-05 15:06:17 +08:00
Tiago Medicci
8e00b4d672 interpreters/python: Disable no-maybe-uninitialized warning
This commit disables the `no-maybe-uninitialized` warning because
it's wrongly evaluated after increasing the optimization level of
the Python's library.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2026-07-03 09:19:04 -03:00
Jorge Guzman
59d3a0d0ae examples/lvglterm: support physical keyboard input
Refactor the LVGL terminal into a shared core (lvglterm.c) plus two
selectable input variants: the existing on-screen touch keyboard
(lvglterm_touch.c) and a new physical keyboard variant (lvglterm_kbd.c) that
reads key events from a /dev/kbdN device and streams them to the shell.

The input source is chosen with a Kconfig choice (touch by default, keeping
the previous behaviour).  The keyboard variant reads its device from
CONFIG_EXAMPLES_LVGLTERM_KBD_DEV (default /dev/kbd0), overridable by the first
command-line argument, and scrolls the output with the Fn cursor keys.  A font
choice (UNSCII 8 or 16) is added for low-resolution displays.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2026-07-03 09:16:58 -03:00
Matteo Golin
c91abf2c8d games/NXDoom: Fix build warnings
This commit resolves all of the build warnings that were preventing
NXDoom from compiling in CI runs.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-07-02 09:08:46 -03:00
Frederick Blais
e61f46536e interpreters/berry: Fix Wshadow build errors
The pinned Berry source emits -Wshadow diagnostics in a couple of files. NuttX CI passes -Werror, so sim:berry fails when those third-party warnings are promoted to errors.\n\nAdd -Wno-shadow to Berry-specific compiler flags in both Make and CMake paths, keeping the local source patch limited to the NuttX port changes.

Signed-off-by: Frederick Blais <fred_blais5@hotmail.com>
2026-07-02 09:07:50 -03:00
dependabot[bot]
e3f7126a8f build(deps): bump actions/cache from 5 to 6
Bumps [actions/cache](https://github.com/actions/cache) from 5 to 6.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-30 20:45:56 +02:00
Matteo Golin
53bc21feb8 apps/games/NXDoom: Style ignores
Ignore some style/spelling errors in the DOOM port that cannot be fixed.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-06-30 15:22:55 -03:00
Matteo Golin
073188b50d games/NXDoom: Initial port of Chocolate DOOM to NuttX.
This commit includes a (highly) modified version of Chocolate DOOM which
can run on NuttX. The majority of the modifications were made to pass
the NuttX style check. Some small modifications have been added to
support keyboard input, render graphics to frame buffers and directly
use the POSIX interfaces NuttX supplies, stripping out Windows/Mac stuff
and any references to SDL.

NOTE: Sound is currently not supported in any capacity, nor is the
networking stuff. A lot of Chocolate DOOM code was stripped out since it
was unused. If there is a need/desire to add it back later, the original
Chocolate DOOM source can be used as a reference.

WARNING: The NuttX keyboard codec is incredibly non-standard and so
there are problems translating from X11 keys to NuttX ones to play DOOM.
Right now, the CTRL key for firing doesn't work because the NuttX codec
has no concept of it. The NuttX codec should be modified (and other
input devices supported), but at the time of this port I am not
sufficiently comfortable doing so since I am afraid of breaking other
things in the kernel.

NOTE: This port (and likely the original DOOM) seems to be written with
32-bit computers in mind. As such, most things are given the type of
natural `int`, even when a single byte might do. There are significant
size optimizations that could be made to make this more suited to
embedded devices that NuttX typically runs on.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-06-30 15:22:55 -03:00
Matteo Golin
53ca441b32 apps/games/NXDoom: Original Chocolate DOOM source
This commit adds the original Chocolate DOOM source which forms a basis
for the NuttX port of DOOM.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-06-30 15:22:55 -03:00
Xiang Xiao
5ead824fff apps: Fix O_ACCMODE bitmask checks after Linux flag alignment
After aligning NuttX open() flag constants with Linux (O_RDONLY=0,
O_WRONLY=1, O_RDWR=2), code that used '(flags & O_RDONLY)' or
'(flags & O_WRONLY)' as a bitmask check is broken because O_RDONLY
is now 0.  Fix by using '(flags & O_ACCMODE)' comparisons instead.

  - usrsocktest: replace 'flags & O_RDWR' with 'flags & O_ACCMODE'
    in fcntl F_GETFL assertions
  - dd: verify mode used '(oflags & O_RDONLY)' to detect verify;
    replace with '(oflags & O_ACCMODE) == O_RDWR'
  - dpopen: replace '(oflag & O_RDWR) == O_RDWR' with
    '(oflag & O_ACCMODE) == O_RDWR'
  - usbmsc: replace 'flags & O_WRONLY' with
    '(flags & O_ACCMODE) == O_RDONLY'
  - fcntl_test: replace '(flags & O_WRONLY) == 0' with
    '(flags & O_ACCMODE) == O_RDONLY'

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-30 12:19:58 -04:00
Frederick Blais
fc25af7cd7 interpreters/berry: Patch CRLF upstream source directly
Berry's downloaded default/berry.c uses CRLF line endings, while the local NuttX patch was LF. Fresh Linux and CMake builds failed when patch saw the line-ending mismatch.

Regenerate the local Berry patch against the pinned upstream CRLF source and apply it directly in both Make and CMake fetch paths. This keeps the integration working until the Berry-side change is merged upstream and the pinned commit can be updated.

Signed-off-by: Frederick Blais <fred_blais5@hotmail.com>
2026-06-30 23:55:57 +08:00
hanzhijian
9b51035300 nshlib/nsh_fscmds: Fix potential NULL pointer dereferences
Fix two potential NULL pointer dereferences in nsh_fscmds.c:

1. fdinfo_callback: asprintf() failure left filepath potentially
   NULL, which was then passed to nsh_catfile(). Add early return
   on asprintf failure.

2. cmd_cat: malloc(BUFSIZ) for stdin reading was used without
   checking the return value. Add NULL check with -ENOMEM return.

Also fix a typo in error message: 'nsh_catfaile' -> 'nsh_catfile'.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-30 10:05:08 -03:00
hanzhijian
f57aa7b4cf nshlib/nsh_fscmds: Display modification time in ls -l output
Fixes #17063

Add modification time display to ls -l long format output.
The timestamp is shown as 'YYYY-MM-DD HH:MM' between the permission
string and the file size, following the ISO long-iso format.

Files with st_mtime == 0 (e.g., procfs, tmpfs pseudo-entries) skip
the timestamp display to avoid showing a meaningless epoch time.

Signed-off-by: hanzhijian <hanzhijian@zepp.com>
2026-06-30 10:03:03 -03:00
wangjianyu3
c503843e38 netutils/rexecd: add -t option to serve connections without a thread
By default rexecd spawns a detached worker thread per accepted connection
to allow concurrent sessions. Add a "-t" runtime option to instead handle
each connection inline in the main task, avoiding the per-connection
worker stack (CONFIG_NETUTILS_REXECD_STACKSIZE) allocation from the heap.
This matters on low-memory targets with limited free heap.

With "-t", connections are served strictly one at a time: a long-running
or interactive command blocks the accept loop until it finishes. Without
it, the existing thread-per-connection behaviour is unchanged.

Assisted-by: GitHubCopilot:claude-4.8-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-06-30 13:46:37 +08:00
Michal Lenc
535ecd8640 testing/libc/fopencookie/fopencookie.c: fix spellcheck
succesfull => successful

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-29 12:29:42 +02:00
Xiang Xiao
d172f81ecc apps: Replace O_RDOK with O_RDONLY after alias removal
The O_RDOK/O_WROK aliases have been removed from fcntl.h.  Replace
all remaining O_RDOK usage with O_RDONLY in the apps repository.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-29 07:42:09 +02:00
Xiang Xiao
4c560ef0a2 apps: Replace O_RDOK with O_RDONLY after alias removal
The O_RDOK/O_WROK aliases have been removed from fcntl.h.  Replace
all remaining O_RDOK usage with O_RDONLY in the apps repository.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-28 13:00:52 +02:00
Frederick Blais
a2b1cc16da interpreters/berry: Add Berry scripting language
Add an optional Berry interpreter under apps/interpreters.

Fetch the pinned upstream source and apply the NuttX default-port patch.

Generate Berry constant objects and build the NSH command through Kconfig.

Make and CMake build paths are included for normal app integration.

Signed-off-by: Frederick Blais <fred_blais5@hotmail.com>
2026-06-28 02:16:58 +08:00
wangjianyu3
253f1d40c3 netutils/rexecd: use dpopen() instead of popen() to get raw fd
popen() now returns a fopencookie-backed FILE* whose fileno() yields the
cookie pointer rather than a real descriptor, so poll() silently ignores
the negative fd and the relay loop blocks forever waiting for command
completion. See https://github.com/apache/nuttx-apps/pull/3511

Use dpopen()/dpclose() to obtain the raw bidirectional socket descriptor
directly, restoring the EOF/POLLHUP command-completion signal.

Assisted-by: GitHubCopilot:claude-4.8-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-06-27 08:47:46 -03:00
wangjianyu3
d29ae9bda6 netutils/rexec: initialize ret to avoid maybe-uninitialized
When the relay loop exits early without entering any branch, ret would be
returned uninitialized, tripping -Werror=maybe-uninitialized. Initialize
it to 0.

Assisted-by: GitHubCopilot:claude-4.8-opus
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2026-06-27 08:47:46 -03:00
Alan Carvalho de Assis
ae718ba47f nsh/echo: Fix echo previous behavior, single write with '\n'
This commit fixes the previous behavior where an echo with a
single string and its default new line is send as single write().

This issue came from:  https://github.com/apache/nuttx-apps/pull/1559

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2026-06-27 13:44:14 +02:00
Felipe Moura
fee2ddbf54 netutils/dropbear: add Dropbear SSH server port for NuttX
Integrated SSH daemon authenticating against FSUTILS_PASSWD, with an
ECDSA P-256 host key and an NSH session over a PTY per connection. Built
from the upstream Dropbear tarball (pinned commit) and patched for
NuttX, using Dropbear's bundled libtomcrypt for all crypto. setsid()
(apache/nuttx#19184) and link() now come from NuttX, not local stubs.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2026-06-27 08:42:00 -03:00
Michal Lenc
e44c4f370f testing/libc: add stdbit test
Adds the testing application used for CI stdc*_ functions tests.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-06-27 19:28:34 +08:00
Nightt
cea2f89f74 industry/scpi: add unit parser config options
Expose scpi-parser unit support through explicit Kconfig options instead of raw CFLAGS.

Map each option to the corresponding upstream USE_UNITS_* compile-time define, preserving the existing default unit set while allowing users to enable groups such as USE_UNITS_TIME.

Signed-off-by: Nightt <87569709+nightt5879@users.noreply.github.com>
2026-06-25 23:48:43 +08:00
dependabot[bot]
085ca0606e build(deps): bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-23 13:26:39 -04:00
aviralgarg05
da143595e1 apps: add missing module metadata for executable tools
Add the missing module metadata for the executable ELF helpers used by the package fixture flow so the generated artifacts describe their target and type consistently.

Also fix the existing embedlog spelling issue that is picked up by the current apps check, keeping this branch clean under CI.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-06-22 22:27:07 +08:00
Andrew Au
d9874394dd testing/sig_sp_test: add test for SP context restore on signal return
Add a test that verifies modifying SP (REG_R13) in the saved register
context is honored on signal return. The test pushes values onto the
stack, triggers SIGALRM, and in the handler advances SP to skip a
value, then verifies the correct value is popped after signal return.

This exercises the SP relocation fix in arm_sigdeliver.c for ARMv7-M
and ARMv8-M architectures.

Signed-off-by: Andrew Au <cshung@gmail.com>
2026-06-22 10:21:40 -03:00
Xiang Xiao
326b68aa36 examples/userfs: use designated initializers for struct dirent
The g_rootdir[] table initialized each entry's struct dirent member
positionally as { DTYPE_FILE, "FileN" }, which assumes d_type is the
first field.  This breaks when struct dirent gains the POSIX d_ino field
as its first member (see apache/nuttx: "fs/dirent: add d_ino member to
struct dirent"): the file-name string would be assigned to d_type,
producing -Wint-conversion warnings and an "initializer element is not
computable at load time" error.

Use designated initializers (.d_type / .d_name) so the table is robust
against the field order of struct dirent.

Also fix a 'Initiallly' typo in a nearby comment flagged by codespell.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-06-22 10:20:43 -03:00
Abhishek Mishra
75ee4d9090 nshlib: Add su, id, and whoami identity commands
Add NSH commands for switching effective credentials and inspecting
session identity. Update login and prompt to reflect effective user.

Signed-off-by: Abhishek Mishra <mishra.abhishek2808@gmail.com>
2026-06-20 15:38:45 -03:00
aviralgarg05
65854ea805 system/nxpkg: add local package lifecycle helper
Add the initial nxpkg command, metadata and store handling, the local install/list path, and the repository export helper.

Keep the current flow scoped to local artifacts and target-qualified repository entries so it remains usable as an incremental MVP while follow-up features land separately.

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
2026-06-20 15:05:28 -03:00