8543 Commits

Author SHA1 Message Date
trns1997
a44d65c939 testing/cxx-oot-build: Exclude cxx-oot-build in CMake projects.
Remove the previous guard logic and use a proper CMake
`exclude` rule to prevent `cxx-oot-build` from being
included when building projects with CMake.

* Ensures OOT test project is not pulled into normal apps.
* Keeps CI and export tests isolated from regular builds.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-10-15 14:34:32 +08:00
Halysson
ddf1dcc3ff netutils/cmux: Add support for CMUX protocol
This commit adds CMUX (GSM 07.10) protocol support to netutils.
CMUX allows multiplexing multiple virtual serial connections
over a single physical serial link.

Changes include:
- CMUX protocol implementation
- CRC table for frame validation
- Basic frame handling

Signed-off-by: Halysson <halysson1007@gmail.com>
2025-10-06 15:04:22 -03:00
trns1997
3684699190 testing/cxx-oot-build: Add out-of-tree build test.
Add the source content for the out-of-tree build test
under `apps/testing/cxx-oot-build`. This supports the
new CI check in NuttX to prevent regressions in the
`make export` workflow.

The test project provides:
* Sample OOT build structure.
* Integration with exported `nuttx-export`.
* Verification of successful build and link.

Signed-off-by: trns1997 <trns1997@gmail.com>
2025-09-25 18:32:38 +08:00
Stepan Pressl
cf41b01135 netutils/libshvc: add Silicon Heaven integration into NuttX and SHV examples
This commit marks the end of my GSoC 2025 project in the NuttX section.
All changes:

- Silicon Heaven protocol (SHV) implementation:
  The library is cloned from github.com/silicon-heaven/shv-libs4c
  and compiled here. The library has out-of-the-box support
  for NuttX and possibly all posix systems.
  The library is compiled with CONFIG_SHV_LIBS4C_PLATFORM define
  set to "nuttx". The library's dependancy is Pavel Pisa's ULUT
  and originates from Michal Lenc's GSoC.

- examples/shv-nxboot-updater:
  An example which constructs a SHV tree with which you can perform
  firmware updates using a SHV "file node". The file node wraps
  around NXBoot's update partition.
  The application also allows for NXBoot confirmation of the images.
  This application is to be meant used as a "background service",
  started before any apps, possibly using rcS. The tree is allocated
  as GAVL (see below).

- examples/shv-test:
  An example which constructs a SHV tree and gives the user
  the ability to choose which type of construction should be used,
  either:
    - GAVL:       dynamic SHV tree allocation encapsulated within
                  an AVL tree.
    - GSA:        dynamic SHV tree allocation encapsulated within
                  a continuous array with binary search
    - GSA_STATIC: SHV tree is defined as static const, this means
                  all the data structures are placed in .rodata.
		  Extremely beneficial for embedded systems,
		  as .rodata is located in flash and embedded
		  systems usually have more flash than sram,
		  thus reducing sram usage. The downside is that
		  the definitions are rather tedious, but can
		  be automated in case of some code generation
		  (like in pysimCoder).
		  All of it is places in a continuous array with
		  binary search.

Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
2025-09-24 21:43:07 +08:00
wangjianyu3
bc73779144 nshlib/nsh_parse: Fix "e" flag not take effect
The NSH exits when a command exits with a non-zero status, even if the "e" flag is not set.
This error does not exist in NSH scripts.

Without this patch:

  nsh> sh -c "set -e; mkdir /test; echo $?"
  nsh: /test: mkdir failed: 17
  nsh> sh -c "set +e; mkdir /test; echo $?"
  nsh: /test: mkdir failed: 17
  nsh> rm /test
  nsh> sh -c "set +e; mkdir /test; echo $?"
  0

With this patch:

  nsh> sh -c "set -e; mkdir /test; echo $?"
  nsh: /test: mkdir failed: 17
  nsh> sh -c "set +e; mkdir /test; echo $?"
  nsh: /test: mkdir failed: 17
  1
  nsh> rm /test
  nsh> sh -c "set +e; mkdir /test; echo $?"
  0

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-09-18 02:15:49 +08:00
Lars Kruse
00911d417d boot/nxboot: improve documentation
Previously it was hard to guess the correct entrypoint for the
bootloader application.

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2025-09-18 02:15:43 +08:00
michal matias
a85121b168 netutils: Add plcatool
Add plcatool - simple tool for managing PLCA configuration in 10BASE-T1S PHYs.

Signed-off-by: michal matias <mich4l.matias@gmail.com>
2025-09-17 19:29:10 +08:00
Jukka Laitinen
479d206dff system/cdcacm: Support sercon and serdis in CONFIG_BUILD_KERNEL
- Put sercon and serdis in separate source files, so that the main
functions can be compiled in also in kernel build.
- Don't store the ttyacm handle in the application, it is stored
in kernel side in case of the system_cdcacm

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-09-17 12:38:05 +02:00
wangjianyu3
10cab6bf6d nshlib/nsh_syscmds: Fix resetcause and rpmsg_help typos
nshlib/nsh_syscmds.c:111: unkown ==> unknown
nshlib/nsh_syscmds.c:651: acknowlege ==> acknowledge

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-09-17 10:07:24 +02:00
wangjianyu3
09f0f89e3a nshlib/reset_cause: Fix format warning for flag
Fix format string not appropriate warning for cause.flag.

nsh_syscmds.c: In function 'cmd_reset_cause':
nsh_syscmds.c:513:24: error: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'uint32_t' {aka 'unsigned int'} [-Werror=format=]
  513 |       nsh_output(vtbl, "%s(%lu)\n",
      |                        ^~~~~~~~~~~
  514 |              g_resetcause[cause.cause], cause.flag);
      |                                         ~~~~~~~~~~
      |                                              |
      |                                              uint32_t {aka unsigned int}

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-09-17 10:07:24 +02:00
Stepan Pressl
9968fa064b benchmarks/cyclictest: fix comp. warning and optargs termination
Fix reqtimeout_timer may be uninitilized.

Signed-off-by: Stepan Pressl <pressl.stepan@gmail.com>
2025-09-14 10:37:27 +02:00
Lars Kruse
df711238fe system/dd: implement "--help" parameter
Previously the usage hints were displayed only in case of errors.

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2025-09-12 09:33:13 +08:00
Lars Kruse
db36c8c617 system/dd: emit status messages to stderr (not stdout)
Previously `dd` clobbered its output by writing status messages (e.g.
transfer statistics) to stdout.

Now all status messages are written to stderr.

Signed-off-by: Lars Kruse <devel@sumpfralle.de>
2025-09-12 09:33:13 +08:00
wangchengdong
93060aa59d nshlib/nsh_builtin.c : Add support to run builtin dirrectly as command
Add a new config: NSH_BUILTIN_AS_COMMAND.
  Provide a new implementation for nsh_builtin
  when CONFIG_NSH_BUILTIN_APPS_AS_COMMAND is enabled.

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-11 20:00:20 +08:00
wangchengdong
1b9d420e79 sched/event: add nxevent_getmask tests
add test cases for the new nxevent_getmask() function

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-10 13:59:04 +08:00
dependabot[bot]
5a337e188e build(deps): bump actions/setup-python from 5 to 6
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5 to 6.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 09:44:25 +08:00
dependabot[bot]
a7276c2c3e build(deps): bump actions/github-script from 7 to 8
Bumps [actions/github-script](https://github.com/actions/github-script) from 7 to 8.
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](https://github.com/actions/github-script/compare/v7...v8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-09-10 09:44:13 +08:00
wangchengdong
7c5800924a testing/ostest: add nxevent_clear() test cases
Add test cases to verify the new recently added nxevent_clear() api

Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-09 15:36:01 +08:00
Filipe Cavalcanti
6bcb347982 system/ntpc: update ntpc messages
Updates verbosity on ntpc commands. Also updated documentation on NuttX side.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-09-05 23:47:36 +02:00
raiden00pl
ac08faa2b8 codespell: add codespell configuration
add codespell configuration with ignored lines for nimble

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-03 09:30:47 +08:00
raiden00pl
18823c8b32 bluetooth/nimble: update to the latest master
Update NimBLE to the latest master. This includes fixing the debug log control,
which was broken since:

  da4e2f0f12

The debug log was always enable and it wasn't possible to disable it.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-03 09:30:47 +08:00
Tiago Medicci
61e82925dc examples/i2schar: Implement loopback mode check
This commit implements the loopback mode for the i2schar example
application. This mode - available only when both RX and TX are
enabled - allows the user to test the I2S buses when the TX pin is
connected to the RX pin. This is done by pre-filling a buffer with
known data (additionally, it checks the peripheral's data width to
format the data in the buffer accordingly) and passing it for both
the transmitter and the receiver threads. This buffer is written to
the TX and the received buffer is compared to the known buffer.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
nuttx-12.11.0 nuttx-12.11.0-RC0 nuttx-12.11.0-RC1
2025-08-28 21:58:41 +08:00
Michal Lenc
7ac03cfcef boot/nxboot/loader/boot.c: avoid unwanted confirm on double update
Following steps led to incorrect behavior:
 - upload update image
 - restart device and perform the update
 - upload the same update image again without confirming

This led to the unwanted confirm of the update image. This change
ensures the update image is not confirmed by uploading the same
image to the update slot. The correct behavior is to perform revert
to the last stable image if this occurs.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-08-28 14:59:39 +08:00
YAMAMOTO Takashi
0e65af606f mbedtls: Add an option to build ssl_client2 test program
Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-08-28 14:57:45 +08:00
YAMAMOTO Takashi
71ce94a13e system/dd/dd_main.c: fix a typo in a comment
Found by the CI.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-08-26 21:56:12 +08:00
YAMAMOTO Takashi
93ced081dc system/dd/dd_main.c: replace #if defined with #ifdef
Although I personally prefer the former, at least one reviewer
preferred the latter. I coundn't find project-wide preferences.
Anyway, this is not important for me.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-08-26 21:56:12 +08:00
YAMAMOTO Takashi
78bae4f14f system/dd: portability to non-nuttx platforms
while this is not a goal for this repository,
it's convenient for me (hopefully for some others too)
to be able to build this for other platforms.

an obvious downside is to have a few more ifdefs.

tested with:
```
/opt/wasi-sdk-25.0/bin/clang -Wall -Oz -s -o dd.wasm dd_main.c
```

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-08-26 21:56:12 +08:00
Niccolò Maggioni
dfd1eb0672 examples/ads7046: Add new example for ADS7046 ADC
Add a new example that shows how to read a sample from
an ADS7046 ADC sensor registered on the SPI bus.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-20 02:28:15 +08:00
Niccolò Maggioni
14a39ee7ce examples/tmp112: Add new example for TMP112 temperature sensor
Add a new example that shows how to read the temperature from a
TMP112 sensor registered on the I2C bus.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-19 14:27:45 +08:00
Niccolò Maggioni
d8dcc9926e crypto/libsodium: Update libsodium to 1.0.20
Update the libsodium crypto library to the latest 1.0.20 tagged release.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-13 22:10:12 +08:00
Niccolò Maggioni
b0726955a0 fsutils/libtinycbor: Update TinyCBOR to 0.6.1
Update the TinyCBOR serialization library to the latest 0.6.1 tagged release.

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-13 22:09:32 +08:00
Niccolò Maggioni
056f04d170 tools/mksymtab: Replace deprecated fgrep usages
In most modern distros, fgrep is deprecated in favor of "grep -F"

Signed-off-by: Niccolò Maggioni <nicco.maggioni+nuttx@gmail.com>
2025-08-13 22:09:20 +08:00
liuchan3
fdf6f57d6c graphics/input: Adjust input tool priority and sampling rate
Align to monkey's priority, with a sampling rate similar to a real touch.

Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
2025-08-12 20:20:01 +08:00
liuchan3
6f93e401aa apps/graphics: Refactor the input tool using input generator library
Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
2025-08-12 20:20:01 +08:00
liuchan3
36b117c00a apps/graphics: Refactor monkey using input generator library
Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
2025-08-12 20:20:01 +08:00
Zhe Weng
7bfd5e5790 apps/system: Move input/monkey to apps/graphics/input
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-08-12 20:20:01 +08:00
Zhe Weng
7a2d5bbc64 apps/graphics: Add input generator library
We can use it to unify our monkey / input tools, and for other input
generation purposes easily.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2025-08-12 20:20:01 +08:00
dependabot[bot]
1820d7d2c7 build(deps): bump actions/checkout from 4 to 5
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 20:18:29 +08:00
dependabot[bot]
cd1c835a35 build(deps): bump actions/download-artifact from 4 to 5
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 4 to 5.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-08-12 20:18:15 +08:00
nuttxs
9cb9cea4b2 ntpclient/ntpclient.c: fix the NTP client’s timeval conversion
bug from milliseconds to microseconds

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-08-11 21:49:28 +08:00
Matteo Golin
d334c5eb67 apps/unity: Add printf configuration
Allows the user to select whether or not they want access to the Unity
``TEST_PRINTF`` commands.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2025-08-07 11:21:57 +08:00
nuttxs
8f3c3c57f9 netutils/dhcpc/dhcpc: add implementation to get renewal (T1) time and
rebinding (T2) time from DHCP packet.
According to RFC 2131, T1 and T2 times play a critical role in lease
management in DHCP clients.

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-08-06 10:54:18 +08:00
wangjianyu3
8d2a7e32a5 nshlib: Add ppid support for command ps
Add parent process ID support for command ps,
get from "/proc/<PID>/group/status:Parent".

For example

  nsh> sh
  nsh> ps
    PID  PPID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
  ... ...
      3     0     3 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0008136 nsh_main
  ... ...
      9     3     9   0 100 RR       Task      - Running            0000000000000000 0004064 sh

  nsh> sleep 100 &
  sh [10:100]
  nsh> ps
    PID  PPID GROUP CPU PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
  ... ...
      3     0     3 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0008136 nsh_main
  ... ...
      9     3     9   0 100 RR       Task      - Running            0000000000000000 0004064 sh
     10     9    10 --- 100 RR       Task      - Waiting  Signal    0000000000000000 0004040 sh -c sleep

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-03 22:56:32 +08:00
wangjianyu3
7cc7cb8ffa system/uORB: Add flags for gnss satellite format
Some applications require satellite information for positioning using the flag USED_IN_FIX.
More details: https://github.com/apache/nuttx/pull/16805

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-08-03 22:56:12 +08:00
Jorge Guzman
c19c2a71f3 netutils/xedge: refactor Makefile to use git clone instead of zip downloads
Previous zip-based approach was failing in CI environment. Changed to use
git clone with specific commit hashes to resolve CI build issues.

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2025-08-02 10:00:20 -03:00
George Poulios
caefd0de9f tee/libteec, examples/optee_gp: Fix cmake build
Top level:
 - 'tee' subdirectory added to top-level CMakeLists.txt

tee/libteec:
 - BINARY_PREFIX defined PUBLIC to make it accessible to consumer
   apps
 - added missing DEBUGLEVEL definitions

examples/optee_gp:
 - added missing dependency to libteec

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-08-02 09:59:21 -03:00
George Poulios
3ee6fdaf99 tee/libteec: Remove downloaded zip file on distclean
Initially, leaving the .zip around seemed like a good idea to
avoid re-downloading often. But it turns out deleting downloaded
packages during distclean is standard practice and some CI
scripts depend on the git local copy being clean, including
ignored files.

Change also CMakeLists.txt to download the zip instead of the
tarball.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-08-02 09:59:21 -03:00
Tim Hardisty
7506c026fa nxboot/loader: Fix boot progress calculation.
This patch corrects a mathematical error in the progress reporting function which
caused incorrect percentage progress calculations.

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-07-30 22:25:54 +08:00
makejian
08fdbb03bb mbedtls-alt: aligned alternative implementation return value with mbedtls
mbedtls interfaces overwritten by nuttx crypto driver, change return value of mbedtls interfaces from return value of nuttx crypto driver into starndard return value of mbedtls

Signed-off-by: makejian <makejian@xiaomi.com>
2025-07-30 15:41:50 +08:00
jingfei
4ecdb92e61 examples/mtdpart:Register MTD devices using the mtd_register method
1. Due to the automatic wrapping of MTD devices during the open() process,
   the legacy registration methods ftl_initialize() and bchdev_register()
   are no longer required for MTD device registration. The new method is
   now changed to register_mtddriver

2. Some code for space release and deregistration has been added,
   and certain error handling methods have been updated.
2025-07-30 10:10:34 +08:00