Commit Graph

1292 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
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
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
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
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
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
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
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
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
Neo Xu
e59ab2b3af gdbstub: change send buffer to const char
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2025-01-20 20:07:22 +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
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
Eren Terzioglu
6c7bc3c788 apps/nxdiag: Update nxdiag app due to script place changes
Nxdiag app build scripts updated due to changes to make diagnostic
tools independent from nxdiag app. Change aims that nxdiag app does
not a reqirement to fetch system information.
2025-01-07 23:41:42 +08:00
Alin Jerpelea
d2ff6c8f28 system/tee: 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
Alin Jerpelea
5369d238a8 tee: remove the advertising clause
3. All advertising materials mentioning features or use of this software must
display the following acknowledgement: This product includes software
developed by the University of California, Berkeley and its contributors.

permitted by Berkley amendment
https://ipira.berkeley.edu/sites/default/files/amendment_of_4-clause_bsd_software_license.pdf

following example from NETBSD and OPENBSD
eb7c1594f1
6580fee329

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-12-30 18:02:50 +08:00
Alin Jerpelea
66e8296230 system: 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
Eren Terzioglu
82ee1ffbd6 system/nxdiag: Make espressif specific option appear when espressif devices selected 2024-12-21 13:52:59 +08:00
wangjianyu3
d02b05328a uORB/sensor: Update macro of sensor_gnss format string
Make it easier to extend the format of struct member

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 15:29:06 +08:00
wangjianyu3
ba0a8fbcb2 uORB/sensor: Add carrier frequency for GNSS Satellite
The `struct sensor_gnss_satellite.cf` may be parsed from `GSV.signal_id`(e.g. NMEA 0183 v4.11) and `struct sensor_gnss_satellite.constellation`

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-20 15:29:06 +08:00
wangmingrong1
c4fa568457 gcov: Add a signature end statement to test statement matching
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-12-18 22:45:39 +08:00
YAMAMOTO Takashi
3efbed1f27 system/libuv/Kconfig: depends on CONFIG_PIPES
libuv unconditionally uses pipe().

Fixes: https://github.com/apache/nuttx/issues/14773
2024-12-18 20:04:21 +08:00
wangjianyu3
7e77ab29e5 uORB/sensor: Add macro for satellite format string
Make it easier to extend the format of struct member

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-18 09:38:54 +08:00
Eren Terzioglu
9411e898e6 Move verbose option to common use 2024-12-07 11:38:10 +08:00
Eren Terzioglu
95a8c43b73 apps/nxdiag: Add dignostic info without esptool support for Espressif devices 2024-12-07 11:38:10 +08:00
Eren Terzioglu
f2e5d5c13f apps/nxdiag: Add dignostic info logging support during build on nxdiag example for Espressif devices 2024-12-07 11:38:10 +08:00
Tiago Medicci
9d7714f843 system/nxdiag: Change the order to generate the sysinfo.h file
The generation of `sys info.h` depends on evaluating whether
Espressif's HAL exists in the arch folder. However, cloning the HAL
itself happens in the `context` phase of the build, so it is
necessary to wait for it to finish before proceeding to the
evaluation in nxdiag. This is done by using the `depend` phase to
generate the `sysinfo.h` file.
2024-12-06 22:30:25 +08:00
wangjianyu3
b08c29617b system/usbmsc: Add support for setting paths that bind to LUN at runtime
Help

  nsh> msconn -h
  Usage: msconn [-o OPTION]... [-l LUNs]...
  Configures the USB mass storage device and exports the LUN(s).

  Supported arguments
    -o
        nc: No const LUN
        ro: Readonly
        rw: Read/Write(default)
    -l
        Device path to export

  Examples
    1. Export const LUN(s) only
        msconn
    2. Export /dev/ramx and const LUN(s)
        msconn -l /dev/ramx

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-12-06 08:56:30 +08:00
chao an
bd94b6da1a system/flatbuffers: fix patch flow of flatbuffers
Applying patch to flatbuffers
patching file '<'
Hunk #1 FAILED at 1.
1 out of 1 hunk FAILED -- saving rejects to file '<.rej'
patching file '<'
Hunk #1 FAILED at 39.
1 out of 1 hunk FAILED -- saving rejects to file '<.rej'
patching file '<'
Hunk #1 FAILED at 495.
1 out of 1 hunk FAILED -- saving rejects to file '<.rej'
patching file '<'
Hunk #1 FAILED at 23.
1 out of 1 hunk FAILED -- saving rejects to file '<.rej'
patch: **** Can't reopen file '<' : No such file or directory
-- Configuring done (12.8s)
-- Generating done (0.3s)

Signed-off-by: chao an <anchao@lixiang.com>
2024-12-01 10:14:49 +08:00
buxiasen
22d5d1d9d8 coredump: move definition out of types
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 07:36:36 +08:00
buxiasen
b75e404ec1 coredump: use llx to fix coverity report
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 07:36:36 +08:00
buxiasen
04f49f179b system/coredump: coredump restore independ and support mtd
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 07:36:36 +08:00
buxiasen
52bfcb3ab9 system/coredump: compatible restore name with NAME_MAX 32 Bytes
Coredump should compatible with default 32B NAME_MAX

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-11-30 07:36:36 +08:00
YAMAMOTO Takashi
6560618600 system/dd: improve EOF handling a bit 2024-11-28 15:20:13 +08:00
YAMAMOTO Takashi
9039b9cb18 system/dd: Fix a printf format 2024-11-28 15:20:13 +08:00
YAMAMOTO Takashi
f6f223e674 system/dd: portability to non-nuttx platforms
eg.
```
/opt/wasi-sdk-24.0/bin/clang -Wall -Oz -s -o dd.wasm dd_main.c
```
2024-11-28 15:20:13 +08:00
YAMAMOTO Takashi
1fed08e870 system/dd: make if= and of= optional 2024-11-28 15:20:13 +08:00
YAMAMOTO Takashi
1caf06bd77 system/dd: print help and abort on unknown options 2024-11-28 15:20:13 +08:00
YAMAMOTO Takashi
9c7a65e1e7 system/dd/dd_main.c: remove unnecessary header include 2024-11-28 15:20:13 +08:00
wangjianyu3
38b54f6fc5 system/adb: Waiting for enumeration to complete before opening endpoint
Env

  esp32s3-devkit:adb

Error

  adbd [3:100]

  NuttShell (NSH)
  nsh> adb_uv_usb_setup (154): failed to open usb device -1 2

Test
  + adb_log("Waiting for %s ..", ep);

  adbd [3:100]

  NuttShell (NSH)
  nsh> adbd_main (161): Waiting for /dev/adb0/ep0 ..

  nsh> ps
    PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK            STACK COMMAND
      0     0   0 FIFO     Kthread   - Ready              0000000000000000 0003008 Idle_Task
      1     0 224 RR       Kthread   - Waiting  Semaphore 0000000000000000 0008080 hpwork 0x3fc8bc00 0x3fc8bc24
      2     2 100 RR       Task      - Running            0000000000000000 0003992 nsh_main
      3     3 100 RR       Task      - Waiting  Semaphore 0000000000000000 0008112 adbd
  nsh>

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-23 01:44:19 +08:00
yinshengkai
7fb7e21bf2 system: support gcov output to stdout
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-11-22 09:02:48 +08:00
wangjianyu3
70e7ad85ed system/adb: Fix log format error
The "%pV" format depends on libc extension

Log

  adbd_main (***): 0x3fc9175cV

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-11-22 09:01:38 +08:00
xuxin19
fee82bd3d3 cmake(build):add missing basic and nxlooper cmake script
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-11-18 13:52:45 +08:00