Commit Graph

7690 Commits

Author SHA1 Message Date
dongjiuzhu1
433ca0ff89 testing/fftest: add Force feedback driver test
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-09 14:16:16 +08:00
Huang Qi
2f5dc9c24d system: Rename debug to debugpoint
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 21:41:23 +08:00
Huang Qi
c7c76534af testing/debug: Enhancement for watch address by cmd line
This patch add some command line arguments for debug
program, then you can use it to insert watchpoint or
breakpoint to arbitrary address at runtime.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-08 10:39:37 +08:00
ligd
142df1a001 ltp: handle low accuracy of time in some platfrom
some platform use TICK to calculate the time, for example
1tick = 1ms, when the test may run less then 1ms, then gettime()
before + sleep = after

Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-07 17:10:48 -03:00
Fukui Daichi
982636ac4a benchmark: Build osperf only when pipes and hpwork are enabled
Building osperf requires pipes and hpwork, which are disabled
by default. These features should be enabled before osperf is
built. The select directive could cause issues and should be
avoided, so we use the depends on directive.

Signed-off-by: Fukui Daichi <a.dog.will.talk@akane.waseda.jp>
2024-09-05 13:52:35 +08:00
wangmingrong
396290962f tests: add kasan test
-u: This option is used to test the use of freed memory
-h: This option is used to test heap memory out-of-bounds access errors.
-g: This option is used to test global variables for out-of-bounds access errors.
-s: This option is used to test the Memory Stampede phenomenon.

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-09-05 09:51:06 +08:00
chao an
8ad39537dd nshlib: move g_builtin_prompt from data to rodata
1. move g_builtin_prompt from data to rodata
2. add g_ prefix to some global variables

Signed-off-by: chao an <anchao@lixiang.com>
2024-09-05 09:49:44 +08:00
hujun5
0b26b04081 ostest: smp_call only valid in FLAT BUILD
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2024-09-05 09:47:53 +08:00
Tim Hardisty
4ebd68f7d8 Update settings.c 2024-08-30 21:29:50 +08:00
raiden00pl
d71046c139 examples/nimble: fix example after update to latest master
this example is broken since bc68d954a

since bf76183741
ble_hci_sock_init is called from nimble code, so we can't call it again in example code
2024-08-30 21:29:25 +08:00
renjianguang
246d1d0225 system/nxrecorder: Add opus support in nxrecorder.
Signed-off-by: renjianguang <renjianguang@xiaomi.com>
2024-08-30 01:25:16 +08:00
wurui3
cc17167c7a system/nxrecorder: Add mp3 support in nxrecorder.
add mp3 support in nxrecorder and improve code.

Signed-off-by: wurui3 <wurui3@xiaomi.com>
2024-08-30 01:25:16 +08:00
Michal Lenc
75d5f63f14 can: add support for FD frames if FD mode is configured
This enhances can example application with the possibility to send
CAN FD frames if FD mode is configured. Both EDL and BRS flags are
now correctly set with the latter one configurable with application's
arguments. Also data bytes are now correctly switched to DLC.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2024-08-30 01:16:04 +08:00
fangpeina
93348ca1ca system/uorb: fix err when using the -n 1 parameter
Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2024-08-27 22:08:31 +08:00
shizhenghui
fd40e25e67 lame: update CMakeLists.txt
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-08-27 22:08:13 +08:00
shizhenghui
cf4847c4fe libmad: Add download libmad.zip to CMakeLists.txt
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-08-27 22:08:13 +08:00
yezhonghui
01964c6460 pci: add pcitest tool
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2024-08-27 22:07:57 +08:00
jianglianfang
73f26ca084 fb: supported bpp = 24
Added new draw_rect24 function to support bpp=24 devices.

Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
2305255373 fb: select the FB_NO_OVERLAY because it will be showed on the main surface
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
009fc1a28a fix: uninitialized pointer read
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
jianglianfang
72e186f64a apps/examples: fb_main need ioctl(FBIOPAN_DISPLAY) to update and adapt to double buffer mode.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2024-08-27 02:46:41 +08:00
gaohedong
481d4b6e23 can: Merge netpacket/can.h into nuttx/can.h
This patch is associated with 'https://github.com/apache/nuttx/pull/13048', so it cannot be verified separately by CI. Please help to associate and review it. Thank you!

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2024-08-26 05:05:41 -04:00
Matheus Catarino
89dd0c29e2 Zig & D examples clean & refactor
dlang: use importC to get NuttX include
zig: leds_zig added
2024-08-26 10:22:16 +08:00
meijian
c91a1817aa netlib/setroute: fix dhcpd stack-overflow when calls netlib_set_dripv4addr with debug info-level
Signed-off-by: meijian <meijian@xiaomi.com>
2024-08-26 01:54:46 +08:00
buxiasen
05def1befc testing: add case for irqprio, should only work with qemu MPS2_AN500
MPS2_AN500 have UART1,2,3,4, TIMER0,1, is a great board to do irqprio
test.
enable CONFIG_ARCH_IRQPRIO, and use
'qemu-system-arm -M mps2-an500 -nographic -kernel nuttx.bin'
to lauch qemu

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-26 01:52:06 +08:00
zhangkai25
39d053ef74 apps/examples: Add test of edges counting at capture
Description: Add test of the function of counting cap edges

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-26 01:29:08 +08:00
zhangkai25
4e3f77d884 Fixed the problem of memory trampling caused by not initializing the structure
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-24 11:14:47 +08:00
wangzhi16
f638a21f89 [BugFix]Command "critmon" error
Command "critmon" has some format errors and information errors, such as:

PRE-EMPTION CALLER            CSECTION CALLER               RUN         TIME             PID   DESCRIPTION
1.679000000                   3.704000000
                         None None             0     CPU0 IDLE
0.002000000                   0.003000000
                         None None             1     CPU1 IDLE
0.000000000                   0.000000000
                         None None             2     CPU2 IDLE
0.000000000                   0.000000000
                         None None             3     CPU3 IDLE
0.001000000                   0.001000000
                         None None             4     hpwork
0.002000000                   0.006000000
                         None None             5     nsh_main
0.000000000                   0.000000000
                         None None             6     critmon

After bug fix:

PRE-EMPTION CALLER            CSECTION CALLER               RUN              TIME             PID   DESCRIPTION
None                          None                          ---------------- ---------------- ----  CPU 0
None                          None                          ---------------- ---------------- ----  CPU 1
None                          None                          ---------------- ---------------- ----  CPU 2
None                          None                          ---------------- ---------------- ----  CPU 3
None                          None                          0.238000000      6.982000000      0     CPU0 IDLE
None                          None                          0.461000000      13.089000000     1     CPU1 IDLE
None                          None                          0.000000000      0.000000000      2     CPU2 IDLE
None                          None                          0.000000000      0.000000000      3     CPU3 IDLE
None                          None                          0.000000000      0.001000000      4     hpwork
None                          None                          0.000000000      0.010000000      5     nsh_main
None                          None                          0.000000000      0.000000000      46    critmon

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2024-08-24 11:14:06 +08:00
zhangkai25
c2d478a93a apps/testing/drivertest_pwm.c: Fix apps/testing/drivertest_pwm.c compile_error
Description: Divide info.duty into two parts: multi-channel and single-channel

Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2024-08-24 11:13:42 +08:00
buxiasen
09b114e884 testing/cpuload: increase thread prio
make simulate load can be more accurate in normal business code.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
buxiasen
fdfb2b2804 cpuload: make load more accurate
The 10 times is too short and can only support 10% step, make cpuload
delay based on 100 times, can decrease the influence of sched cost.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
dulibo1
92b916ab47 cpuload:testing program compile error when use CONFIG_SCHED_CPULOAD_SYSCLK
log:
CC:  setjmp.c cpuload_main.c: In function ‘cpuload_main’:
cpuload_main.c:38:45: error: ‘CONFIG_SCHED_CPULOAD_TICKSPERSEC’ undeclared (first use in this function); did you mean ‘CONFIG_SCHED_CPULOAD_TIMECONSTANT’?
   38 | #define CPULOAD_US          (USEC_PER_SEC / CONFIG_SCHED_CPULOAD_TICKSPERSEC)
      |                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cpuload_main.c:42:35: note: in expansion of macro ‘CPULOAD_US’
   42 | #define CPULOAD_DELAY       (10 * CPULOAD_US)

Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2024-08-24 11:12:16 +08:00
guanyi
60aea922a5 [testcase] add driver pm testcase
Signed-off-by: guanyi <guanyi@xiaomi.com>
2024-08-24 11:08:54 +08:00
zhangshuai39
6d52a0fbc1 netutils/netlib: Encapsulate the dhcp configuration network code and modify at all calling locations
The DHCP configuration network code is called multiple times, so it is encapsulated

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2024-08-23 22:10:04 +08:00
chao an
054edfc653 testing/ostest: add nxevent test into ostest
Signed-off-by: chao an <anchao@lixiang.com>
2024-08-23 22:08:44 +08:00
Matheus Catarino
7c4590b818 hello_swift added
required: swift 6 (embedded module)
2024-08-23 09:04:31 +08:00
yinshengkai
d37b326cb1 ostest: delete the code that accesses the internal fields of mutex
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-08-23 01:41:35 +08:00
ssssenai
5e5f518822 testing/himem_test: Verify the creation of himem and read/write character devices,
read/write multi block character devices, etc.
2024-08-22 15:18:24 +08:00
shizhenghui
309f42ea21 apps: add lame Makefile & CMakeLists.txt
Signed-off-by: shizhenghui <shizhenghui@xiaomi.com>
2024-08-22 08:37:03 +02:00
Kevin Zhou
ab67cb1911 examples/usbserial: Check if usbserial device exist before register 2024-08-22 04:28:53 +02:00
yangjianqing
5a04b9a7c9 tcpdump:fix tcpdump stack overflow bug
Signed-off-by: yangjianqing <yangjianqing@xiaomi.com>
2024-08-22 01:28:27 +08:00
zhanghongyu
b883eb5929 mbedtls: fix build error when libcxx is enabled.
if  !defined(unix) && !defined(__unix) && !defined(__unix__) && \
    !defined(__APPLE__) && !defined(_WIN32) && !defined(__QNXNTO__) && \
    !defined(__HAIKU__) && !defined(__midipix__)
error
   "Platform entropy sources only work on Unix and Windows, see MBEDTLS_NO_PLATFORM_ENTROPY in mbedtls_config.h"

nuttx/libs/libxx/libcxx/include/__config
nuttx/libs/libxx/libcxx/include/limits.h:40,
apps/crypto/mbedtls/mbedtls/include/mbedtls/check_config.h:31,
apps/crypto/mbedtls/mbedtls/include/mbedtls/build_info.h:151,
apps/crypto/mbedtls/mbedtls/library/common.h:26,
apps/crypto/mbedtls/mbedtls/library/entropy_poll.c:25

if defined(__NuttX__)
undef __linux__
undef __APPLE__
undef __FreeBSD__
undef __GLIBC__
undef __NetBSD__
undef _WIN32
undef __sun__
undef _AIX
/ For the current use of the __unix__ macro in this library,
/ NuttX is not __unix__.
/ This might need to be revisited in future.
undef __unix__
endif

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-22 01:27:59 +08:00
zhanghongyu
a1dbc8f37d examples/telnetd: fix compile telnetd multi definition error
Compiling system/telnetd and examples/telnetd at the same time could not
generate two builtin commands, Because the name is the same, one will be
overwritten, but there will be no compilation errors.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2024-08-21 17:08:07 +08:00
guohao15
909ab76eae app:port stressapptest to nuttx
stressapptest is a userspace test, primarily composed of threads doing memory copies
and directIO disk read/write. It allocates a large block of memory (typically 85% of
the total memory on the machine), and each thread will choose randomized blocks of
memory to copy, or to write to disk. Typically there are two threads per processor,
and two threads for each disk. Result checking is done as the test proceeds by
CRCing the data as it is copied.
https://github.com/stressapptest/stressapptest

Signed-off-by: guohao15 <guohao15@xiaomi.com>
2024-08-21 17:07:52 +08:00
yangsen5
c4d97cd8f8 system/nxcamera: add CMakeLists.txt
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-08-21 04:27:17 +08:00
wangchen
4940303bd8 util.c:Add mode when creating files in the wapi_save_config
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2024-08-21 01:28:29 +08:00
cuiziwei
62e2011e48 apps/audioutils:Add libmad library.
libmad0-dev and libmad0-dev cannot be installed simultaneously, which causes conflicts when compiling sim m32 and sim m64. Therefore, the libmad library has been ported to apps/audioutils and will be compiled with NuttX.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-08-21 01:24:44 +08:00
liqinhui
c326677f7a netlib: Delete the redundancy code.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:24:29 +08:00
liqinhui
f4141998dd netlib: Use the netlib_add_ipv6addr to set the IPv6 address after obtaining the address.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2024-08-21 01:24:29 +08:00
Daniel Jasinski
7ff3bc4674 build: Fix rpserver and rpproxy CMake builds
argtable3 include directories are appended as NUTTX_INCLUDE_DIRECTORIES
property, symlink creation is no longer needed.

Signed-off-by: Daniel Jasinski <jasinskidaniel95szcz@gmail.com>
2024-08-20 11:25:48 -03:00