dongjiuzhu1
8b6e63c22d
libuv: default select epoll backend in libuv
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-15 10:32:08 +08:00
wangming9
8ed046e2d6
apps/benchmarks/dhrystone: Fix compilation errors
...
Error details:
dhrystone/v2.2/dry.c:714:3: error: 'Int_2_Loc' may be used uninitialized [-Werror=maybe-uninitialized]
714 | fprintf (stderr, "Int_2_Loc: %d\n", Int_2_Loc);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dhrystone/v2.2/dry.c:543:25: note: 'Int_2_Loc' was declared here
543 | REG One_Fifty Int_2_Loc;
| ^~~~~~~~~
Signed-off-by: wangming9 <wangming9@xiaomi.com>
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-15 10:31:14 +08:00
chenrun1
bb957498cc
cjson_test:add define CONFIG_CJSON_NESTING_LIMIT
...
Summary:
Added a limit to CJSON_NESTING_LIMIT. The default value is 1000, which can cause stack overflow in some test cases.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2024-10-15 00:57:11 +08:00
ligd
0e8a6ee2d2
Revert "add test for longjump with 0 as return value"
...
This reverts commit 63542f83c2985723071ae7e428311213008aa108.
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-14 13:31:47 +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
raiden00pl
d9cc2c29f2
github/issue: update bug report template
...
update bug report template issue so that it better reflects the nuttx-apps repo
2024-10-13 23:30:08 +08:00
raiden00pl
f7f4f77e2e
github: add auto labeler for PR
...
this commit adds initial support for auto labeler for PR
based on https://github.com/actions/labeler
2024-10-13 23:30:08 +08:00
wangjianyu3
2bfe2c2ed0
nshlib: Fix a typo error of redirect
...
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-10-13 15:48:57 +08:00
wangjianyu3
0f5a786347
nshlib: Fix stack-buffer-overflow of nsh_redirect()
...
Board/Config/Command
sim:nsh
cat < /etc/init.d/rc.sysinit
Problem
The NSH hangs after exec the test command.
`nsh_redirect()` needs to save three fd but array length is only two, stack buffer overflowed!
Related: https://github.com/apache/nuttx-apps/pull/2469
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-10-13 15:48:57 +08:00
buxiasen
2429b2ef6a
ramspeed: fix -r -w parameter ignored, report align issue
...
We may want to test ramspeed by specific address, it was previous ignored,
and for the not aligned address from user, just report a error.
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-10-13 11:44:58 +08:00
Gao Jiawei
63542f83c2
add test for longjump with 0 as return value
...
Signed-off-by: Gao Jiawei <gaojiawei@xiaomi.com>
2024-10-13 10:50:58 +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
yinshengkai
524eb0880f
osperf: changes irq_t to irqstat_t
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 10:49:05 +08:00
yinshengkai
dbef7b5f85
examples: fix usrsocktest compiler warning
...
error: variable 'ret' set but not used [-Werror=unused-but-set-variable]
112 | int ret;
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 10:35:20 +08:00
yinshengkai
427b107dac
quickjs: fix mp_mul multiple definition
...
in function `mp_mul':
apps/interpreters/quickjs/quickjs/libbf.c:1179: multiple definition of `mp_mul';
nuttx/staging/libapps.a:apps/math/libtommath/libtommath/bn_mp_mul.c:8: first defined here
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-13 10:34:43 +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
Marco Casaroli
bc19db2c78
ci: use venv for check
...
To avoid the following CI error:
This environment is externally managed
--> To install Python packages system-wide, try apt install
python3-xyz, where xyz is the package you are trying to
install.
If you wish to install a non-Debian-packaged Python package,
create a virtual environment using python3 -m venv path/to/venv.
Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
sure you have python3-full installed.
If you wish to install a non-Debian packaged Python application,
it may be easiest to use pipx install xyz, which will manage a
virtual environment for you. Make sure you have pipx installed.
See /usr/share/doc/python3.12/README.venv for more information.
2024-10-13 10:17:17 +08:00
xuxin19
131ff36842
build.yml:disable CMake Ninja for Msys2
...
CI in the msys2 environment, the CMake ninja generator
will have a problem with parameters being too long
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-10-13 00:39:30 +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
Yongrong Wang
67fa0e89ff
driverteset_block.c: Reduce the stack consumption
...
1. By reducing the use of local variables geometry
2. Use structure pre_build_s pointers instead of using the
structure directly
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2024-10-12 10:36:20 +08:00
likun17
3927b33237
examples/bmi160:bmi160 add urob mode example.
...
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-12 10:34:22 +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
d0a6dd40c4
coremark/Makefile: avoid crc function multiple definition
...
/data/project/oh2/rel-4.0/prebuilts/gcc/linux/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/ld: crc16_sw.c.data.project.oh2.rel-4.0.external.zblue.zblue_1.o (symbol from plugin): in function `crc16':
(.text+0x0): multiple definition of `crc16'; core_util.c.data.project.oh2.rel-4.0.apps.benchmarks.coremark_1.o (symbol from plugin):(.text+0x0): first defined here
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:32:58 +08:00
Bowen Wang
6ea8f70ca8
osperf/osperf: move close pipefd after pthread_join
...
Avoid the new thread write the closed pipe
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:32:27 +08:00
lipengfei28
f15ed311c0
wapi_json_load: the buf need add null character
...
sched_backtrace+0xd4/0xfffffffffff444e0
sched_dumpstack+0x5c/0xc50a0
_assert+0x1a0/0x11cf380
__assert+0x28/0x4ebd70
kasan_report+0x280/0x5b0
__asan_loadN+0x234/0xfffffffffffffac0
strlen+0x3c/0x838410
cJSON_Parse+0x38/0x1d0
wapi_json_load+0xc4/0x1c0
wapi_load_config+0x50/0x110600
netinit_associate+0x34/0xfffffffffffffe70
netinit_thread+0xbc/0x18ad0
pthread_startup+0x34/0x11660a0
pthread_start+0x84/0xfffffffffeea2520
If the buf no null character, the strlen acces buf maybe out of bounds
Signed-off-by: lipengfei28 <lipengfei28@xiaomi.com>
2024-10-11 19:26:44 +08:00
Bowen Wang
6f85062019
nshlib/nsh_parse: support use \" and \' to pass " and ' to arguments
...
Now we can pass symbol " and ' to the nsh command arguments
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 19:22:57 +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
e50627ecd6
apps/testing:Add c++ STL code size test case.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-11 18:31:14 +08:00
Neo Xu
d91e3db9fd
noteprintf: fix compile warnings
...
noteprintf_main.c:52:7: warning: unused variable 'binary' [-Wunused-variable]
52 | } binary =
Fix typo of sched.
Signed-off-by: Neo Xu <neo.xu1990@gmail.com>
2024-10-11 18:30:33 +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
Huang Qi
648e25bac1
examples/pipe: Enhance test by different r/w thread priority
...
By arranging and combining the priorities of read and write
threads to cover more usage scenarios.
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-10-11 18:20:29 +08:00
Bowen Wang
0b8a52379c
nsh_syscmds/rpmsg: include <nuttx/rpmsg/rpmsg.h> to fix compile error
...
nsh_syscmds.c: In function ‘cmd_rpmsg_once’:
nsh_syscmds.c:567:13: error: ‘RPMSGIOC_PANIC’ undeclared (first use in this function)
567 | cmd = RPMSGIOC_PANIC;
| ^~~~~~~~~~~~~~
nsh_syscmds.c:567:13: note: each undeclared identifier is reported only once for each function it appears in
nsh_syscmds.c:571:13: error: ‘RPMSGIOC_DUMP’ undeclared (first use in this function); did you mean ‘FIOC_DUMP’?
571 | cmd = RPMSGIOC_DUMP;
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 14:59:22 +08:00
Yongrong Wang
568310858b
nsh_syscmds.c: upadate rpmsg ping help
...
1. struct rpmsg_ping_s ack change to cmd;
2. Update the help descrption based on the new cmd
meaning;
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2024-10-11 14:59:22 +08:00
Lup Yuen Lee
eedd71f508
CI: Sync the Build Workflow from nuttx repo
...
This PR syncs the CI Build Workflow from `nuttx` repo to `nuttx-apps`, with the following updates:
- https://github.com/apache/nuttx/pull/13954
- https://github.com/apache/nuttx/pull/14011
- https://github.com/apache/nuttx/pull/14022
To follow the existing convention, `build.yml` from `nuttx` repo was slightly modified for `nuttx-apps`:
- All References to `apache/nuttx/.../arch.yml` were changed to `apache/nuttx-apps/.../arch.yml`
- Removed `pull_request > paths-ignore` and `push > paths-ignore`
2024-10-11 07:45:36 +02: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
Windrow14
6bebd1bea1
fsutils/mkmbr/mkmbr.c: fix null pointer access when not all device space is defined in mbr
...
argv[argn] is accessed out of range when there are neither four partitions are specified nor the last partition is of auto size.
Add a number of partition variable based on input argument number.
Signed-off-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
Reviewed-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
Reviewed-by: Jacky Cao <Jacky.Cao@sony.com>
Tested-by: Yinzhe Wu <Yinzhe.Wu@sony.com>
2024-10-10 02:24:58 +08:00
Alin Jerpelea
7cabf00380
canutils/libobd2: replace field ch_unused with ch_tcf
...
https://github.com/apache/nuttx-apps/pull/2635
replaced ch_unused with ch_tcf
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2024-10-10 02:24:20 +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
pengyiqiang
f1fc3616d0
testing/monkey: add screen offset config support
...
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-10-09 22:40:15 +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