Commit Graph

982 Commits

Author SHA1 Message Date
Petro Karashchenko
aed0e2873e apps: fix style issues in code
Add missing FAR and CODE to pointers
Remove FAR for non-pointer variables
Remove extra spaces and align the parameters
Add do {} while(0) wrapper in macro
Use nitems to calculate number of elements in arrays

Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-06-11 18:47:50 +08:00
chao an
65ee6bea44 system/cu: disable error print if SYSTEM_CUTERM_DISABLE_ERROR_PRINT enabled
Test on sim/nsh (CONFIG_SYSTEM_CUTERM_DISABLE_ERROR_PRINT=y):

   text	   data	    bss	    dec	    hex	filename
 397049	  26704	   4128	 427881	  68769	nuttx      /* before */
 396481	  26704	   4128	 427313	  68531	nuttx      /* after */
   -568

Signed-off-by: chao an <anchao@xiaomi.com>
2023-06-10 02:29:47 +08:00
Lucas Saavedra Vaz
890524c86f system/nxdiag: Fix issues introduced by #1776
Fix compilation issue by properly providing the defconfig name
2023-06-03 02:26:33 +08:00
Lucas Saavedra Vaz
9cc710e954 testing/nxdiag: Move to "system" and improve info generated
Move the application to the "System" category. Improve host OS info by using platform.uname() and get current config file using CONFIG_BASE_DEFCONFIG
2023-05-27 13:48:32 +08:00
jinxiuxu
df418bea81 system/audio: check if channels are valid
check ac_channels upper four bits which means min channels.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-05-26 02:24:28 +08:00
chao an
6f4546f597 system/coredump: add coredump tool to capture system status
Signed-off-by: chao an <anchao@xiaomi.com>
2023-05-25 11:46:22 +08:00
Xiang Xiao
e81227f99d Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-22 11:57:40 +02:00
Xiang Xiao
7032c72f2f Indent the define statement by two spaces
follow the code style convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-21 07:39:53 +03:00
jinxiuxu
ceba53402e nxlooper: set default format for nxlooper
set default format as AUDIO_FMT_PCM for nxlooper.

Signed-off-by: jinxiuxu <jinxiuxu@xiaomi.com>
2023-05-15 17:30:57 +08:00
raiden00pl
d521d2ea57 telnetd/Kconfig: cosmetic change
With this change `# CONFIG_SYSTEM_TELNETD_PORT is not set` will not be present
in the generated `.config` file if telnetd is disabled.
2023-05-13 10:15:02 -03:00
simbit18
b810ac0b7e system: Fix nxstyle errors
error: Long line found
2023-05-10 15:40:06 +02:00
Xiang Xiao
f95d60366a Fix the nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
575582ca85 system/vi: Replace strncat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
73701cd7cd Replace all strncpy with strlcpy
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
7c37421266 Replace all sprintf with snprintf
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Xiang Xiao
134b8b538f Replace all strcat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-05-08 21:35:16 +03:00
Radek Pesina
be55ea7869 spitool: add support for 32-bit SPI BUS width
Link: https://git.motec.com.au/id/I62920d28ab9804d52d25af3bcdd0f1ceb87be93f
2023-05-06 03:23:02 +08:00
simbit18
6a5912c76c system/termcurses: Fix nxstyle errors
error: Long line found
2023-05-04 20:19:56 +08:00
anjiahao
fd42d811c2 support ymodem transfer on a custom blocksize
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-29 21:23:55 +08:00
anjiahao
32e597a136 support ymodem send/recve can asynchronous
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-04-29 21:23:55 +08:00
yinshengkai
08bfc4e9c7 system/critmon: fix warning
critmon.c:269:3: warning: 'runtime' may be used uninitialized in this function [-Wmaybe-uninitialized]
  269 |   printf("%11s %11s %11s %-16s %-5s %s\n",
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  270 |          maxpreemp, maxcrit, maxrun, runtime, entryp->d_name, name);

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-25 20:00:54 +08:00
Zhe Weng
e935f153bc apps/system: Call arg_freetable before iptables/tcpdump exit
Forget to free argtable before exit.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-04-24 23:47:45 +08:00
yinshengkai
3877c31b2f critmon: add total time running time of task
PRE-EMPTION   CSECTION      RUN         TIME         PID   DESCRIPTION
0.000000000   0.000000000   0.001237000 28.421047000 0     Idle Task

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-04-24 04:44:52 -04:00
Xiang Xiao
fe1d701b71 system/adb: Replace adb special reset cause with boardctl.h's value
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-04-23 10:44:43 -07:00
Fotis Panagiotopoulos
c50ff7ff61 Fixes in asprintf usage. 2023-04-23 17:16:34 +08:00
chenrun1
69d5f960fc system/ramspeed:Fix the problem that irq_disable is often opened.
Fix the problem that "when repeat_num!=0, there is no break, so irq_disable will be configured to true by default".
2023-04-19 03:10:05 +08:00
raiden00pl
9f3f6a4b3b system/usbmsc: set stack size to DEFAULT_TASK_STACKSIZE 2023-04-07 13:45:07 +03:00
Ville Juven
c694d8d90f system/composite_main.c: Convert fprintf -> dprintf
CONFIG_FILE_STREAMS now defaults to 'n' when DEFAULT_SMALL is enabled. This
is a good change, but this source file fails to compile when file streams
are disabled.

Fix this by using dprintf.
2023-04-03 21:33:19 +03:00
Xiang Xiao
fd9c92e2e9 system/cu: Move fd_std_tty, g_tio_std and g_tio_dev to cu_globals_s
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-29 14:50:11 +03:00
Gustavo Henrique Nihei
efb4e0bc91 Add another batch of missing headers throughout the repository
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2023-03-28 14:54:16 -03:00
Xiang Xiao
35edbf02f5 system/cu: Remove the duplicated SIGINT definition
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-03-26 09:12:45 -06:00
simbit18
386e077525 apps/system/ymodem/Makefile: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
simbit18
1adc70fe43 apps/system/ymodem/Make.defs: fix nxstyle
Remove LF first line
2023-03-24 15:04:43 -03:00
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