Commit graph

8522 commits

Author SHA1 Message Date
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>
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
Michal Lenc
8fbba09895 boot/nxboot/loader/boot.c: copy partition with blocksize large writes
The previous logic MAX(info_from.blocksize, info_where.blocksize) was
incorrect. The most effective access with by writing the entire
size of the block, therefore just decide the size based on the
target page size.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-28 18:21:46 +02:00
Michal Lenc
beacf792fa boot/nxboot/loader/flash.c: open partition with O_DIRECT flag
There is no need to use buffers in a bootloader. We expect a sequential
access, therefore we just need to erase the erase page before writing
to it for the first time, which is something FTL layer already takes
care of.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2025-07-28 18:21:46 +02:00
RTL
2de49b8b22 examples/xedge_demo: Add Xedge IoT Toolkit with BAS integration
Add support for Xedge, an embedded software toolkit for IoT applications
 using Lua scripting with HTTP(S), WebSockets, MQTT, and device I/O.

* netutils/xedge: Dependency manager that downloads BAS library
  and BAS-Resources, generates XedgeZip.c during build

* examples/xedge_demo: Complete example showing Xedge integration
  with HTTP server, Lua runtime, and SNTP time synchronization

Signed-off-by: Jorge Guzman <jorge.gzm@gmail.com>
2025-07-25 09:19:10 -03:00
Theodore Karatapanis
72668d7234 tee/optee_supplicant: Added optee supplicant
Support for extracting (from libteec), patching and compiling
optee_client/tee-supplicant by NuttX apps. Defaults to version
4.6.0 (same as the current libteec).

Enabled with:
CONFIG_OPTEE_SUPPLICANT=y
CONFIG_LIBTEEC=y

And the following for the nuttx kernel:

CONFIG_ALLOW_BSD_COMPONENTS=y
CONFIG_FS_ANONMAP=y
CONFIG_DEV_OPTEE_SMC=y
CONFIG_DEV_OPTEE_SUPPLICANT=y

The version of the supplicant needs to match the libteec version
since the patch to be applied might fail otherwise. If the versions
differ the build will be aborted.

More info:
 - https://github.com/OP-TEE/optee_client
 - https://optee.readthedocs.io/en/latest/architecture/secure_storage.html

Signed-off-by: Theodore Karatapanis <tkaratapanis@census-labs.com>
2025-07-25 17:31:12 +08:00
SPRESENSE
5e704891d9 netutils/esp8266: Add a function for finalization.
Add a function for finalization so that it can be used repeatedly.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
549836600c netutils/esp8266: Add to get channel from access points
Fix bug that channel retrieved by lesp_list_access_points is undefined.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
e61ee7981d netutils/esp8266: Fix bug to get gateway address
Fix bug to get gateway address.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
5429191ab0 netutils/esp8266: Fix nxstyle
Fix nxstyle.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
SPRESENSE
8b4a015f07 netutils/esp8266: Fix compile error
Fix compile error.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-22 15:04:36 +02:00
Tiago Medicci
c83e17c083 interpreters/python: Fix symbol collision with list_length function
NuttX implements a function with the same name which may end up
being included whenever `CONFIG_MM_KERNEL_HEAP` is set. To avoid
it, insert a prefix to it on Python's implementation.

Please note that the other patches had their metadata updated too.
2025-07-22 14:18:23 +08:00
wangmingrong1
3f823f9f25 kasantest: -fno-builtin is enabled by default
The strlen function called by kasantest will be optimized by the compiler, and the strlen function implemented in NX will not be called. Adding -fno-builtin can solve the problem.

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2025-07-18 22:42:25 +08:00
wangjianyu3
f34ae4587a system/gdbstub: Add depends of LIB_GDBSTUB
in function `gdbstub_main':
undefined reference to `gdb_state_init'
undefined reference to `gdb_process'
undefined reference to `gdb_state_uninit'

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-07-18 22:42:03 +08:00
Kevin Witteveen (MartiniMarter)
6bca3c2ca2 Add JPEG compressor support to Makefile
Before this PR only the decompressor files were added to the Makefile.
Now all the required compressor files are added.
Decompression and compression tested on STM32H7 with 1:8 JPEG scaling.

Signed-off-by: Kevin Witteveen (MartiniMarter) <kevinwit1999@gmail.com>
2025-07-17 13:54:22 +08:00
Eren Terzioglu
f3e1985b1e games/snake: Change consolekey magic numbers with ASCII macros
Change consolekey magic numbers with ascii values to make it more understandable

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-16 10:32:16 +08:00
Eren Terzioglu
9ea3fc6995 games/snake: Fix terminal issue after returning back from snake game
Fix terminal issue after returning back from game

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-16 10:32:16 +08:00
Filipe Cavalcanti
d27d6e635f examples/mcuboot: add example to update from binary in local storage
This example makes it possible to use a binary from local storage for MCUBoot update.
It copies the binary file to the secondary slot instead of downloading from a remote URL.
Can be used to update from a SD Card, for example.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-07-16 09:49:45 +08:00
Alan Carvalho de Assis
a7e4a2a30e examples/keyboard: Fix compilation warning
Replace %d with %PRIu32 to avoid warning convered in error on CI.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-07-15 06:12:21 +08:00
nuttxs
dfeeef41ed netutils/dhcpc/dhcpc.c:Implement a dedicated interface to send
DHCPRELEASE, According to RFC 2131 section 3.1, DHCPRELEASE is
used by a client to relinquish a network address and cancel any
remaining lease time

Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-07-14 15:49:29 -03:00
Petro Karashchenko
227d3ec35b netutils/nanopb: fix unpack step for MACOS
Currently NANOPB_UNPACK step in Makefile uses nanopb binary name with
hardcoded suffix '-linux-x86' that is not suitable for MACOS x86.
This commit replaces the hardcoded nanopb binary name with name that
is derived from NANOPB_NAME variable that reflects the nanopb binary
that is selected based on host OS selected in the build system

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2025-07-14 15:48:08 -03:00
simbit18
29c88356e9 [CI] build.yml: fix ERROR: Dangerous symbolic link path was ignored
add Command Line Switch -snld

-snld ->  allow extracting of denagerous symbolic links.

https://sourceforge.net/p/sevenzip/discussion/45798/thread/187ce54fb0/

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-07-13 07:05:09 +08:00
Eren Terzioglu
8b121eb138 games/match4: Add new match4 game
Add match4 game support

Signed-off-by: Eren Terzioglu <eren.terzioglu@espressif.com>
2025-07-12 08:38:32 -03:00