1235 Commits

Author SHA1 Message Date
anjiahao
95368deae2 ymodem:fix bug,When sending a retransmission, HEAD is overwritten.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-29 18:02:20 +08:00
Leo Chung
c7a905ec0c apps/system/vi: Add missing vi_release before exit.
If VI exit without vi_release, that broken console.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2024-10-28 10:10:14 -03:00
Leo Chung
c0e04b0251 termcurses: Disable ICANON for serial driver. That was broken VI editor.
The ICANON flag broken VI key input, so disable it.

Signed-off-by: Leo Chung <gewalalb@gmail.com>
2024-10-28 10:10:14 -03:00
Xiang Xiao
e8497e5355 system/libuv: Sync CMakeLists.txt with Makefile
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-27 20:02:07 +08:00
Huang Qi
f9c6e18693 libuv: Don't select PIPES implicitly
To avoid introducing unexpected dependencies,
we should not select any feature implicitly.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-10-27 20:02:07 +08:00
Huang Qi
713cd4d971 libuv: Make stream read buffer size configurable
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-10-27 20:02:07 +08:00
dengwenqi
f7ff338a7b fix: git status/git status --ignore normalization check problem 2024-10-27 18:12:54 +08:00
xuxin19
55a955234a cmake:add system gprof CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-27 14:05:06 +08:00
renzhiyuan1
469cc11406 cmake:add flatbuffers CMake build
Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-27 14:05:06 +08:00
cuiziwei
729cc337a1 libuv: Remove GCCVER redefinition
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-19 18:55:01 +08:00
likun17
06181f0b00 uorb:Fixed the abnormal issue of printing uint16 with PRIu16.
The PRIu16 macro in the system is defined as "u", and "hu" is required.
In Linux and Nuttx, PRIu32 PRIu16 PRIu8 are all defined as "u", but %pB
prints the structure and needs its offset. %pB gets the offset through
sizeof(short int)

Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-18 19:56:58 +08:00
renzhiyuan1
71cbcb2618 Add configurations files.
Add configuration files of TFLite Micro, its dependent third-party libraries and CMSIS_NN.

Signed-off-by: renzhiyuan1 <renzhiyuan1@xiaomi.com>
2024-10-18 09:40:17 +08:00
wanggang26
cb24b748a5 coredump app: type of info->time has changed into timespec
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-17 08:55:22 +08:00
anjiahao
c98439f9a1 coredump:update memory region init
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 17:34:02 +08:00
pengyaozong
63f43e70a9 add LIBUV_HANDLE_BACKTRACE
Signed-off-by: pengyaozong <pengyaozong@xiaomi.com>
2024-10-16 14:30:34 +08:00
anjiahao
c693b3064e system/coredump:support coredump can save board memory
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 14:22:43 +08:00
anjiahao
9752b57714 system/coredump:upload kernal coredump change
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 14:22:43 +08:00
anjiahao
b99f92bac5 system/coredump:fix coverity bug
check read return, avoid dead loop if read return zero

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 14:22:43 +08:00
anjiahao
03f3ce7fd4 system/coredump:Increase coredump swap buffer size to improve speed
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 14:22:43 +08:00
Xiang Xiao
e96f1ca83a system/ymodem: Change #include <nuttx/mm/circbuf.h> to #include <nuttx/circbuf.h>
follow the change in kernel side change

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-16 14:20:34 +08:00
anjiahao
8130d7e211 zlib:Support using Kconfig to control memory usage in zlib
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-16 12:39:47 +08:00
ouyangxiangzhen
44d2250b6e apps: Fix compilation error after nuttx/arch.h excluded.
This patch fix compilation error after excluding nuttx/arch.h.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-16 07:12:40 +08:00
zhangwenjian
8e7d6cadf4 support filter for each note channel
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-15 12:34:09 +08:00
yinshengkai
bcbd092d3e trace: fix trace dump crash
After thread switching is triggered in an interrupt, two notes will be printed.
If the buffer of 256 is not enough, it will cause overflow.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-15 12:34:09 +08:00
yinshengkai
9c51919a1a libuv:add threadpool DEF_THREADPOOL_PRIORITY
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-15 10:32:08 +08:00
guohao15
be85fab47c libuv:Make libuv use epoll runable without fsnotify
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-15 10:32:08 +08:00
guohao15
ed91a3c03c libuv:change LIBUV_BACKEND_EPOLL depends on FS_NOTIFY
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-15 10:32:08 +08:00
guohao15
4e386a955e system/libuv: optimize stack usage
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-15 10:32:08 +08:00
guohao15
5891f7037b libuv:add inotify test for nuttx
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-10-15 10:32:08 +08:00
dongjiuzhu1
8b6e63c22d libuv: default select epoll backend in libuv
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-15 10:32:08 +08:00
Xiang Xiao
2eeb750055 Fix telnetd.c:57:5: error: 'CONFIG_SYSTEM_TELNETD_SESSION_STACKSIZE' undeclared
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-14 10:44:40 +08:00
yinshengkai
e9b457fca1 telnet: Configure the telnet session stack to be the same as nsh
Using the default 3K stack size will result in insufficient stack when executing certain commands.

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 10:49:46 +08:00
zhanghu5
5f3e3fe655 fix ECHO problem
only when devfd and stdfd both are tty, we call tcsetattr

Signed-off-by: zhanghu5 <zhanghu5@xiaomi.com>
2024-10-13 10:33:22 +08:00
getian
d874dc21d1 system/adb: Implement ADB function through qemu pipe (1/3)
Signed-off-by: getian <getian@xiaomi.com>
2024-10-12 10:43:11 +08:00
dongjiuzhu1
6116558842 system/adb: using inotify to check usb hotplug event
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-12 10:43:11 +08:00
dongjiuzhu1
7ab6704920 system/adb: add timer to check usb hotplug event
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-12 10:43:11 +08:00
likun17
af214c507a uORB:Fixed the problem that uorb output cannot wrap after deleting lib_libbsprintf automatic wrapping.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-12 10:38:50 +08:00
GUIDINGLI
b7261a0270 Revert "libuv: Remove GCCVER and add compilation options directly."
This reverts commit 13ce4707ffbf4bfb28b7a81b29c7adfeb917042b.
2024-10-11 21:44:13 +08:00
ligd
c4f3f05bfa lsan: add system cmd lsan support
The Alsans support for the LeakSanitizer (lsan) memory leak detection tool.

ref:
https://github.com/gcc-mirror/gcc/blob/master/libsanitizer/include/sanitizer/lsan_interface.h

This tool used for runtime check memleak on the SIM platfrom.

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-11 19:39:42 +08:00
Bowen Wang
048f9d7720 system/system: add config SYSTEM_SYSTEM_DUMPINFO
In some cases, applicationes use system() to excute the nsh command,
but it's hard to find out who used the system function to execute
the nsh command, so  add this config to print the call backtrace and
the command content.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:21:41 +08:00
zhangkai25
3fef38c96d Fix issue with return value not being checked
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-10-11 18:35:27 +08:00
cuiziwei
13ce4707ff libuv: Remove GCCVER and add compilation options directly.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 18:29:40 +08:00
zhangwenjian
9003110d7f libc:getline support backspace
Signed-off-by: zhangwenjian <zhangwenjian@xiaomi.com>
2024-10-11 03:02:23 +08:00
shizhenghui
de8fae7119 nxcodec: fix build warning
nxcodec_main.c:143:37: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 2 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  143 |             printf("nxcodec size: %lux%lu\n",
      |                                   ~~^
      |                                     |
      |                                     long unsigned int
      |                                   %u
  144 |                    codec.output.format.fmt.pix.width,
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka unsigned int}
nxcodec_main.c:143:41: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint32_t’ {aka ‘unsigned int’} [-Wformat=]
  143 |             printf("nxcodec size: %lux%lu\n",
      |                                       ~~^
      |                                         |
      |                                         long unsigned int
      |                                       %u
  144 |                    codec.output.format.fmt.pix.width,
  145 |                    codec.output.format.fmt.pix.height);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                               |
      |                                               uint32_t {aka unsigned int}

Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-10-11 01:28:51 +08:00
shizhenghui
8f50bf3867 nxcodec: add rich debugging logs
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-10-11 01:28:51 +08:00
yinshengkai
1b27b73a99 system/gprof: Support gprof tool
It can perform statistics on running hot spots or record function calls

arm-none-eabi-gprof nuttx/nuttx gmon.out -b
Flat profile:

Each sample counts as 0.001 seconds.
  %   cumulative   self              self     total
 time   seconds   seconds    calls   s/call   s/call  name
 66.41      3.55     3.55       43     0.08     0.08  sdelay
 33.44      5.34     1.79       44     0.04     0.04  delay
  0.07      5.34     0.00                             up_idle
  0.04      5.34     0.00                             nx_start
  0.02      5.34     0.00                             fdtdump_main
  0.02      5.34     0.00                             nxsem_wait
  0.00      5.34     0.00        1     0.00     5.34  hello_main
  0.00      5.34     0.00        1     0.00     0.00  singal_handler

granularity: each sample hit covers 4 byte(s) for 0.02% of 5.34 seconds

index % time    self  children    called     name
                0.00    5.34       1/1           nxtask_startup [2]
[1]     99.9    0.00    5.34       1         hello_main [1]
                3.55    0.00      43/43          sdelay [3]
                1.79    0.00      44/44          delay [4]
-----------------------------------------------
                                                 <spontaneous>
[2]     99.9    0.00    5.34                 nxtask_startup [2]
                0.00    5.34       1/1           hello_main [1]
-----------------------------------------------
                3.55    0.00      43/43          hello_main [1]
[3]     66.4    3.55    0.00      43         sdelay [3]
-----------------------------------------------
                1.79    0.00      44/44          hello_main [1]
[4]     33.4    1.79    0.00      44         delay [4]
-----------------------------------------------
                                                 <spontaneous>
[5]      0.1    0.00    0.00                 up_idle [5]
-----------------------------------------------
                                                 <spontaneous>
[6]      0.0    0.00    0.00                 nx_start [6]
-----------------------------------------------
                                                 <spontaneous>
[7]      0.0    0.00    0.00                 fdtdump_main [7]
-----------------------------------------------
                                                 <spontaneous>
[8]      0.0    0.00    0.00                 nxsem_wait [8]
-----------------------------------------------
                0.00    0.00       1/1           nxsig_deliver [3553]
[9]      0.0    0.00    0.00       1         singal_handler [9]
-----------------------------------------------

Index by function name

   [4] delay                   [6] nx_start                [9] singal_handler
   [7] fdtdump_main            [8] nxsem_wait              [5] up_idle
   [1] hello_main              [3] sdelay

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 23:16:13 +08:00
wangmingrong1
a2964c744d gcov.c: deal compile warming
gcov.c:61:6: warning: 'path' may be used uninitialized [-Wmaybe-uninitialized]
   61 |   if (path == NULL || access(path, F_OK) != 0 || atoi(strip) <= 0)
      |      ^
gcov.c: In function 'gcov_main':
gcov.c:79:19: note: 'path' was declared here
   79 |   FAR const char *path;

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-09 21:27:35 +08:00
yinshengkai
aa9d69e224 system: adjust gcov configuration name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 21:27:35 +08:00
yinshengkai
0f74de57cf system/gcov: supports generating device-side code coverage
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-09 21:27:35 +08:00
xuxin19
faea166566 cmake:add system cdcacm/critmom/stackmonitor missing CMake scripts
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-09 20:15:49 +08:00