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
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
Peter Bee
38a190156a
apps/system: add nxcamera app
...
Add NxCamera app similar to NxLooper, which can be used to control video
capture device. The basic capture n' display function is complete, while
file output and camera control features are left TODO.
Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2022-12-10 02:46:31 +08:00
qiaohaijiao1
05eadd1bd6
nxplayer: add mp3 offload playback demo
...
Mask: Only parse ID3v2 header simple.
Usage:
nxplayer
device pcm0p
play /stream/1.mp3
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2022-12-02 22:51:58 +08:00
chao an
8edfe88187
system/vi: fix nxstyle warning
...
system/vi/vi.c:540:57: error: Multiple data definitions
system/vi/vi.c:541:54: error: Multiple data definitions
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-21 13:15:28 +08:00
Xiang Xiao
37c0cdd1a6
dhcp: Make the option dependence work for usrsock case
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-21 01:02:14 +08:00
chao an
c81da4c185
system/ping: remove depends since NETUTILS_PING already contains this check
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-20 19:35:13 +08:00
Xiang Xiao
d706510064
Fix Error: vi.c:888:57: error: format string is not a string literal (potentially insecure)
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-20 19:03:20 +08:00
chao an
bb24794fcb
system/ping[6]: ping[6] should also be enabled if NET_ICMP[v6]_NO_STACK == y
...
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-20 16:05:07 +08:00
qinwei1
c86509be4c
apps: getpid should return process id not thread id
...
Summary:
following the change in the nuttx kernel, implement the right semantics:
1. getpid should return the main thread id
2. gettid should return the current thread id
Refer:
https://github.com/apache/incubator-nuttx/issues/2499
https://github.com/apache/incubator-nuttx/pull/2518
Nuttx Kernel PR:
https://github.com/apache/incubator-nuttx/pull/7597
update apps code
Testing PASSED with qemu( 32/64 )
Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2022-11-17 17:58:45 +08:00
crafcat7
902ae591b1
system/ramspeed:Add automated testing process
...
In the previous ramspeed test process, it was necessary to keep adding size to achieve speed tests for different sizes of memcpy and memset. After the modification, the results will be automatically looped from 32k to the input size.
2022-11-12 18:57:06 -03:00
yinshengkai
bd2efd9f51
tools: replace DEFINE to DEFINE_PREFIX
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-11 01:18:32 +08:00
yinshengkai
ee4d8b738f
Makefile: replace INCDIR to INCDIR_PREFIX
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-11-10 02:38:58 +08:00
Xiang Xiao
36a0c924f7
netutils: Support telnetd in the kernel mode
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2022-11-07 15:24:08 +09:00
Xiang Xiao
12863fbd52
system/telnet: Fix the style warning
...
and remove the unused code
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-07 15:24:08 +09:00
Xiang Xiao
678415c6fa
Rename task_spawnattr_setstacksize to posix_spawnattr_setstacksize
...
follow up the kernel side change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-11-01 09:51:08 +09:00
yinshengkai
2c3c2edcb7
Makefile: Remove INCDIROPT
...
This option, which resolves to -w when CONFIG_CYGWIN_WINTOOL is
configured, is now appended to INCDIR in tools/Config.mk.
See git commit # 5eae32577e5d5226e5d3027c169eeb369f83f77d in the main
2022-10-25 13:48:16 +08:00
Petro Karashchenko
7bf9025f28
Revert "Revert "system/spi: improve alignment in array initialization""
...
This reverts commit a7567ce7b6
.
2022-10-24 01:13:27 +08:00
Petro Karashchenko
513662732d
Revert "Revert "system/libuv: minor style fixes in Makefile""
...
This reverts commit f613d05496
.
2022-10-24 01:13:27 +08:00
Petro Karashchenko
a7567ce7b6
Revert "system/spi: improve alignment in array initialization"
...
This reverts commit ef952aac96
.
2022-10-23 08:29:01 +02:00
Petro Karashchenko
f613d05496
Revert "system/libuv: minor style fixes in Makefile"
...
This reverts commit d7ce4226ef
.
2022-10-23 08:29:01 +02:00
Petro Karashchenko
d7ce4226ef
system/libuv: minor style fixes in Makefile
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-23 11:45:52 +08:00
Petro Karashchenko
ef952aac96
system/spi: improve alignment in array initialization
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-10-23 11:45:52 +08:00
Xiang Xiao
0d2ef47192
nshlib: Rename CONFIG_SYSTEM_NSH_SYMTAB to CONFIG_NSH_SYMTAB
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 22:18:38 +02:00
Xiang Xiao
b659f0fbdf
Remove the unnecessary cast for main_t, NULL and argv
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-18 18:40:23 +02:00
Xiang Xiao
8e460e7e19
nshlib: Move symbol table initialization from nsh_main to nsh_initialize
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
0d210c3227
nshlib: Move commoin initialization from console_main to nsh_initialize
...
to avoid the code duplication
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
964747dd36
nshlib: Call nsh_telnetstart in nsh_initialize to avoid the dupliation
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 15:39:10 -04:00
Xiang Xiao
893387b2c5
Fix the minor style issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 19:07:16 +02:00
Xiang Xiao
4941182cc6
Make.defs: Change "ifeq ($(XXX),y)" to "ifneq ($(XXX),)
...
to support the tristate option correctly and unify the usage
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-16 14:59:08 +02:00
crafcat7
2ad6dc37d8
system/cachespeed:Average time to add
2022-10-15 03:15:30 +08:00
Xiang Xiao
9291d07a87
Fix the coding style issue
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-10-06 12:20:32 +02:00
crafcat
98a9d2c749
system/ramspeed: Add system interrupt switch.
...
system/ramspeed: Add system interrupt switch.
2022-10-03 21:07:17 +02:00
crafcat
744ecf2b01
system/ramspeed: Add system interrupt switch.
2022-10-03 21:07:17 +02:00
crafcat
0e0ac0656b
system/cachespeed:Tools for testing cache-related speed.
...
Signed-off-by: crafcat <110923103+crafcat7@users.noreply.github.com>
2022-10-01 11:41:40 +08:00
yinshengkai
1b99543e8d
system/gcov: add show usage
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:31 +08:00
yinshengkai
d9ec9ca868
system/trace: expand dump string
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-09-27 19:39:22 +08:00
Huang Qi
2e2630e838
Don't download tarballs if a local git repo found
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-08-28 17:20:47 +08:00
Fotis Panagiotopoulos
0cdb2cfa48
Fixed compiler warnings.
2022-08-23 01:39:59 +08:00
yinshengkai
1e66c39066
system/input: update input device name
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-08-16 14:59:34 +08:00
jihandong
6afc226350
nxlooper nxplayer nxrecorder: fix coverity bug
...
readline might return EOF.
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-08-16 14:59:19 +08:00
Xiang Xiao
de26582775
system/uorb: Pass NULL to task_create directly
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-16 09:47:17 +03:00
yinshengkai
6895da98e3
system/input: add input tools keyboard support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-08-15 11:12:21 +03:00
zhouliang3
ec4f97623a
libuv/tests: Fix libuv extension tests compilation error
...
Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2022-08-15 10:51:10 +03:00
Xiang Xiao
b515a00fea
zmodem: Move crc16.h and crc32.h from host to host/nuttx
...
to avoid the conflict with the 3rd party library
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-08-13 13:28:30 +03:00
Masayuki Ishikawa
41fe4f177a
system:nsh : Apply CONFIG_NSH_DISABLE_TELNETSTART to nsh_main.c
...
Summary:
- This commit applies CONFIG_NSH_DISABLE_TELNETSTART to nsh_main.c
Impact:
- None
Testing:
- Tested with sabre-6quad:netknsh (will be updated later)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-09 23:17:25 +08:00
Masayuki Ishikawa
a86315050d
system: telnetd: Add telnetd app
...
Summary:
- This commit adds telnetd app
Impact:
- None
Testing:
- Tested with sabre-6quad:netknsh (will be updated later)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-08-09 23:17:25 +08:00
Jiuzhu Dong
e04333c986
driver/sensor: rename /dev/sensor -> /dev/uorb
...
because this directory contains all topics by uorb using, not just sensors.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-08-08 23:11:37 +08:00
Petro Karashchenko
6d730e3c25
system/cfgdata: add "format" command to description
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-08-05 13:57:21 +08:00
ligd
79a137495a
cu: fix cu hang when meet ctrl + C
...
We can't do sem_wait in sigaction
hang backtrace:
[<0x2c5a6958>] arm_switchcontext+0xc/0x10
[<0x2c579eba>] nxsem_wait+0x6e/0xa8
[<0x3c9a8cb5>] pb_field_iter_find+0xffde8cb/0xd3635c15
[<0x2c58d164>] uart_tcdrain.constprop.0+0x10/0xf8
[<0x2c58d5c6>] uart_close+0x10e/0x180
[<0x2c579f38>] nxsem_wait_uninterruptible+0x44/0xb8
[<0x2c95f87a>] file_close+0x12/0x44
[<0x2c95e5a8>] close+0x80/0xb4
[<0x2c5c6396>] sigint+0x1a/0x28
[<0x2c57b1b0>] nxsig_deliver+0x54/0xb8
[<0x2c5a549a>] arm_sigdeliver+0x1a/0x44
[<0x2c579eb6>] nxsem_wait+0x6a/0xa8
[<0x2c579eb6>] nxsem_wait+0x6a/0xa8
[<0x2c579eb6>] nxsem_wait+0x6a/0xa8
[<0x2c58aa1a>] pm_lock+0x1a/0x28
[<0x2c58a656>] pm_stay+0xa/0x60
[<0x2c58bb14>] rptun_notify+0x4c/0x58
[<0x2c97b8fc>] virtqueue_kick+0x54/0x7c
[<0x2c97ac82>] rpmsg_virtio_send_offchannel_nocopy+0x9a/0xcc
[<0x2c58df7c>] uart_rpmsg_dmasend+0x8c/0xe0
[<0x2c5771be>] leave_critical_section+0x2e/0x54
[<0x2c58d124>] uart_write+0x11c/0x14c
[<0x2c9620c6>] write+0x32/0x50
[<0x2c5c665e>] cu_main+0x2ba/0x484
[<0x2c5957be>] nxtask_startup+0x12/0x24
[<0x2c57b9d2>] nxtask_start+0x46/0x60
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-29 19:21:52 +03:00
ligd
8081711e22
nxlooper: nxlooper should wait call buffer returned before close
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-29 19:18:34 +03:00
Masayuki Ishikawa
147a796a7a
system: popen: Fix to build with CONFIG_BUILD_KERNEL=y
...
Summary:
- This commit fixes to build with CONFIG_BUILD_KERNEL=y
Impact:
- None
Testing:
- Tested with sabre-6quad:knsh (not merged yet)
Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2022-07-29 10:20:19 +08:00
jihandong
74af9a8065
app/system/uorb: fix error, memset() wrong size.
...
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
131e4dc69d
system/uorb: simply orb_check by SNIOC_UPDATED
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
3f865c4f9e
uorb/listener: ignore first get_state failed.
...
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
2b8bfc5be7
app/system/uorb: modify unit test to support data persist
...
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
874ed7654d
app/system/uorb: fix listener run_once not work.
...
And remove dead code.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
f02c5a5d7e
system/uorb: support new api
...
orb_advertise_multi_queue_persist
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
ligd
37f1e453b1
uorb: use another writing method to avoid compiler bug
...
int func(int b)
{
int a;
while (1) {
...;
if (b != 0)
a = 1000 / b;
...;
}
}
if b == 0, then system crash in Xtensa arch, clang compiler
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
8558e63772
uorb_listener: support set batch latency
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
3a8f4b53fc
apps/uorb: fix compile break
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
384c05beb2
app/system/uorb: alloc on heap instead of stack.
...
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
e97b1a79d6
uorb_listener: support subscribe physical sensor before node register
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
5bb4e14aad
system/uorb: always let orb_advertise, orb_advertise_queue for instance 0
...
1.orb_advertise, orb_advertise_queue for instance 0
2.orb_advertise_multi, orb_advertise__multi_queue for specified instance
3.If orb_advertise_multi_queue with instance is NULL, auto increase
instance from existing base.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
53ee04ba3c
uorb/listener: add new api: orb_open and orb_close
...
don't using subscriber to get state to avoid rpmsg access
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
d44dd1c426
uorb_unit_test: optimize stack used
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
6fceb913a2
system/uorb: optimize stack used
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
9f6d322186
system/uorb: listener, has 'top' command.
...
Listener can scan device under ORB_SENSOR_PATH, subscribe them and
cotinue printing messages by call their cb.
'-T' can Continuously print updating objects, '-l' means only
print once.
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
4ec3f70f1d
apps/system/uorb: support orb_get_meta by name string
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
Jiuzhu Dong
46c98420b7
system/uorb: add builtin sensor topics
...
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
d8d1e1e761
apps/system/uorb: c unit testcases
...
testcases:
1. test_single(): single instance, advertise then subscribe.
2. test_multi_inst10(): 10 instance, each 1 subscriber.
3. test_multi(): 2 instances, 2 advertisers, 2 subscribers.
4. test_multi_reversed(): same as test_multi(), but subsribe before
advertise.
5. test_unadvertise(): unadvertise upper 4 advertisers.
6. test_multi2(): same as tset_multi(). but multi-thread.
7, test_queue(): topic queue_size = 16.
Signed-off-by: jihandong <jihandong@xiaomi.com>
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2022-07-23 16:57:58 -03:00
jihandong
3528b5515f
apps/system/uorb: c interfaces.
...
refer to: https://docs.px4.io/v1.12/en/middleware/uorb.html
- orb_open: do real work for advertise() and subscribe(), if thre is
no user, register topic first, then save meta in driver;
only first user can successfully set buffer number.
- orb_exists: check topic state, if topic only has subscribers,
return "not exists".
Signed-off-by: jihandong <jihandong@xiaomi.com>
2022-07-23 16:57:58 -03:00
Xiang Xiao
c252ec1481
Add printflike to all printf like functions
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-07-18 14:09:10 +03:00
Norman Rasmussen
5c84c47cad
system/hostname: Add an option to read the hostname from a file
2022-07-18 12:29:51 +08:00
Xiang Xiao
dd7e98129a
system/libuv: Fix the undefined reference to `uv__strscpy'
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 20:25:52 +03:00
Xiang Xiao
f5c094aef1
system/libuv: Skip compile strscpy.c when CONFIG_LIBUV_UTILS_TEST enable
...
since test/test-strscpy.c will include it in this case
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-03 20:25:52 +03:00
Xiang Xiao
8d1484b562
system/libuv: Include nuttx/tls.h to call task local storage api
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-06-01 22:50:54 +03:00
Huang Qi
24c16780e2
libuv: Don't add idna.c to CSRCS if test enabled
...
test-idna.c will include idna.c and then cause multiple definition.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-05-13 08:23:23 +03:00
chao.an
725fe76b91
trace: format the usage output
...
before:
Usage: trace <subcommand>...
Subcommand:
start [-c][<duration>] : Start task tracing
stop : Stop task tracing
dump [-a][-c][<filename>] : Output the trace result
[-a] <Android SysTrace>
mode [{+|-}{o|w|s|a|i|d}...] : Set task trace options
switch [+|-] : Configure switch trace filter
syscall [{+|-}<syscallname>...] : Configure syscall trace filter
irq [{+|-}<irqnum>...] : Configure IRQ trace filter
print [+|-] : Configure dump tnsh>
after:
Usage: trace <subcommand>...
Subcommand:
start [-c][<duration>] : Start task tracing
stop : Stop task tracing
cmd [-c] <command> [<args>...] : Get the trace while running <command>
dump [-a][-c][<filename>] : Output the trace result
[-a] <Android SysTrace>
mode [{+|-}{o|w|s|a|i|d}...] : Set task trace options
switch [+|-] : Configure switch trace filter
syscall [{+|-}<syscallname>...] : Configure syscall trace filter
irq [{+|-}<irqnum>...] : Configure IRQ trace filter
print [+|-] : Configure dump trace filter
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-12 14:55:34 +08:00
chao.an
089c05cbd8
system/trace: correct arg index if command is alreay set
...
An error occurs when the same command is executed twice
$ trace switch +
$ trace switch +
Usage: trace <subcommand>...
Subcommand:
start [-c][<duration>] : Start task tracing
stop : Stop task tracing
dump [-a][-c][<filename>] : Output the trace result
[-a] <Android SysTrace>
mode [{+|-}{o|w|s|a|i|d}...] : Set task trace options
switch [+|-] : Configure switch trace filter
syscall [{+|-}<syscallname>...] : Configure syscall trace filter
irq [{+|-}<irqnum>...] : Configure IRQ trace filter
print [+|-] : Configure dump tnsh>
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-12 14:55:34 +08:00
chao.an
8ce86fe572
system/sched_note: fix build break
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-05-12 14:55:34 +08:00
Xiang Xiao
385603666b
system: Add gcov command
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-05-04 18:08:07 +03:00
Abdelatif Guettouche
473611d51d
system/ping: Guard against division by zero when calculating the RTT.
...
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2022-04-23 20:17:45 +03:00
Huang Qi
768a21b587
system/i2c: Fix fd leak in i2ccmd_reset
...
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-19 14:53:51 +03:00
Huang Qi
c7413ee859
system/critmon: Fix dead code
...
Remove branch since errcount could never bigger than 100.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-04-19 18:21:00 +08:00
okayserh
c8bc287a29
According to the help text, the balance command without value
...
should display the current balance value. This patch adjusts
the code accordingly.
2022-04-11 11:07:49 +08:00
chao.an
8c1a4994cc
system/note: correct unflatten format
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-08 01:38:13 +08:00
Petro Karashchenko
319203d5d8
apps: unify FAR attribute usage across apps
...
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-05 00:55:22 +08:00
chao.an
124c1328a6
sched/note: add support of trace section mark
...
The implementation of this feature is based on android systrace:
https://source.android.com/devices/tech/debug/ftrace
Application developers are more concerned about the performance of
the specified application section,
added two APIs to implement performance measurement:
void sched_note_begin(FAR const char *str);
void sched_note_end(FAR const char *str);
or
SCHED_NOTE_BEGIN(); /* defined to sched_note_begin(__FUNCTION__) */
SCHED_NOTE_END(); /* defined to sched_note_end(__FUNCTION__) */
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
chao.an
f4a41c6ed4
system/trace: fix the irq print compatibility with systrace
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
chao.an
023971d46c
system/trace: add switch priority print to align with ftrace
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
chao.an
2fd38eb57b
system/trace: force flush the output stream
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
chao.an
7612d2aea8
system/trace: correct preamble header pid
...
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
chao.an
90484a33e9
sched/trace: correct the note print format
...
note print should with Instruction pointer.
e.g:
trace_printk("hello NuttX");
trace dump:
hello-6 [000] .... 23080.367994: 0xc044a005: hello NuttX
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00