Commit Graph

1035 Commits

Author SHA1 Message Date
yinshengkai
5a0bc863dd setlogmask: fix uncloseed handle
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-28 17:09:18 +03:00
liaoao
1243c0ba4d libfdt: modify makefile
update LIBFDT to LIBC_FDT
move version_gen.h and place it under nuttx/libs/libc/fdt/
change include path to nuttx/libs/libc/fdt/dtc/

Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-26 17:06:55 +08:00
xuxin19
a091b91d83 cmake:replace custom_patch_target with PATCH_COMMAND
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2023-08-24 17:49:12 +02:00
chao an
8aa3c1e4b9 system/libuv: export GCCVER to environment
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-24 20:49:22 +08:00
chao an
77e6c39cbd system/libuv: strict GCC version check from GCC-12.2 to GCC-12
Toolchain related detection errors are still not resolved on GCC-12.3

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-23 23:51:14 +08:00
Petro Karashchenko
189d0c803f net/ip: print ip addresses using ip4_addrN macro
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2023-08-22 01:36:42 +08:00
Xiang Xiao
054cf3b1cb Change all sizeof(arr)/sizeof(arr[0]) to nitems
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-17 22:51:51 +03:00
huangkai8
323c16a5fb Wrong start and end values would make dead cycle. Exchange the values when start value is bigger than end value. 2023-08-16 20:20:03 +03:00
fengxuesong
3f556c8df4 Fix the bug of i2c_dev
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-08-14 13:40:15 +08:00
fengxuesong
c6ee7baca7 Fix the bug of i2c_bus
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-08-14 13:40:15 +08:00
wanggang26
eb815c48d7 ofloader: startup ofloader directly
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-08-14 13:39:42 +08:00
huxiandong
5a4e9e4389 nxrecorder: mode is required when oflags include O_CREAT or O_WRONLY
Refer -- fs_open.c:
/* If the file is opened for creation, then get the mode bits */

  if ((oflags & (O_WRONLY | O_CREAT)) != 0)
    {
      mode = va_arg(ap, mode_t);
    }

Signed-off-by: huxiandong <huxiandong@xiaomi.com>
2023-08-12 01:11:35 +08:00
yinshengkai
bdc522bad7 trace: move trace_dump to noteram
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:52:12 +08:00
yinshengkai
95b0515c30 trace: unify ftrace and atrace output formats
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-11 13:52:12 +08:00
fengxuesong
fad26cb3ae Add function is missing FAR
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-08-11 13:50:38 +08:00
yangsen5
78792120cd nxcamera: Solve compilation errors caused by type mismatch
CC:  nxcamera.c nxcamera.c: In function 'show_image':
nxcamera.c:85:20: error: initialization of 'uint32_t *' {aka 'unsigned int *'} from incompatible pointer type 'uint8_t *' {aka 'unsigned char *'} [-Werror=incompatible-pointer-types]
   85 |   uint32_t *pbuf = pcam->bufs[buf->index];
      |                    ^~~~
cc1: all warnings being treated as errors

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-11 13:50:28 +08:00
liaoao
126faafb6e fdttools: add fdt utility tools
Signed-off-by: liaoao <liaoao@xiaomi.com>
2023-08-10 20:39:11 +08:00
jinxudong
6bea926ef2 sensor: add force sensor
A sensor of this type measures the force on it, and additionally
compares the force with one or more specified thresholds. The sensor
can output the force value directly. Moreover, it's usually applied
as a press key. In that case, when it detects a force greater than
some given threshold, a corresponding event is reported.

Signed-off-by: jinxudong <jinxudong@xiaomi.com>
2023-08-10 03:33:22 +08:00
haopengxiang
bdedf648c5 uorb/topics: update delicated match of listener topics
bug: if user input obr_topic is sensor_gps_sate(wrong topic, which does not exist), the using of `strncmp` will assign idx=8 (as sesnor_gps) in the first.

However, there is no match in the `g_sensor_list`, hence idx=8 will give  out value of `sensor_gps` as output(wrong).

Change: This update aims to match the whole value of sensor name in `g_sensor_list`, while keeping `sensor_name+number` match in this condition.

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
haopengxiang
6b5038ef7a uorb/sensor/gps: fix uorinfo_raw print error
[   15.979300] [24] [  INFO] [ap] sensor_gps_satellite: timestamp: 15979200 (100 us ago)
[   15.979400] [24] [  INFO] [ap] sensor_gps_satellite: number:0 svid: 13elevation: 54azimuth: 253 snr: 0
[   15.979600] [24] [  INFO] [ap] sensor_gps_satellite: number:1 svid: 21elevation: 43azimuth: 77 snr: 0
[   15.979700] [24] [  INFO] [ap] sensor_gps_satellite: number:2 svid: 22elevation: 9azimuth: 35 snr: 0
[   15.979800] [24] [  INFO] [ap] sensor_gps_satellite: number:3 svid: 23elevation: 23azimuth: 268 snr: 0

Signed-off-by: haopengxiang <haopengxiang@xiaomi.com>
2023-08-10 02:01:09 +08:00
zhangyuan21
7dcb0c79c3 adb: add adb log level
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-10 00:50:50 +08:00
chenxiaoyi
0c6016475b system: dd: add standalone dd command
enabling SYSTEM_DD will disable nsh_dd by selecting NSH_DISABLE_DD

Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-08-09 20:59:40 +08:00
yangsen5
4d2fb8a6cf nxcamera: Add logic to convert to rgb565
Since the current fb display format of vela qemu is rgb565, it is necessary to convert the frame obtained by v4l2 to rgb565

Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-09 18:22:39 +08:00
chao an
3b2b73de88 coredump/priority: Increase the default priority of coredump to 254
Increase coredump priority to avoid unnecessary task switch during dump

Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-09 15:00:45 +08:00
fengxuesong
2909e8d7a0 Add function missing FAR information
Signed-off-by: fengxuesong <fengxuesong@xiaomi.com>
2023-08-09 14:47:00 +08:00
shipei
5aaf4136bf nxplayer:add sbc simple parser in nxplayer
Usage:
device /dev/audio/compress0p
play /data/test.sbc

This function requires the platform to support compress decoding and playback

Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-08 21:41:15 +08:00
zhangyuan21
987cb1ebd9 adb: support adb boardctl when not composite device
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-08 00:11:54 -07:00
chenrun1
5645b82b74 memorystress:Fix some warnings and make the index randomized.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-03 10:55:12 -07:00
chenrun1
4a78dedbae memorystress:For pressure detection of memory stability
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-03 10:55:12 -07:00
wanggang26
ccd6aec427 ofloader: fix warning and typo
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2023-08-01 23:22:52 -07:00
anjiahao
d0ad047f81 support openflashloader for nuttx
wiki:https://wiki.segger.com/SEGGER_Flash_Loader

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-01 23:22:52 -07:00
simbit18
85988dc77f Fix nuttx coding style
Remove TABs
2023-08-01 23:10:32 -07:00
anjiahao
c08feedcfd ymodem:fix compile warnings
rb_main.c:219:42: warning: 'snprintf' output may be truncated before the last format character [-Wformat-truncation=]
  219 |           snprintf(temp, PATH_MAX, "%s/%s", priv->foldname,

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-30 01:20:36 -07:00
anjiahao
55b0d4a110 ymodem:support sbrb.py use serial to transport
Get help to use ./sbrb.py -h
./sbrb.py -h
usage: sbrb.py [-h] [-k KBLOCKSIZE] [-t TTY] [-b BAUDRATE] [-r [RECVFROM ...]] [-s SENDTO] [--debug DEBUG] [filelist ...]

positional arguments:
  filelist              if filelist is valid, that is sb, else is rb

options:
  -h, --help            show this help message and exit
  -k KBLOCKSIZE, --kblocksize KBLOCKSIZE
                        This opthin can set a customsize block size to transfer
  -t TTY, --tty TTY     Serial path
  -b BAUDRATE, --baudrate BAUDRATE
  -r [RECVFROM ...], --recvfrom [RECVFROM ...]
                        recvfile from board path like this: ./sbrb.py -r <file1 [file2 [file 3]...]> -t /dev/ttyUBS0
  -s SENDTO, --sendto SENDTO
                        send file to board path like this: ./sbrb.py -s <path on board> -t /dev/ttyUBS0 <file1 [file2 [file3] ...]>
  --debug DEBUG         This opthin is save debug log on host

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-30 01:20:36 -07:00
anjiahao
8fd4b4d45b ymodem:fix ymodem bug
1.Timeout processing
2.clear error count when received successfully once
3.fix the bug of insufficient header memory application

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-30 01:20:36 -07:00
dongjiuzhu1
e86f6c12a5 system/popen: support r+, w+ mode
The standard popen uses the pipeline internally, so the stream
returned by it can only support read-only or write-only.
Now this patch is expanded through sockpair, which can support both
read and write. Therefore, we can use the stream to read and write
access this task (posix_spawn start).

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-29 20:29:54 -07:00
dongjiuzhu1
718fcfac1e system/uorb: Solve the problem of wrong use of return value
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 21:51:10 -07:00
zhangyuan21
7277a48482 uorb: Avoiding GCC VCVT Issue When MVE is Enabled
https: //sourceware.org/git/?p=binutils-gdb.git;a=commit;h=656412a7a4da0aef43ead1ea976ba0235a7ec30a

Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-07-28 21:49:58 -07:00
dongjiuzhu1
78590a55ea system/uorb: Support frequency less than 1hz
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 21:49:58 -07:00
chao an
c0707b5fc3 system/artable3: add cmake build support
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-25 10:48:01 +02:00
chenrun1
10baddee07 system/cachespeed:Modifying kconfig depends on
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-20 01:42:38 +08:00
chenrun1
d0349a3bd4 system/cachespeed:Optimize the number of tests
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-20 01:42:38 +08:00
chenrun1
f3b1ac089b system/cachespeed:Redesign of the overall test tool.
Compared to the previous version, the following factors have been taken into account in the new version of cachespeed:
1. the user needs to care about getting a piece of available memory (even if this piece of memory may memory stomp during use)
2. High repetition of test code, poor readability, and overall high test coupling
3. Not taking into account the alignment cache line situation
4. When comparing values between different test tools, there is a little error because of the different ways to get the values (different fine reading)
Therefore, in the new version according to the above problems have been improved:
1. Provide a "test_skeleton", which contains the overall testing process
2. The user only needs to execute, not to care about how to get the available memory address, and the memory allocated by the program also ensures the memory security and data accuracy
3. The system to obtain the data required for the test reduces the difficulty of use and the possibility of inaccurate results due to data errors.
4. Provide two kinds of precision data results, which can be configured through Kconfig
5. Optimize the output log, now more intuitive and concise, to help the subsequent data organization and observation
6. New test items for aligned/unaligned cache line
7. Better readability and extensibility, making it easier to add/remove test items

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-07-20 01:42:38 +08:00
Lucas Saavedra Vaz
6f56e69a14 system/nxdiag: Fix race condition during build
This commit fixed a race condition that might happen by only unshallowing the Espressif HAL only after it was completely cloned.
2023-07-18 23:43:29 +08:00
chao an
7cfcb49213 cmake/apps: add more applications into cmake support
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-13 19:00:18 +02:00
anjiahao
73b888869b gdbstub:Support a general gdbstub, support serial port and network link
Partially implement the gdb rsp protocol,
you can debug the nuttx kernel through the serial port or the network

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-13 19:31:57 +08:00
yinshengkai
a7c6b20e89 syste/setlogmask: add syslog channel filtering function
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-07-13 00:47:23 +08:00
chao an
4d79a5cbaf add initial cmake build system
Co-authored-by: Daniel Agar <daniel@agar.ca>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-07-08 13:52:02 +08:00
fangxinyong
7faebbd425 libuv: fix compile warning
CC:  pthread/pthread_mutexinconsistent.c libuv/src/unix/getaddrinfo.c:103:9: warning: implicit declaration of function ‘getaddrinfo’; did you mean ‘uv_getaddrinfo’? [-Wimplicit-function-declaration]
  103 |   err = getaddrinfo(req->hostname, req->service, req->hints, &req->addrinfo);
      |         ^~~~~~~~~~~
      |         uv_getaddrinfo
libuv/src/unix/getaddrinfo.c: In function ‘uv_freeaddrinfo’:
libuv/src/unix/getaddrinfo.c:222:5: warning: implicit declaration of function ‘freeaddrinfo’; did you mean ‘uv_freeaddrinfo’? [-Wimplicit-function-declaration]
  222 |     freeaddrinfo(ai);
      |     ^~~~~~~~~~~~
      |     uv_freeaddrinfo
CC:  misc/lib_crc16ccitt.c libuv/src/unix/getnameinfo.c: In function ‘uv__getnameinfo_work’:
libuv/src/unix/getnameinfo.c:45:9: warning: implicit declaration of function ‘getnameinfo’; did you mean ‘uv_getnameinfo’? [-Wimplicit-function-declaration]
   45 |   err = getnameinfo((struct sockaddr*) &req->storage,
      |         ^~~~~~~~~~~
      |         uv_getnameinfo

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2023-07-01 13:27:02 +08:00
Lucas Saavedra Vaz
7bfd623616 system/nxdiag: Add Espressif's HAL version
Adds the currently used ESP HAL version to NXdiag's output.
2023-06-29 00:57:53 +08:00