2344 Commits

Author SHA1 Message Date
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
chao an
66231194be apps/system: replace CONFIG_NSH_LINELEN to LINE_MAX
Applications should not depend on any properties of nshlib

Signed-off-by: chao an <anchao@lixiang.com>
2025-01-14 19:31:54 +08:00
Huang Qi
46f77a632d examples/usbserial: Fix style issues in host.c
- Break long preprocessor conditionals across multiple lines
- Add spaces around operators for better readability
- Reformat long string literals to fit within line length limits
- Improve consistency in spacing around parentheses and brackets

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-11 12:23:29 +08:00
Huang Qi
f7e7453807 examples: New app to build Rust with Cargo
Build Rust applictions with cargo is the most commn way,
and it's more easy to cooporate with Rust ecosystem.

This example shows how to use cargo to build a simple hello world
application.

And please notice that you need to install nighly version of rustc
to support this feature, any version after https://github.com/rust-lang/rust/pull/127755
is merged, can use NuttX as cargo target directly.

Build
-----

To build hello_rust_cargo application, you can use any target that based
on RISCV32IMAC, for example:
```
cmake -B build -DBOARD_CONFIG=rv-virt:nsh -GNinja .
```

And disable ARCH_FPU in menuconfig, since the hard coded target triple
in this demo is `riscv32imac`.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-10 22:25:13 +08:00
Huang Qi
ffd256d32b Remove unused header files across multiple source files
Clean up code by removing redundant and unused header file includes that were identified through static analysis.
This improves code readability and reduces unnecessary dependencies.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-10 21:42:00 +08:00
YAMAMOTO Takashi
da615bf5a6 examples/pipe/interlock_test.c: fix the uses of uninitialized variables
found by clang warnings.
2025-01-07 23:41:22 +08:00
zhangshoukui
d404b846f9 examples: Add depends on
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-01-03 21:28:20 +08:00
Alin Jerpelea
a91768e715 examples: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-30 18:02:50 +08:00
pengyiqiang
ce217b8744 lvgldemo: add LVGL duplicate initialization protection
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-12-02 19:50:19 +08:00
Huang Qi
9f859e914d posix_spawn: Move dependencies to Kconfig
`posix_spawn` depends on these configurations:
- !BINFMT_DISABLE
- !DISABLE_MOUNTPOINT
- BOARDCTL
- BOARDCTL_APP_SYMTAB
- ELF
- FS_ROMFS

Check them in compile time may waste some time if the dependencies are not met,
move them to Kconfig to avoid this.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-11-14 17:22:27 +08:00
xuxin19
1c7a7f7529 cmake(bugfix):add INCLUDE_DIRECTORIES for nimble
/github/workspace/sources/apps/examples/nimble/nimble_main.c:40:10: fatal error: nimble/nimble_npl.h: No such file or directory
   40 | #include "nimble/nimble_npl.h"
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-13 21:58:26 +08:00