2354 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
SPRESENSE
0037868ff0 examples/nximage: Rename program name to nximage
The original name is nxhello, which duplicates in examples/nxhello.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-07-09 09:28:57 +02:00
Tang Meng
971a7374d6 examples/i2schar: fix spelling mistakes 2025-06-27 21:42:02 +08:00
Alan Carvalho de Assis
63c86438fb apps/can: Replace fprintf with dprint
This modification will remove the dependency on
CONFIG_FILE_STREAM, useful for small devices.

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2025-06-27 09:41:29 +08:00
Tim Hardisty
f0eb00ffd9 examples: add mdnsd example application to accompany netutils/mdns library
This commit adds a new example app to allow the newly added netutils/mdns
library and associated daemon to be exeercised.

Signed-off-by: Tim Hardisty <timh@jti.uk.com>
2025-06-02 23:18:24 +08:00
vrmay23
8ff533beb3 examples/posix_stdio: Fix Kconfig to define default stack size
Fix the Kconfig file for the posix_stdio example by adding
the STACKSIZE symbol and setting it to DEFAULT_TASK_STACKSIZE.

This change ensures that the example builds properly and
respects system-wide stack size configuration.

Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
2025-06-01 09:21:15 -03:00
raiden00pl
94d02aaaf2 examples: unify Private Types banners
unify Private Types banners according to NuttX coding standard

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:16:50 +08:00
George Poulios
49f6a219f9 examples/optee_gp: Fix Kconfig if/else condition
Previous Kconfig had a mistake guarding optee_gp
Kconfig values based on EXAMPLES_OPTEE instead of
EXAMPLES_OPTEE_GP. Fix that

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-21 00:35:27 +08:00
George Poulios
7b383d0562 examples/optee_gp: Add a OP-TEE GP API client example
Add an example app that opens a session with the devices pseudo-TA
and enumerates the available devices (prints their UUIDs only)
using the GlobalPlatform API and libteec.

The example showcases:
  - initializing the context
  - opening a session
  - invoking a command using NULL references
  - invoking a command using temp shared memory
  - invoking a command using registered shared memory
  - closing the session
  - finalizing the context

Enabled with CONFIG_EXAMPLES_OPTEE_GP.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 21:17:51 +08:00
George Poulios
677089b912 examples/optee: Correct use of shm reg id and flags
Previous version of optee example was using id during
shm registration as input whereas it is an output
variable. It was also specifying flags to dictate the
behaviour whereas the latest implementation of the
driver prohibits their use. This commit addresses
those issues.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-13 21:17:51 +08:00
vrmay23
77b2e8dfee examples/posix_stdio: New example dedicated to posix stdio library.
This example will help newcomers to port software from Linux to NuttX
in a POSIX compliant fashion using stdio library. It shows how to work with
open(), close() and write() functions over /dev/console.

Signed-off-by: Vinicius May <vmay.sweden@gmail.com>
2025-05-07 20:07:35 +08:00
George Poulios
30ef8ff845 examples/optee: Introduce an OP-TEE client example
Add an example app that opens a session with the devices pseudo-TA
and enumerates the available devices (prints their UUIDs only).

The example showcases:
 - opening the OP-TEE client driver
 - printing its version
 - opening a session
 - allocating shared memory
 - registering shared memory
 - invoking a function to the TA referencing the shared memory
 - closing the session

Enabled with CONFIG_EXAMPLES_OPTEE.

Signed-off-by: George Poulios <gpoulios@census-labs.com>
2025-05-05 23:58:57 +08:00
Laczen JMS
61194fe6c0 examples/elf: add possibility to create romfs image
Add the possibility to create a romfs image for an "external" file
system. The romfs.img can directly be written to a configurable
mtdblock device.

Signed-off-by: Laczen JMS <laczenjms@gmail.com>
2025-04-19 11:30:29 +08:00
Jukka Laitinen
ecbd1e964a examples/camera: Initialize g_nximage semaphore with SEM_INITIALIZER
Use SEM_INITIALIZER macro instead of direct { 0 }

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-04-16 15:18:06 +03:00
chao an
27846ffec7 libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-11 09:43:07 +08:00
YAMAMOTO Takashi
70f28553c6 examples/gps: fix a few printf formats
references:
https://github.com/apache/nuttx/pull/16022
4abb6f8da5/minmea.h (L241C15-L241C28)
4abb6f8da5/minmea.h (L43)

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-10 16:47:21 +08:00
Filipe Cavalcanti
19352ab3c0 gps: modify printf to use format specifier macros
Replace '%d' with 'PRId32' in some printf calls.

Signed-off-by: Filipe Cavalcanti <filipe.cavalcanti@espressif.com>
2025-03-30 14:29:21 +08:00
raiden00pl
fa8daf4071 examples/nimble_bleprph: fix various coding standard issues
fix various coding standard issues examples/nimble_bleprph

also fix compilation for make

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 14:28:47 +08:00
raiden00pl
a4af41f893 examples/nimble_blecent: fix various coding standard issues
fix various coding standard issues for examples/nimble_blecent

also fix compilation for make

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 14:28:47 +08:00
raiden00pl
4bca48431a examples/adc: fix printf warning
examples/adc: fix printf warning

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 11:36:48 +08:00
Max Kriegleder
940ee9385c examples: add blecent and bleprph similar to mynewt-nimble apps
These example apps create a BLE central and peripheral based on
mynewt-nimBLE and work in companion. The apps are mostly based
on their equivalents, which can be found at
https://github.com/apache/mynewt-nimble/tree/master/apps

Signed-off-by: Max Kriegleder <max.kriegleder@gmail.com>
2025-03-27 02:30:00 +08:00
Huang Qi
a8c62307ec examples/rust/slint: Update nuttx crate branch from master to main and fix pixel format check.
Changed the NUTTX dependency branch to 'main' for consistency with repository updates.
Updated pixel format check to use FB_FMT_RGB16_565 for better clarity and accuracy.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-03-24 20:34:29 +08:00
Tomasz 'CeDeROM' CEDRO
bbcba55bbc examples/xmlrpc: Fix calls buffers size.
* examples/xmlrpc/calls.c used 80 bytes call buffers.
* update buffers to CONFIG_XMLRPC_STRINGSIZE+1 that is build time configurable.
* this keeps buffers size coherent with configuration.
* updated internal variable names to pass lint checks.

Signed-off-by: Tomasz 'CeDeROM' CEDRO <tomek@cedro.info>
2025-03-21 14:21:31 +08:00
Lup Yuen Lee
1e4a952eea examples/fbcon: Fix endchoice and help in Kconfig
This PR fixes the `endchoice` and `help` in the Kconfig for fbcon
- https://github.com/apache/nuttx-apps/pull/3029#discussion_r2006527306

This patch will fix these build errors:
```text
apps/examples/fbcon/Kconfig:62: syntax error
apps/examples/fbcon/Kconfig:172: unknown option "---help--"
```
https://github.com/lupyuen/nuttx-riscv64/actions/runs/13981663903/job/39147989438#step:5:158

Signed-off-by: Lup Yuen Lee <luppy@appkaki.com>
2025-03-21 09:49:06 +08:00
Tim Hardisty
3e37dd2517 Add Framebuffer Console Example App 2025-03-20 10:19:49 -03:00
SPRESENSE
3b03636e95 examples/bmi160: Fix typo of depends on
Fix SENSORS_BMG160 to SENSORS_BMI160.

Signed-off-by: SPRESENSE <41312067+SPRESENSE@users.noreply.github.com>
2025-03-07 11:21:34 +01:00
chenrun1
9c829f6650 examples: Add depends to different test cases
Summary:
  1.ftpd
  2.unionfs
  3.userfs
  4.nxffs
  5.smart

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-06 09:34:24 +01:00
chenrun1
2e61c6bff8 examples/romfs:add EXAMPLES_ROMFS_RAMDEVNO
Summary:
  add EXAMPLES_ROMFS_RAMDEVNO for custom initliaze ramdisk number

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2025-03-05 10:02:22 +01:00
simbit18
b84f93c4df [nxstyle] fix Relative file path
fix Relative file path does not match actual file.

EOL Conversion  -> Unix (LF)

Adding the message header to the Kconfig file

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-25 09:31:30 +01:00
simbit18
a0dfd187d8 [Kconfig style] Fix Kconfig style
Remove spaces from Kconfig files
Add TABs
Replace help => ---help---
Remove extra TABs

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-25 09:27:14 +01:00
simbit18
4315a1c8cc [nxstyle] fix Relative file path
fix Relative file path does not match actual file.

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 16:29:13 -05:00
Felipe Moura
62894b9baf examples/spislave_test: Add user data receive
Improve example, now it can receive commands / data from user;
Fixed indentation issues.

Signed-off-by: Felipe Moura <moura.fmo@gmail.com>
2025-02-17 23:06:58 +01:00
Luchian Mihai
5d7ff307c2 examples/amg88xx: fix kconfig
fix amg88xx kconfig EXAMPLES_AMG88XX_STACKSIZE option name

add depends on SENSORS_AMG88XX to hide the example is the driver is not enabled
2025-02-05 10:51:56 +08:00
Hiroki Noda
b43fd50ff0 examples:hello_nim: fix comment syntax 2025-01-30 02:18:52 +08:00
Huang Qi
18838d23bf examples/rust: Add basic Slint example
Summary:
- Added a basic Slint example for NuttX, demonstrating how to integrate Slint UI framework with Rust on NuttX
- Includes a simple UI with a counter and touchscreen input handling
- Provides CMake, Kconfig, and Makefile configurations for building the example

Impact:
- Introduces a new example showcasing Slint UI framework usage on NuttX
- Enables developers to explore Rust-based UI development on embedded systems
- Demonstrates integration with NuttX framebuffer and touchscreen drivers

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-29 14:08:45 +08:00
Yanfeng Liu
048b3e6f7b examples/module: add hostfs support
This allows loading the kernel module from a hostfs file system.

Signed-off-by: Yanfeng Liu <p-liuyanfeng9@xiaomi.com>
2025-01-23 18:43:02 +08:00
Matteo Golin
acc2b390c3 examples/gps: Allow GPS serial port to be specified as command line argument, mark MINMEA dependency in Kconfig. 2025-01-23 14:31:14 +08:00
Eren Terzioglu
dca032ab18 examples/i2schar: Make tx/rx count value generic on transmit/recieve operations 2025-01-21 10:15:42 +08:00
Huang Qi
9b6de015bc rust/hello: Optimize the build flags
Summary:
- Added `codegen-units = 1` and `opt-level = 'z'` to the release profile in `Cargo.toml`
- These changes optimize the build for minimal binary size

Impact:
- Reduces the final binary size by ~7% (244316 -> 228380 bytes)
- Improves resource utilization for embedded systems
- No functional changes to the application behavior

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-19 17:16:38 +08:00
zhangshoukui
4685ca557b lp503x_main: Minor fix
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-01-16 22:48:45 +08:00
tengshuangshuang
4432d84dd3 test:driver_audio bug fix
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-16 22:44:14 +08:00
Huang Qi
14fa7d2726 examples/rust: Rename hello_rust to rust/baremetal
Summary:
- Renamed hello_rust example to rust/baremetal to better reflect its purpose
- Updated file headers and Makefile paths
- Maintained all existing Kconfig options and functionality
- Prepares for future Rust development patterns where Cargo will be the
mainstream approach, with baremetal demonstrating traditional build method
- Creates clearer structure for Rust examples as we expand Rust support

Impact:
- No functional changes to the example itself
- Better organization of Rust examples under examples/rust/
- Existing configurations using this example will continue to work
- Build system will now look for the example in the new location

Testing:
- Confirmed Kconfig options remain unchanged
- GitHub CI passed and local build tested

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-15 01:53:56 +08:00