Commit Graph

949 Commits

Author SHA1 Message Date
Huang Qi
4079f6d613 system/cu: Let remote machine handle special character except Ctrl-C
Let remote machine handle special character except Ctrl-C, make cu's behavior more close to linux/bsd system.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-22 11:51:04 -03:00
Huang Qi
8ae5a1b148 Fix some hard coded buffer len of snprintf
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-21 20:57:56 -03:00
simbit18
48928e1c68 apps/system/dumpstack/Makefile: fix style
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
simbit18
0e04cd75f8 apps/system/dumpstack/Make.defs: fix style
fix error: Relative file path does not match actual file
2023-03-21 20:37:38 -03:00
Tiago Medicci Serrano
3a1893ba7e nxplayer: read file completely until 0 bytes are returned
Previously, if the read bytes were less than the requested, the
file was closed immediately. This behavior, however, does not
consider the fact that the read operation may be blocking when
no bytes are available at the moment. That is true for a named pipe
(FIFO), for instance. Thus, reading it again lets to the underlying
file system the decision of 1) blocking until bytes become
available or 2) return 0 immediately (the case for actual files) or
3) read available bytes.
2023-03-21 07:51:18 +09:00
Xiang Xiao
f3c104b99a Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:53:44 -06:00
Xiang Xiao
86080a110e apps: Remove the check of CONFIG_SERIAL_TERMIOS
If the code only change c_oflag, c_iflag and c_lflag, not c_cflag in termios.
Follow up the change from kernel: https://github.com/apache/nuttx/pull/8843

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-19 14:53:44 -06:00
anjiahao
369c354dc7 support ymodem protocal and sb rb application
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-03-17 12:17:14 -03:00
Huang Qi
0af64dc045 system/cle: Remove cle_getcursor()
Fix https://github.com/apache/nuttx/issues/8731, don't rely on the vt100 to report
the cursor position.

This avoid the implicit input (response of get cursor command) during the user inputs.

Notice: This assume that the nsh prompt is always shown at line start.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-17 12:08:04 -03:00
Huang Qi
ea4437fc76 termios: Fix wrong ECHO flag
Follow https://github.com/apache/nuttx/pull/8800

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-03-17 03:22:08 +01:00
zhangyuan21
922f9932a6 apps: add <assert.h> header file
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-03-16 12:00:28 +01:00
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