Commit Graph

1035 Commits

Author SHA1 Message Date
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
chao.an
0dc716d426 sched/note: unify the data format
Signed-off-by: chao.an <anchao@xiaomi.com>
2022-04-03 18:04:28 +08:00
Petro Karashchenko
214dbe51b4 open() options: pass file options 0 if only ioctl is used
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-04-01 12:22:07 -03:00
qiaohaijiao1
442d52e878 system/nxlooper: fix warning
nxlooper.c:615:7: warning: 'playbufs' may be used uninitialized in this function [-Wmaybe-uninitialized]

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2022-03-31 16:59:16 +08:00
qiaohaijiao1
68fa377c5e system/nxplayer: fix warning
nxplayer.c:400:57: warning: array subscript 4 is above array bounds of 'uint8_t[4]' {aka 'unsigned char[4]'} [-Warray-bounds]
nxplayer.c:400:57: warning: array subscript 5 is above array bounds of 'uint8_t[4]' {aka 'unsigned char[4]'} [-Warray-bounds]
nxplayer.c:400:57: warning: array subscript 6 is above array bounds of 'uint8_t[4]' {aka 'unsigned char[4]'} [-Warray-bounds]
nxplayer.c:400:57: warning: array subscript 7 is above array bounds of 'uint8_t[4]' {aka 'unsigned char[4]'} [-Warray-bounds]

Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2022-03-31 16:59:16 +08:00
ligd
9730eaad9e nsh: sh_main also support isctty = true
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 22:47:37 +03:00
ligd
427798f7ee nxlooper: support different period size of player & recorder
Signed-off-by: ligd <liguiding1@xiaomi.com>
2022-03-30 02:46:07 +08:00
Huang Qi
ec15dc0344 system/libuv: Support specify stack size for worker thread
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-29 18:09:10 +03:00
Petro Karashchenko
41dd5f15bd system/cfgdata: add missing include file
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-28 17:19:00 -03:00
zhuyanlin
e3df21cd4c trace: fix pointer cross the border
Fix pointer cross the border

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2022-03-28 22:17:59 +08:00
Xiang Xiao
d364d7a810 system: Fix nx[looper|player|recorder] warning
nxlooper.c:879:7: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  879 |       strncpy(plooper->recorddev, pdevice, sizeof(plooper->playdev));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxlooper.c:875:7: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  875 |       strncpy(plooper->playdev, pdevice, sizeof(plooper->playdev));
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxlooper.c: In function 'nxlooper_loopraw':
nxlooper.c:165:52: warning: '%s' directive output may be truncated writing up to 96 bytes into a region of size 53 [-Wformat-truncation=]
  165 |           snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                    ^~
nxlooper.c:165:11: note: 'snprintf' output between 12 and 108 bytes into a destination of size 64
  165 |           snprintf(path, sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxplayer.c: In function 'nxplayer_playinternal':
nxplayer.c:359:53: warning: '%s' directive output may be truncated writing up to 96 bytes into a region of size 53 [-Wformat-truncation=]
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                     ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 108 bytes into a destination of size 64
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxrecorder.c: In function 'nxrecorder_setdevice':
nxrecorder.c:695:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
  695 |   strncpy(precorder->device, pdevice, sizeof(precorder->device));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nxplayer.c: In function 'nxplayer_setdevice':
nxplayer.c:1686:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
 1686 |   strncpy(pplayer->prefdevice, pdevice, sizeof(pplayer->prefdevice));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CC:  nxrecorder_main.c
nxplayer.c: In function 'nxplayer_setmediadir':
nxplayer.c:2090:3: warning: 'strncpy' specified bound 96 equals destination size [-Wstringop-truncation]
 2090 |   strncpy(pplayer->mediadir, mediadir, sizeof(pplayer->mediadir));
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-23 11:05:18 +02:00
Petro Karashchenko
c88dd4bbaf system/cfgdata: implement "format" option
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-22 10:30:50 +08:00
Xiang Xiao
282e44e3e0 system/ping: Don't include nuttx/lib/math.h
since the mdev is calculated through function provided by fixedmath.h

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-19 22:24:04 +02:00
Petro Karashchenko
29cc338dac system/cfgdata: fix compilation when MTD_CONFIG_NAMED is enabled
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-19 17:36:29 +08:00
xuewenliang
c69ec94d13 Modifying the ping command
1、Round trip times in the ping command range from millisecond to subtle
2、Add statistics on RTT related min/avg/Max/mdev in ping program
3、The ping command supports ctrl+c interruption operations

Signed-off-by: xuewenliang <xuewenliang@xiaomi.com>
2022-03-18 09:54:01 +08:00
Petro Karashchenko
566be8c7b1 definitions: unify MAX and MIN macro definitions
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-16 23:20:17 +08:00
Xiang Xiao
61007bcdb6 system/adb: Update to microADB to the latest version
and enable the port forwarding feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-15 09:16:27 +02:00
pengyiqiang
c53dca512e rename ramspeed to ramspeed_main
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-03-14 18:46:07 +08:00
pengyiqiang
c2f4d16db5 system: add ramspeed test.
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2022-03-14 18:46:07 +08:00
yinshengkai
db4fc86465 system/input: add input tool button support
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-03-14 18:44:08 +08:00
Petro Karashchenko
f9baa422c1 style: unify path to files in comment section
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-03-09 10:37:33 +08:00
Alin Jerpelea
4cd9c5d0e1 apps: system: setlogmask: update licenses to Apache
Gregory Nutt has submitted the SGA
Verge Aero has submitted the SGA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 17:04:01 +02:00
Xiang Xiao
5a2c435035 system/hexed: fix error: 'memset' used with length equal to number of elements without multiplication by element size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-08 10:52:18 +02:00
Alin Jerpelea
cd79a79d00 Makefile: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2022-03-08 01:44:49 +08:00
Xiang Xiao
df48f0bb73 system/termcurses: Fix the compiler warning
tcurses_vt100.c: In function 'tcurses_vt100_move':
Error: tcurses_vt100.c:121:48: error: '%d' directive writing between 1 and 11 bytes into a region of size between 2 and 12 [-Werror=format-overflow=]
  121 | static const char *g_movecurs       = "\033[%d;%dH";  /* Move cursor to x,y */
      |                                                ^~
tcurses_vt100.c:121:39: note: directive argument in the range [-2147483647, 2147483647]
  121 | static const char *g_movecurs       = "\033[%d;%dH";  /* Move cursor to x,y */
      |                                       ^~~~~~~~~~~~~
tcurses_vt100.c:795:9: note: 'sprintf' output between 7 and 27 bytes into a destination of size 16
  795 |         sprintf(str, g_movecurs, row + 1, col + 1);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
Xiang Xiao
65a02ba9f9 system/nxplayer: Fix the compiler warning
nxplayer.c: In function 'nxplayer_playinternal':
Error: nxplayer.c:209:36: error: '%s' directive output may be truncated writing up to 99 bytes into a region of size 59 [-Werror=format-truncation=]
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |                                    ^~                    ~~~~~~
nxplayer.c:209:3: note: 'snprintf' output between 19 and 118 bytes into a destination of size 64
  209 |   snprintf(buf, sizeof(buf), "GET /%s HTTP/1.0\r\n\r\n", relurl);
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:1809:42: error: 'snprintf' output may be truncated before the last format character [-Werror=format-truncation=]
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |                                          ^
nxplayer.c:1809:7: note: 'snprintf' output 2 or more bytes (assuming 129) into a destination of size 128
 1809 |       snprintf(path, sizeof(path), "%s/%s", pplayer->mediadir, pfilename);
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: nxplayer.c:359:53: error: '%s' directive output may be truncated writing up to 128 bytes into a region of size 53 [-Werror=format-truncation=]
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |                                                     ^~
nxplayer.c:359:11: note: 'snprintf' output between 12 and 140 bytes into a destination of size 64
  359 |           snprintf(path,  sizeof(path), "/dev/audio/%s", pdevice->d_name);
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-07 00:58:19 +08:00
Xiang Xiao
44b92d9254 Fix readline_common.c:277:19: error: 'strncpy' destination unchanged after copying no bytes
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-06 00:40:06 +08:00
Xiang Xiao
02a095bb76 system/adb: Download the last version of microADB
commit aa9c64896c7d47478656928d4dcf9b1a5e346da7
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date:   Sat Jan 22 16:41:23 2022 +0800

    remove NuttX special code

    since the new libuv porting for NuttX doesn't need the special process

    Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
29374c96c3 system/adb: Replace NuttX special shell service with microADB builtin one
since the new libuv porting support uv_proccess_t now

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
77382e7209 process-spawn.c: switch uv_socketpair to uv_pipe
to remove the socket dependence

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-04 09:00:30 +02:00
Xiang Xiao
f0bb6cf914 system/libuv: Switch process.c to process_spawn.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-03-02 23:41:32 +08:00
Xiang Xiao
7872332284 libuv: Remove unsupported case from test list
And some minor changes:
* Remove no-proctitle.c from CSRCS since there is a implementation in nuttx.c
* Add sysinfo-[loadavg|memory].c to CSRCS to provide system info

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-03-01 13:52:34 +08:00
Huang Qi
9351ab50d5 system/libuv: Bump to v1.42.0
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-28 18:05:00 +08:00
Huang Qi
a79195a048 system/adb: Remove unsed macro __NUTTX__
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2022-02-28 18:05:00 +08:00
zhanghu6
18b5902a3e apps/trace: add switch and dump instrumentation
usage:
    trace switch switch [+|-]
                             Configure switch trace filter

    trace print [+|-]
                             Configure dump trace filter

Signed-off-by: zhanghu6 <zhanghu6@xiaomi.com>
2022-02-24 10:23:50 -03:00
Xiang Xiao
4cc0c755bf Remove CONFIG_CLOCK_MONOTONIC special code
since this opion doesn't exist anymore

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-23 01:21:44 +08:00
Xiang Xiao
b1276ea1b4 system/adb: Change the default value of ADBD_PAYLOAD_SIZE to 1024
improve the speed of "adb push" and "adb pull"

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-17 05:26:27 +01:00
Xiang Xiao
f4fdf94d53 system/cu: Don't select SERIAL_TERMIOS in Kconfig
since all terminal related code is already guarded by CONFIG_SERIAL_TERMIOS

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-09 18:36:25 +01:00
Xiang Xiao
9534c640e8 system/adb: Fix error: 'fd' may be used uninitialized in this function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-02-03 22:27:01 +01:00
Xiang Xiao
53cd8cda1f system/adb: Support reset to bootloader and recovery mode
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-29 12:44:41 +01:00
Xiang Xiao
8506078624 system/adb: Replace printf with syslog since adb is a service
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-24 23:32:15 +08:00
Norman Rasmussen
cc5b99a725 system/uniqueid: Add a tool to get the board uniqueid 2022-01-22 22:48:23 +08:00
Xiang Xiao
db235f98d8 Rename CONFIG_SMP_NCPUS to CONFIG_NR_CPUS
follow up NuttX side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2022-01-22 00:08:32 +01:00
yinshengkai
8f1948038e system/input: add system input cmd tool
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2022-01-20 19:47:05 +01:00
Petro Karashchenko
9480c0ec12 include: fix double include pre-processor guards
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2022-01-16 17:36:21 +08:00
Norman Rasmussen
374cb9230a Fix boarctl typos 2022-01-16 08:07:47 +01:00
Fotis Panagiotopoulos
bc5d8034f1 Typo fixes. 2022-01-06 10:30:41 +08:00
zhanghu6
0c79d57f12 note main: system/sched_note add output of string and binary
ifdef CONFIG_SCHED_INSTRUMENTATION_DUMP
case NOTE_DUMP_STRING:
case NOTE_DUMP_BINARY:
endif
2022-01-04 20:53:08 +08:00
Norman Rasmussen
6993c66389 Check for too many arguments to hostname
Also use the symbolic value for the success exit code.
2022-01-01 14:54:15 +01:00
Norman Rasmussen
2a4db81217 system/hostname: Add a tool to get/set hostname 2021-12-29 01:59:47 -06:00
Petro Karashchenko
5ac15130db apps: remove space befone newline in logs
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-27 20:52:08 -06:00
chao.an
fcd69d1cdf system/lzf: correct the open mode
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 09:12:52 -06:00
chao.an
419e6b012a system/lzf: add support for host build
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 09:12:52 -06:00
chao.an
5a61f9e0b0 system/lzf: fix nxstyle warning
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 02:17:07 -06:00
chao.an
0f632f1d66 system/lzf: replace the semaphore to pthread to ensuring compatibility
Private SEM_INITIALIZER is incompatible with other OS

Signed-off-by: chao.an <anchao@xiaomi.com>
2021-12-20 02:17:07 -06:00
zhanghu6
1e28c3b9ea trace dump: the note dump module of out keep string output 2021-12-14 11:16:54 -06:00
zhanghu6
a63aef8f02 warning: trace_dump_sched_switch unused because add SCHED_INSTRUMENTATION_SWITCH
https://github.com/apache/incubator-nuttx/pull/4998
note dump: add CONFIG_SCHED_INSTRUMENTATION_SWITCH #4998
2021-12-14 11:16:54 -06:00
zhanghu6
a2c8fa182a trace dump: build error because add CONFIG_SCHED_INSTRUMENTATION_SWITCH in note driver
https://github.com/apache/incubator-nuttx/pull/4998
note dump: add CONFIG_SCHED_INSTRUMENTATION_SWITCH #4998
2021-12-14 11:16:54 -06:00
zhanghu6
cc8dd03b9c trace dump: add string and binary
NOTE_DUMP_STRING
NOTE_DUMP_BINARY

And incubator-nuttx[trace: and sched note dump #4963] is together
2021-12-13 21:22:21 -06:00
Xiang Xiao
58586f86e3 system/cle: Make it work without CONFIG_FILE_STREAM
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-30 22:06:03 -06:00
Xiang Xiao
c8439368ac system/readline: Make it work without CONFIG_FILE_STREAM
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-30 22:06:03 -06:00
Abdelatif Guettouche
7b192f24fe system/trace/trace.c: Condition the creation of "i" and "count"
varialbes with SYSCALL or IRQ instrumentation to avoid a warning.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-27 05:48:13 -06:00
Abdelatif Guettouche
c26c4009d9 system/trace/trace_dump.c: Fix typo in a comment (NUL -> NULL).
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-27 05:48:13 -06:00
Abdelatif Guettouche
b345298232 system/sched_note/note_main.c: Fix the path of file in the header.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-12 08:29:03 -06:00
Abdelatif Guettouche
610d3878af system/sched_note/note_main.c: Some cosmetic changes to comments.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-12 08:29:03 -06:00
Abdelatif Guettouche
e2975b5947 system/sched_note/note_main.c: Drop the ERROR string from the syslog
error messages as it's already prepended.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-12 08:29:03 -06:00
Abdelatif Guettouche
49866a8fe4 system/sched_note/note_main.c: Change the priority of errors printed
through syslog.

Errors should have LOG_ERR instead of LOG_INFO.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-12 08:29:03 -06:00
Abdelatif Guettouche
31ad83e018 system/sched_note/Makefile: Fix program name.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-11-12 08:29:03 -06:00
Xiang Xiao
35e442d08c system/readline: Move READLINE_HAVE_EXTMATCH inside SYSTEM_READLINE section
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-11-08 10:43:47 -03:00
Erdem Meydanli
c222043ed1 system/termcurses: Add terminate operation into the termcurses_ops_s interface
The existing implementation of the termcurses_deinitterm calls
termcurses_setcolors with some hard-coded values, leading to different
terminal emulators' behavior. Instead, a reset call needs to be made to
the implementation to roll back changes.

A new operation (terminate) has been added to the termcurses_ops interface
to achieve this functionality.

The vt100's terminate implementation ensures that default foreground and
background colors are applied portably across different terminals emulators.
2021-08-28 21:12:40 +08:00
Juha Niskanen
b283289986 apps: fix miscellaneous typos
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2021-08-26 11:39:28 -07:00
Xiang Xiao
d4d2f13f89 Rename CONFIG_LIB_BOARDCTL to CONFIG_BOARDCTL
since boardctl isn't a libc feature

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-06 11:04:35 +02:00
Xiang Xiao
967f526850 Rename LIB_ to LIBC_ for all libc Kconfig
follow other libc component naming convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-05 16:42:32 +02:00
Xiang Xiao
ad3f44bc77 Change match to fnmatch
follow the kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-08-02 16:15:57 -03:00
chao.an
72abd300e6 system/dumpstack: add dump stack tool support
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-08-01 23:56:36 -07:00
Nakamura, Yuuichi (ITDD)
f6dfd1dbb2 system/trace: Fix trace output for the correct display in Trace Compass 2021-08-01 08:43:24 -07:00
SPRESENSE
6367449751 system/embedlog: Fix sed command usage for macOS
The `sed` command only with `-i` option has not been supported
on macOS platform, and so it causes build error on macOS.
Fix Makefile so that it passes on all platforms without using
`-i` option.
2021-07-29 10:07:22 +02:00
Oleg
51c778bc5c system/cu: fix setting termios with parity
clear only the bits in c_cflag that will be set by cu
2021-07-19 03:06:57 -07:00
Xiang Xiao
ca70e585b1 system/nxlooper: Fix the following compiler warning
nxlooper.c: In function 'nxlooper_opendevice':
Error: nxlooper.c:126:15: error: unused variable 'x' [-Werror=unused-variable]
  126 |       uint8_t x;
      |               ^
Error: nxlooper.c:125:15: error: unused variable 'supported' [-Werror=unused-variable]
  125 |       uint8_t supported = true;
      |               ^~~~~~~~~
In file included from nxlooper.c:40:
nxlooper.c: In function 'nxlooper_loopthread':
Error: nxlooper.c:482:15: error: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Werror=format=]
  482 |       audinfo("message received size %d id%d\n", size, msg.msg_id);
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  ~~~~
      |                                                  |
      |                                                  ssize_t {aka long int}
nxlooper.c:482:39: note: format string is defined here
  482 |       audinfo("message received size %d id%d\n", size, msg.msg_id);
      |                                      ~^
      |                                       |
      |                                       int
      |                                      %ld
cc1: all warnings being treated as errors
make[3]: *** [/github/workspace/sources/apps/Application.mk:133: nxlooper.c.github.workspace.sources.apps.system.nxlooper.o] Error 1
nxlooper_main.c: In function 'nxlooper_cmd_loopback':
Error: nxlooper_main.c:209:9: error: implicit declaration of function 'nxlooper_loopraw'; did you mean 'nxlooper_stop'? [-Werror=implicit-function-declaration]
  209 |   ret = nxlooper_loopraw(plooper, channels, bpsamp,
      |         ^~~~~~~~~~~~~~~~
      |         nxlooper_stop

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-07-10 07:45:42 -03:00
ligd
192cbd8717 system/critmon: add thread run time support
Change-Id: I272a38f29a9aad3267052ce94643bbd73c8753a9
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-07-03 01:51:29 -05:00
chao.an
c89e9330cc system/ping[6]: correct the ping return value
MIRTOS-421

Change-Id: I68d8328ead736cd557d6142f611fae0540f74c1b
Signed-off-by: chao.an <anchao@xiaomi.com>
2021-06-22 10:28:21 -03:00
Peter Bee
8b66a6238a apps/system: fix command history behavior (2)
N/A
Fixing "last command" misbehavior when one command in history is a
substring of another.

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
Change-Id: I1ea205e3f2461b6c2377147cb9fc878ba5b19b4f
2021-06-22 10:27:43 -03:00
Xiang Xiao
01f8bef2ba system/critmon: print info before sleep
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-20 07:05:44 -07:00
ligd
696c6f412e system/critmon: add critmon program for critmon once
Change-Id: Ifc1f384ad5321d23030aaa5e424627f5d8ae0484
Signed-off-by: ligd <liguiding1@xiaomi.com>
2021-06-20 07:05:44 -07:00
YAMAMOTO Takashi
d46b477e2c argtable3: Workaroud a clang warning
cf. 7704006f3c
2021-06-17 07:21:52 +02:00
Alin Jerpelea
01532a45d6 system: fix relative path CI error
error: Path relative to repository other than nuttx must begin with the root directory
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-16 09:03:06 -05:00
Xiang Xiao
99e1674912 Call posix_spawn with filename as the first argv entry
pair with the kernel side change to follow the standard defintion:
https://pubs.opengroup.org/onlinepubs/009695399/functions/posix_spawn.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-14 07:12:54 -06:00
Alin Jerpelea
aa581fe5ce system: nxstyle fixes
fixes for errors reported by the nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Alin Jerpelea
84e0ca1310 system: update licenses to Apache
Gregory Nutt is has submitted the SGA

Ken Pettit has submitted the ICLA

David S. Alessio has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-11 02:42:05 -05:00
Xiang Xiao
d9c1c5bbc8 Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-08 13:04:34 -07:00
Alin Jerpelea
1e88c73107 Makefile: Ken Pettit: update licenses to Apache
Gregory Nutt is has submitted the SGA

Ken Pettit has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
55364e92a8 Makefile: Uros Platise: update licenses to Apache
Gregory Nutt is has submitted the SGA

Uros Platise has submitted the ICLA

as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Alin Jerpelea
ec339bc49a Makefiles: Gregory Nutt: update licenses to Apache
Gregory Nutt is the copyright holder for those files and he has submitted the
SGA as a result we can migrate the licenses to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-06-07 21:35:33 -05:00
Xiang Xiao
58293abb8e Follow up task_spawn change from kernel side
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-06-01 12:45:26 +09:00
Xiang Xiao
213e60232f Include assert.h in necessary place
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-31 08:51:22 +02:00
Gustavo Henrique Nihei
b843486386 readline: Reset offset when top command is issued repeateadly 2021-05-24 22:01:21 -05:00
Xiang Xiao
82ed7bf5b1 Include debug.h for xerr/xinfo/xwarn caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 19:52:54 +09:00
Xiang Xiao
1ee948e0c8 Include assert.h for DEBUGASSERT caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:34:37 +09:00
Xiang Xiao
d3f8f423d5 Include debug.h for xerr/xinfo/xwarn caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-24 12:33:17 +09:00
Michał Łyszczek
19e2ffe37e system/psmq: update to v0.2.1
This release breaks API and ABI by making use of library way
easier and more safe. No app in a nuttx tree uses psmq, so
nothing in-tree will be broken by this change.

Updated license files to Apache 2.0.

Tested on nucleo-f091

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>
2021-05-23 23:57:25 +01:00
jturnsek
6b53a1959b Arrow keys not working when in INSERT mode 2021-05-20 04:23:10 -05:00
Xiang Xiao
7ef50558ab system/system: Include errno.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-05-20 08:42:05 +01:00
Michał Łyszczek
ccc8ddaf5d system/embedlog: update to v0.6.0
Changes from v0.4.0
- add thread safety code
- add option to print function info (name) in logs
- abi/api stabilization
- bug fixes + increased reliability

Signed-off-by: Michał Łyszczek <michal.lyszczek@bofc.pl>

---
v1 -> v2 [suggested by Brennan Ashton]
 - fix path to embedlog_main.c in header comment
 - change license from bsd3 to apache2.0
2021-05-16 11:30:29 -03:00
Simon Piriou
e4db4df673 system: adb: fix shell service
Fix wrong dup2 return value check after:
fs: file_dup2 shouldn't hold the file list lock
1e5bfa623aa93b918566e8dc0e2f9c1a1037f45e

Fix issue in adb shell introduced in:
nsh: Pass the correct command lines to nsh_consolemain
6aca60133c
2021-05-08 22:51:25 -07:00
Gustavo Henrique Nihei
73a8c65ec9 system/spi: Adopt CPHA as the abbreviation for clock phase 2021-05-06 00:24:43 -07:00
Gustavo Henrique Nihei
5b26068635 system/spi: Fix NxStyle issues 2021-04-27 02:29:45 -05:00
Gustavo Henrique Nihei
63d59b0acf system/spi: Print sent data in the same way as received.
This eases the comparison for testing SPI with looped back MOSI and MISO
signals.
2021-04-27 02:29:45 -05:00
Xiang Xiao
52d853e642 system/nxplayer: Fix error: 'outstanding' undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2021-03-29 01:46:29 -07:00
Gustavo Henrique Nihei
6f75c1b3d6 system/i2c: Add command for resetting an I2C bus 2021-03-12 11:08:09 +08:00
Gustavo Henrique Nihei
f7e9d09566 system/i2c: Fix nxstyle issues 2021-02-23 08:49:19 -08:00
Gustavo Henrique Nihei
f167754743 system/i2c: Fix typo in "repetitions" word 2021-02-23 08:49:19 -08:00
YAMAMOTO Takashi
a63bdcbacb system/ntpc: Add ntpcstatus command
An example output:

    nsh> ntpcstatus
    The number of last samples: 5
    [0] srv 178.16.23.50 offset -0.014006560 delay 0.349967444
    [1] srv 5.9.57.158 offset 0.001792161 delay 0.269991633
    [2] srv 206.75.147.25 offset 0.009916600 delay 0.129989672
    [3] srv 162.159.200.1 offset 0.011508908 delay 0.019917401
    [4] srv 185.19.184.35 offset 0.021468135 delay 0.239915030
    nsh>
2021-02-20 01:30:55 -08:00