Commit Graph

1310 Commits

Author SHA1 Message Date
raiden00pl
32bcd87d8f system: 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
wangjianyu3
0fbeae7f0d uORB/sensor: Add timestamp for GNSS data
Add timestamp for GNSS measurements and clock, for matching.

When recovering the combination of `GnssMeasurement` and `GnssClock` into
[GnssData](https://android.googlesource.com/platform/hardware/libhardware/+/
           refs/heads/android14-release/include/hardware/gps.h#1748),
the reason for splitting is that the uORB buffer is not large enough to
accommodate `GnssData`, since different topics cannot guarantee the
same timing when publishing and subscribing data, we need an index to match.

WARNING: A new member "timestamp" of type uint64_t has been added at
the beginning of the struct "sensor_gnss_measurement" and "sensor_gnss_clock".

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-05-12 16:22:10 +08:00
wangjianyu3
f14249d1d3 system/uORB: Add API for sending loop exit event
Add orb_loop_exit_async() API to send exit event to uORB loop.

Closing immediately after a write may cause missing a wakeup.

When all file descriptors associated with the same eventfd object have been closed, the resources for object are freed by the kernel. --EVENTFD(2)

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-26 15:48:15 +02:00
wangjianyu3
3b0181dbd0 system/uORB: Fix orb_loop_s undeclared error
/workspace/apps/system/uorb/uORB/internal.h:42:31: error: 'struct orb_loop_s' declared inside parameter list will not be visible outside of this definition or declaration

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2025-04-26 15:48:15 +02:00
dongjiuzhu1
d670805758 system/uorb: add eventfd to notify loop exit.
Add support for exiting loop by writing eventfd.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-26 15:48:15 +02:00
dongjiuzhu1
84d4fe0bfd system/uorb: using UORB_LOOP_MAX_EVENTS to config loop function
Disable loop events by default (not compile loop.c and epoll.c).

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-26 15:48:15 +02:00
dongjiuzhu1
5585c9d347 nshlib/dd: remove nsh dd cmd
using system/dd to instead nsh dd cmd
remove related to config, file.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
dongjiuzhu1
6db2c14faa system/dd: align nsh dd command
nshlib/dd: Increase the integer width for sector size in dd.

    On some systems, using sector sizes larger than 65536 is needed for
    profiling performance or testing.

    Stuart Ianna <stuart.ianna@motec.com.au>

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
dongjiuzhu1
be6a45cb14 system/dd: check infile/outfile when closing
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
dongjiuzhu1
721d79fb73 system/dd: align nshlib/cmd_dd
cmd_dd:support dd can do verify

    After writing the file, compare the contents of the two files again

    Signed-off-by: anjiahao <anjiahao@xiaomi.com>

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
dongjiuzhu1
b608dd0e3f system/dd: align nshlib/cmd_dd
nshlib/cmd_dd: Retry if read() was interrupted

    Without this patch

      nsh> ls /etc/group | dd | dd
      sh [13:100]
      sh [14:100]
      nsh: dd: read failed: 4
      nsh>

    Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
dongjiuzhu1
2a52c4c7f5 system/dd: support conv=nocreat
align nshlib/nsh_cmddd

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-04-20 00:41:18 +08:00
chao an
69cb2e89e9 libs/libc/crc16: Separate implementation of crc16xmodem from crc16
keep default crc16 catalogue for CRC-16/XMODEM

Mapping crc16 implement to crc16xmodem

crc16     -> crc16xmodem
crc16part -> crc16xmodempart

- CRC-16/ACORN, CRC-16/LTE, CRC-16/V-41-MSB, XMODEM, ZMODEM
poly: 0x1021 initial seed: 0x0000, xor output: 0x0000

: width=16
: poly=0x1021
: init=0x0000
: refin=false
: refout=false
: xorout=0x0000
: check=0x31c3
: residue=0x0000
: name="CRC-16/XMODEM"

https://reveng.sourceforge.io/crc-catalogue/16.htm#crc.cat.crc-16-xmodem

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-04-10 22:38:48 +08:00
YAMAMOTO Takashi
61551aa849 system/dd: Implement conv=notrunc
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/dd.html
> notrunc
>   Do not truncate the output file. Preserve blocks in the output
>   file not explicitly written by this invocation of the dd utility.

Signed-off-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-04-03 18:45:22 +08:00
raiden00pl
3764ab041a cmake: remove empty strings from FetchContent
remove empty strings from FetchContent to eliminate cmake build warnings like this:

CMake Warning (dev) at /usr/share/cmake/Modules/FetchContent.cmake:1564 (cmake_parse_arguments):
  The BUILD_COMMAND keyword was followed by an empty string or no value at
  all.  Policy CMP0174 is not set, so cmake_parse_arguments() will unset the
  ARG_BUILD_COMMAND variable rather than setting it to an empty string.

Signed-off-by: raiden00pl <raiden00@railab.me>
2025-03-30 14:20:21 +08:00
simbit18
1193a82fca system/uorb/listener.c: fix typo
fix typo "Mointor" -> "Monitor"

Signed-off-by: simbit18 <simbit18@gmail.com>
2025-03-29 10:31:47 +08:00
chao an
83eba58232 nxlooper: fix typo in nxlooper
replace CONFIG_O_MULTI_SESSION to CONFIG_AUDIO_MULTI_SESSION

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-26 02:41:36 +08:00
chao an
6d0a039cc9 system/nxplayer/nxrecorder: move apb buffer instance to stack
move apb buffer instance to stack to avoid alloc buffer from heap

Signed-off-by: chao an <anchao.archer@bytedance.com>
2025-03-26 02:41:17 +08:00
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