Commit graph

8331 commits

Author SHA1 Message Date
chenxiaoyi
0da270d9d6 system/debugpoint: fix bug the length option parsing error
The debugpoint program has an option "-l" which requires an argument,
which means the optstring to getopt() should be "l:".

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2025-02-25 13:07:58 -03: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
wangjianyu3
536e2ccac6 system/fastboot: Add support for fastboot oem shell
To support executing custom commands.

Usage

  fastboot oem shell <command>

Tests

  # Configuration "esp32s3-devkit:fastboot" with `SYSTEM_FASTBOOTD_SHELL` enabled

  $ fastboot --version
  fastboot version 35.0.2-12147458

  $ fastboot oem shell ls /FILE_NOT_EXISTS
  FAILED (remote: 'error detected 0xff00 4')
  fastboot: error: Command failed

  $ fastboot oem shell ps
    PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
      0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003056 Idle_Task
      1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0001976 hpwork 0x3fc8bd50 0x3fc8bd80
      2     2 100 RR       Task      - Waiting  Semaphore 0000000000000000 0004048 nsh_main
      3     3 100 RR       Task      - Ready              0000000000000000 0001992 fastbootd
      4     4 100 RR       Task      - Running            0000000000000000 0001992 popen -c ps
  OKAY [  0.010s]
  Finished. Total time: 0.010s

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-25 08:23:37 +01:00
wangjianyu3
89c784188e system/fastboot: Add format string support for fastboot_fail()
Add support for producing output according to a format like printf().

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-25 08:23:37 +01:00
Felipe Moura
2eb18712d3 netutils/pppd/ppp.h: Fix build issue when network debug is enabled
This commit add include necessary when we enable network debug feature using ppp feature.

Signed-off-by: Felipe Moura de Oliveira <moura.fmo@gmail.com>
2025-02-24 10:19:31 +01:00
simbit18
d05ecafc4b interpreters/quickjs/CMakeLists.txt: Sync of build Cmake with build Make
Setting the right version 2024-02-14

To avoid future breakage, used the URL with last commit ID

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-22 13:48:26 +08:00
simbit18
a8b8a7320c system/irtest/Make.defs: fixed the wrong path
fix this error
make[3] *** /nuttxspace/nuttx/apps/testing/irtest: No such file or directory.  Stop.

error due to this change
apps/testing: Move irtest/sensortest/resmonitor/monkey to apps/system #2976

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-22 13:27:25 +08: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
simbit18
71ff60753c interpreters/quickjs/Makefile: fix the build with Make
QUICKJS_URL_BASE in Cmakefile and Makefile was not the same.
Updated the correct url in Makefile.

fix https://github.com/apache/nuttx/issues/15712

To avoid future breakage, used the URL with last commit ID

Current version 2024-02-14 as found in the VERSION file https://github.com/bellard/quickjs/blob/master/VERSION

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-02-21 10:52:29 -03:00
Michał Łyszczek
751c4efe7f system/psmq: add proper include path for embedlog
embedlog.h were residing in include/system path, but has been
moved to include/logging. This causes psmq to not be able to
find <embedlog.h> include, which results in compilation error

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2025-02-20 08:39:13 +01:00
Michał Łyszczek
da9dade71f system/psmq: bump version to v0.2.2
Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2025-02-20 08:39:13 +01:00
Michał Łyszczek
0fb063f329 logging/embedlog: bump version to v0.7.2
v0.7.2 fixes few minor bug fixes during compilation

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2025-02-20 08:38:27 +01:00
Tiago Medicci
ece14800e1 system/cpuload: Fix application's Make.defs location
The PR https://github.com/apache/nuttx-apps/pull/2974 first moved
it to `testing/sched/cpuload` and the Make.defs was adjusted
accordingly. However, during the review process, it was moved to
`system/cpuload` folder, but its Make.defs wasn't updated. This
commit fixes it.

Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
2025-02-20 08:34:52 +01:00
wangjianyu3
5de75adfb4 system/fastboot: Add prefix "SYSTEM" for USB boardctl configuration
- FASTBOOTD_USB_BOARDCTL
  + SYSTEM_FASTBOOTD_USB_BOARDCTL

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-02-20 15:34:10 +08: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
Tiago Medicci
db8542d2b1 interpreters/python: fix patch to set _PyRuntime attribute
This commit also adds the check for the `__NuttX__` macro to the
patch file that allows setting an attribute to the `_PyRuntime`
structure. The `__NuttX__` macro is guaranteed to be present when
building any application for NuttX.
2025-02-14 20:53:07 +08:00
chao an
7f424c3e8d nshlib/builtin: check background task before restore the signal
fix crash if:
CONFIG_SCHED_WAITPID=n
CONFIG_SCHED_CHILD_STATUS=y

The old signal will be restored only when sigaction is saved to avoid invaild access.

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-02-12 10:30:05 -03:00
Matteo Golin
fb0c1e10de system/uorb: require that LIBC_FLOATINGPOINT be enabled for DEBUG_UORB
This change prevents users from trying to use the `uorb_listener`
application without having floating point printing enabled on systems
that do not have an FPU (systems with FPUs have `LIBC_FLOATINGPOINT`)
enabled by default. Solution dicussed and agreed in:
https://github.com/apache/nuttx/issues/15599.
2025-02-07 09:45:59 +01:00
Tiago Medicci
f139e56cd6 testing/libc/wcstombs: Add testing application for wcstombs
This application test the libc's `wcstombs` function for different
len sizes (bigger than the converted string, exactly the size of
it and smaller than it).
2025-02-06 23:41:31 +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
Tiago Medicci
43439a6b16 interpreters/python: set ROMFS-generated data to const char
This allows the data to be placed in the .rodata section, which can
be allocated in the flash or other read-only storage, freeing the
internal memory.
2025-02-01 23:34:24 +01:00
Tiago Medicci
87f4eb8021 interpreters/python: add wrapper to initialize Python
This wrapper application checks if the Python's modules are already
mounted (and mounts them, if not), sets the necessary environment
variables and, then, runs the Python interpreter.
2025-02-01 23:34:24 +01:00
Tiago Medicci
4c6a6c7b16 interpreters/python: create Python's config files dynamically
The `Setup.local` and the `config.site` files are used by Python's
build system to, respectively, enable or disable Python's modules
and set/unset available functions in the target system. These files
are now set according to NuttX's configs, enabling or disabling
Python's features according to the configs set on NuttX.
2025-02-01 23:34:24 +01:00
Tiago Medicci
5a7661a928 interpreters/python: add patch to set _PyRuntime section
By setting a specific region for the `_PyRuntime` structure, it is
possible to move it to the external memory, for instance, freeing
the internal memory (this structure occupies around 140KiB).
2025-02-01 23:34:24 +01:00
Neo Xu
e1e28eb88a ostest: fix cmake build break
/nuttx/apps/testing/ostest/ostest_main.c:322:(.text.user_main+0x3c3): undefined reference to `sched_thread_local_test'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2025-01-30 17:15:49 +01: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
Huang Qi
285607608e tools/Rust: Add support for x86 platform
Summary:
- Added support for x86 and x86_64 architectures in the Rust build system
- Updated `nuttx_rust_target_triple` function in `cmake/nuttx_add_rust.cmake` to handle x86 and x86_64 target triples
- Updated `RUST_TARGET_TRIPLE` macro in `tools/Rust.mk` to include x86 and x86_64 target triples

Impact:
- Enables Rust crate compilation for x86 and x86_64 platforms
- No functional changes for existing architectures (ARM, RISC-V, etc.)
- Improves platform compatibility and expands Rust support in NuttX

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2025-01-29 13:41:30 +08:00
Xiang Xiao
cf46792554 apps/testing: Move sd_bench to apps/bechmarks
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 04:53:57 +01:00
Xiang Xiao
85a6aaa322 apps/testing: Move irtest/sensortest/resmonitor/monkey to apps/system
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-27 02:25:08 +01:00
Xiang Xiao
4e9d907677 testing: Move rpmsgdev to drivers/rpmsgdev
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 09:53:02 -03:00
Xiang Xiao
d7be1bd672 testing: Move fs/fopencookie to libc
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 09:53:02 -03:00
Xiang Xiao
b7f05e89ba testing: Move crypto/setest to drivers and open_memstream to libc
follow the dissusion from:
https://github.com/apache/nuttx-apps/pull/2931

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2025-01-26 07:32:53 +01:00
tengshuangshuang
0406e6734a apps/testing:move atomic,cpuload,getprime,smp and timerjitter folders to the new sched folder
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-26 00:23:15 +08:00
yintao
d3a1f80308 coredump: add error print
So we know if coredump exits with error, or there's no coredump.

Signed-off-by: yintao <yintao@xiaomi.com>
2025-01-24 09:34:47 +08:00
xuxingliang
1d1a8ba92e system/coredump: move coredump info to note
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2025-01-24 09:34:47 +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
tengshuangshuang
077c3461db apps/testing:merge case folder to the new mm folder
1.rename original  mm folder to heaptest and move it to mm folder

2.move the following folders into the new mm folder:
  cachetest, heaptest, iob, kasantest, memstress, memtester, ramtest, stressapptest

Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-23 18:19:06 +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
xuxin19
add50b3bd5 cmake(bugfix):fix NuttX CMake Wasm build multi dirs cannot be identified
System is unknown to cmake, create:
Platform/WASI to use this system, please post your config file on discourse.cmake.org so it can be added to cmake
Your CMakeCache.txt file was copied to CopyOfCMakeCache.txt. Please post that file on discourse.cmake.org.
CMake Error at CMakeLists.txt:100 (add_subdirectory):
  add_subdirectory given source
  /home/data/vela/tmp/apps/frameworks/security/ta/hello_world
  /home/data/vela/tmp/apps/frameworks/security/ta/" which is not an
  existing directory.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2025-01-23 14:26:08 +08:00
xuxin19
0b0a220c52 cmake(bugfix):fix wasm bin link entry missing issue
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2025-01-23 14:26:08 +08:00
xuxin19
aa7c63bfe1 cmake(bugfix):fix WASM install bin do not define error
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2025-01-23 14:26:08 +08:00
xuxin19
fb367c9792 cmake(enhance):Enhanced full WASM library and application compilation
1.add complete compilation FLAGS for wasm toolchain
2.wasm build no longer traverses the native directory, saving build time
3.implement OPT and AOT process actions for wasm files
4.create a bridge interface for navtie build and wasm build

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2025-01-23 14:26:08 +08:00
chao an
2ad162d27d system/cu: fix nxstyle error
$ ../nuttx/tools/checkpatch.sh -g HEAD~1
apps/system/cu/cu_main.c:5:78: error: Long line found

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-23 09:57:22 +08:00
chao an
dfb3fc9acf system/cu: remove canonical input mode from termios flag
ASCII_DEL will unable to handle after below change:
https://github.com/apache/nuttx/pull/14037

| commit df5c876932c4c82e8aee32adca651bb99d9d6200
| Author: zhangwenjian <zhangwenjian@xiaomi.com>
| Date:   Thu May 23 13:13:48 2024 +0800
|
|     libc:getline support backspace
|
|     Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>

remove canonical input mode to support backspace in cu

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-01-23 09:57:22 +08:00
tengshuangshuang
57c8a62e1e apps/testing:move arch_libc, fmemopen, scanftest folders to the new lib folder
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-22 17:18:30 +08:00
tengshuangshuang
8141e35f99 apps/testing:move epoll, fatutf8 ... folders to the new fs folder
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-22 01:34:00 +08:00
tengshuangshuang
6bc2b3c933 apps/testing:move {drivertest fftest irtest monkey nand_sim pcitest sd_bench sd_stress sensortest} folders to the new driver folder
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2025-01-21 16:22:56 +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