Commit Graph

938 Commits

Author SHA1 Message Date
Zhe Weng
098f5836f9 apps/system: Add tcpdump command
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-03-08 19:47:53 +08:00
simbit18
d325cf048a apps/system/uorb/Makefile: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 21:45:12 +02:00
simbit18
a62f09136e apps/system/setlogmask/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 21:45:12 +02:00
simbit18
7b8cc4e74b apps/system/nxrecorder/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 21:45:12 +02:00
simbit18
ef908dd83b apps/system/cachespeed/Make.defs: Fix mistakes in comments
Fix mistakes in comments
2023-03-07 21:45:12 +02:00
Huang Qi
96cd66cf51 system/cu: Disable echo if it's enabled to avoid double input character
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-07 09:50:54 +01:00
Gustavo Henrique Nihei
f500c64962 Include missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-07 09:58:13 +08:00
Gustavo Henrique Nihei
da7d9e3737 system/nsh: Include missing "unistd.h" header
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-06 18:52:31 +02:00
Huang Qi
509e90aadc termcurses: Disable echo for serial driver
Since termcurse will control whole echo and vt100 command itself.

This fix the dupped character in VI's command mode and some display issue in editor mode, like:
```
~
~
~
~
:qq!!
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-05 14:37:45 +08:00
Huang Qi
fd8ce46060 system/cle: Don't echo extra '\n'
Before:
```
NuttShell (NSH) NuttX-12.0.0
nsh> free
/* Extra line here */
                   total       used       free    largest  nused  nfree
        Umem:   33154512      33584   33120928   33120928     96      1
```

After:
```
NuttShell (NSH) NuttX-12.0.0
nsh> free
                   total       used       free    largest  nused  nfree
        Umem:   33154512      33584   33120928   33120928     96      1
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-04 13:50:08 +08:00
Huang Qi
8160dd0d56 readline: Don't echo input except VT100 command
Let's echo character by serial driver,
this will imporve the experience of telnetd,
which will display input command and newline twice.
And also enhance the compatiblity with some third party
linux readline based application (like WAMR repl).

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-02 13:46:18 +08:00
yinshengkai
19ba886ec2 trace: remove SCHED_INSTRUMENTATION_HIRES
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-23 22:33:14 +08:00
Huang Qi
db22e07d07 stdio: Remove CONFIG_EOL_IS_XXX
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-23 17:21:19 +08:00
lilei19
41f60bd669 change strcpy to strlcpy
Change-Id: I8b9429a3c225a82842fce136bdb14b8b135066d3
Signed-off-by: lilei19 <lilei19@xiaomi.com>
2023-02-22 23:09:55 +08:00
Huang Qi
95f32fd018 nsh: Decouple with CONFIG_FILE_STREAM
Replace all fwrite/fread/fgets/... to write/read/...

Before:
```
       text    data     bss     dec     hex filename
 109827     601    6608  117036   1c92c nuttx/nuttx
```
    After:
```
       text    data     bss     dec     hex filename
108053     601    6608  115262   1c23e nuttx/nuttx
```
    After with CONFIG_FILE_STREAM disabled:
```
       text    data     bss     dec     hex filename
 105667     601    6608  112876   1b8ec nuttx/nuttx
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-22 13:47:41 +08:00
chao an
8ac809e680 system/libuv: check GCC version before set special flags
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-21 13:57:43 +08:00
chao an
f0ddb92be0 libuv: disable warning message of dangling-pointer
| In file included from libuv/src/uv-common.h:42,
|                  from libuv/src/uv-common.c:23:
| libuv/src/uv-common.c: In function 'uv_walk':
| libuv/src/queue.h:68:19: warning: storing the address of local variable 'queue' in '((void * (**)[2])MEM[(void *[2] * *)loop_13(D) + 8B])[1]' [-Wdangling-pointer=]
|    68 |     QUEUE_PREV(q) = (n);                                                      \
|       |                   ^
| libuv/src/queue.h:78:7: note: in expansion of macro 'QUEUE_SPLIT'
|    78 |       QUEUE_SPLIT(h, q, n);                                                   \
|       |       ^~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 19:25:58 +08:00
chao an
cf4db3f62d drivers/note: fix build break by note rename change
Regression by:

| commit 4e6041a46c (HEAD, origin/master, origin/HEAD)
| Author: Xiang Xiao <xiaoxiang@xiaomi.com>
| Date:   Tue Feb 14 01:17:13 2023 +0800
|
|     system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
|
|     follow the kernel side change: https://github.com/apache/nuttx/pull/8531
|
|     Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-20 16:13:54 +08:00
Xiang Xiao
4e6041a46c system: Change DRIVER_NOTExxx to DRIVERS_NOTExxx
follow the kernel side change: https://github.com/apache/nuttx/pull/8531

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-20 14:30:57 +08:00
Peter Bee
ce84d5d7cd system/nxcamera: fix sscanf overflow
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2023-02-16 19:00:29 +08:00
Huang Qi
1207977447 readline: Check the fd before echo
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-02-16 15:47:26 +08:00
Ville Juven
a38c23f557 system/cle.c: Fix configuration for CONFIG_EOL_IS_EITHER_CRLF=y
The old flagging was insufficient, only '\r' was accepted as a line terminator
if CONFIG_EOL_IS_EITHER_CRLF was set.

I noticed this regression after:
https://github.com/apache/nuttx/pull/8454
2023-02-14 00:19:24 +08:00
Xiang Xiao
df55bf5cea system/adb: Update to 305007e0e574e7cc2b8d706b0f5d8cc76675fc51
which contain the fix: https://github.com/spiriou/microADB/pull/34

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-11 22:00:05 +02:00
Nathan Hartman
8e77b79f78 Kconfig: Make indent consistent with TABS 2023-02-10 14:11:48 +08:00
chao an
42d34fcef3 build/Kconfig: fix warnings detected by kconfiglib
Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-09 19:45:36 +08:00
chao an
8ad4ae5508 net: fix compiler warning
sixlowpan_assocresp.c: In function ‘sixlowpan_assoc_resp’:
sixlowpan_assocresp.c:48:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
   48 |   strncpy(arg.ifr_name, ifname, IFNAMSIZ);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: chao an <anchao@xiaomi.com>
2023-02-08 00:35:39 +08:00
yinshengkai
f102f6f405 trace: add trace header when dumping
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-08 00:35:17 +08:00
yinshengkai
ecadbbb43c trace: expand NOTE_DUMP_STRING
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-02-08 00:34:59 +08:00
Xiang Xiao
a29d9ea9da fsutils/examples: Include unistd.h explicitly
to get the prototypes or macros are defined in it

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-02-05 08:46:59 +02:00
liucheng5
bf140bcaae fix: sensor: support ECG event lead info
Lead info is added into sensor_ecg event struct. Uorb and sensortest shall be modified.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
2023-02-02 22:49:22 +08:00
jinxudong
57af6174f0 fix: sensor: update hall data type
update hall data type to int32_t

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-02-02 22:49:22 +08:00
qiaohaijiao1
61c4050d31 nxrecorder: add support to record media file.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-02 22:12:00 +08:00
qiaohaijiao1
3648ddce0f nxlooper: add loopback of compressed audio data.
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-02 14:36:08 +08:00
Gustavo Henrique Nihei
b0da60e498 apps: Use MIN/MAX definitions from "sys/param.h"
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-02-02 00:35:14 +02:00
qiaohaijiao1
e949e207e0 nxplayer: add support which mp3 file which has no ID3 header
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-02-01 21:46:21 +08:00
qiaohaijiao1
20fb7e1898 nxplayer: enqueue streaming data to audio driver.
audio offload playback, change data form to streaming.

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-01-31 22:26:39 +08:00
panran
53491d4f0c [system/argtable3] Add test suite for argtable3 2023-01-25 23:45:29 +02:00
liubojun1
928fb2be6d apps/system/nxplayer&nxlooper: fix codechecker warning
nxplayer_main.c:
code checker warning:
level_percent = (uint8_t) atoi(parg);
     'atoi' used to convert a string to an integer value, but function will not report conversion errors; consider using 'strtol' instead.
nxlooper_main.c:
code checker warning:
percent = (uint16_t)(atof(parg) * 10.0);
     'atof' used to convert a string to a floating-point value, but function will not report conversion errors; consider using 'strtod' instead

Signed-off-by: liubojun1 <liubojun1@xiaomi.com>
2023-01-25 23:44:07 +02:00
ligd
8994bab34c adb: add depends on LIBUV
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-25 23:20:28 +02:00
ligd
0bf87e7893 system/media: fix race condion on pthread id
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-20 22:47:26 +08:00
ligd
0e06cfeaec system/media: replace sem lock with pthread_mutex
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-20 22:47:26 +08:00
pengyiqiang
360f7b748a system/ramspeed: skip cases where time too short
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-18 09:02:10 +01:00
raiden00pl
efdc1ebf3f move embedlog from system to logging 2023-01-05 21:42:15 +08:00
Zhe Weng
19958f0428 apps/system: Add iptables command.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2022-12-29 14:26:41 +08:00
crafcat7
30efeb7424 system/cachespeed:Optimize output format and processing logic 2022-12-29 03:56:45 +08:00
crafcat7
ea7241a1a6 system/ramspeed:Fix the error of CI compilation caused by not initializing irqstate_t flags in some cases 2022-12-28 01:37:44 +08:00
Xiang Xiao
77ac0e4838 system/trace: Check NOTERAM_GETTASKNAME existence directly
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-26 11:53:26 +08:00
Xiang Xiao
d1e46c2d3e compiler.h: Add _ between format|printf|syslog|scanf|strftime and like
align with other macro naming style

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-12-21 01:05:12 +02:00
yinshengkai
595adbcca6 drivers/note: rename /dev/note to /dev/note/ram
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-12-15 12:15:53 +08:00
Peter Bee
11f0c2af43 system/camera: fix 'is_image' uninitialized
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-14 21:17:22 +08:00