Commit Graph

1173 Commits

Author SHA1 Message Date
dulibo1
893ac88f97 batterydump:move to system dir
Signed-off-by: dulibo1 <dulibo1@xiaomi.com>
2024-10-25 16:13:30 +02:00
wangmingrong1
9aedfdd4f7 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-25 16:13:30 +02:00
yinshengkai
2b11886c9a system: adjust gcov configuration name
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-25 16:13:30 +02:00
yinshengkai
833b36cddc system/gcov: supports generating device-side code coverage
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-25 16:13:30 +02:00
dongjiuzhu1
de7bbc1b25 uorb/flush: support flush operation
After you call orb_flush(), you can determine whether the
flush is completed by listening to the POLLPRI event
of fd and getting the event in orb_get_events.

After calling orb_get_events, the flush events will be cleared.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
84e7a1d409 system/uORB: return subscibe latency/interval
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
9d7e023e65 system/uorb: add O_DIRECT to access sensor as wachers
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
2ae831f40d system/uORB: using lib_sprintf to output va_format and printf normal info in aosp adb shell
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
f0db02740b system/uorb: fix compile warning
1. add string.h becuase strlen in uORB.c
2. add inttypes.h becuase PRIu64/... in sensor/*.c

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
2933182cf6 system/uorb: fix compile warning
apps/system/uorb/listener.c:543:38:
warning: unused parameter 'file' [-Wunused-parameter]
                           FAR FILE *file)

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
83fc4e2aba system/uorb: fix memory leak report by coverity
nsh> uorb_unit_test
uORB note: try single-topic support
uORB note: PASS single-topic test
uORB note: PASS orb 10-instances
uORB note: try multi-topic support
uORB note: ---------------- LATENCY TEST ------------------
mean:    0 us
std dev: 0 us
min:     0 us
max:     0 us
missed topic updates: 0
uORB note: PASS multi-topic test
uORB note: try multi-topic support subscribing before publishing
uORB note: PASS multi-topic reversed
uORB note: Testing unadvertise
uORB note: Testing multi-topic 2 test (queue simulation)
uORB note: PASS multi-topic 2 test (queue simulation)
uORB note: Testing orb queuing
uORB note:   Testing to write some elements...
uORB note:   Testing overflow...
uORB note:   Testing underflow...
uORB note: PASS orb queuing
uORB note: Testing orb queuing (poll & notify)
PASS

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
d076b9815e system/uorb: support build in aosp
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
dongjiuzhu1
fe5acd6570 apps/uorb: change nuttx/list to posix queue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-09 22:50:13 +08:00
likun17
729e1cad6e uorb:Added 6dof motion and gesture related types. For details,see: https://developer.android.com/reference/android/hardware/SensorEvent#values
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-09 20:17:29 +08:00
likun17
9ca75e2977 uORB: Add topic information acquisition and setting interface.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-10-09 20:17:29 +08:00
likun17
ac11e3cba9 Adapt the new header file path of va_format.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-23 14:54:06 +08:00
wanggang26
767c8ea6ce uorb: enable O_CLOEXEC explicit
to avoid potential fd leak which means fork/vfork will duplicate fd
without O_CLOEXEC flag to the child process.

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-23 08:34:38 +08:00
likun17
3144c14947 listener.c: Support data saving to csv file.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-21 23:07:33 +08:00
likun17
b428af2cad uORB: Add formatted string ("o_format") parameters and remove callback log ("cb") printing.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-21 23:07:33 +08:00
likun17
296a6b3cac gas.c:Adapt to uORB new macro definition content.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-21 10:55:24 +08:00
dongjiuzhu1
abdcb33f14 uORB/uORB; using array to save path for sensor_reginfo_s
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-19 11:45:49 +08:00
wangjianyu3
d94aa77e19 uORB/sensor: Add GNSS Geofence, Measurement & Clock.
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
wangjianyu3
2f280f4dc8 uORB/sensor: Rename GPS to GNSS
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
likun17
027ded4d4e sensor:Add sensor gas log output.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 03:42:31 +08:00
likun17
d0e15a7450 uorb:Adapt to new macro definition content.
Signed-off-by: likun17 <likun17@xiaomi.com>
2024-09-19 03:42:31 +08:00
wangjianyu3
b5f8520d36 system/adb: Set threashold of syslog device to "1" for polling
Boards may set default(CONFIG_RAMLOG_POLLTHRESHOLD) to a very large value, causes logcat "can not" get poll notify.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-15 02:26:55 +08:00
xuxin19
d4becc8e46 cmake:bugfix export uORB headers fix compile error
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
0fdab21fd9 cmake:sync LIBUV_HANDLE_BACKTRACE fix build break
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
yangsen5
524caec5a0 nxcodec: Modify the logic of judging the correctness of the incoming pixformat
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2024-09-13 12:33:45 +08:00
wangjianyu3
6b1062a64e system/fastboot: Fix Out-of-bounds Write
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
caa47f282e system/fastboot: Fix that total_chunks of sparse_header maybe error
when size of image passed to command "fastboot flash" is not 4KB aligned.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
a413f6bcac system/fastboot: Fix error that download_size always be zero
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e6cedb8da7 system/fastboot: Init total_imgsize to zero
otherwise random value, sometimes zero
And, close file if flash failed.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
78c11c31e8 system/fastboot: Fix fd leak of fastboot_filedump_upload()
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
c3488c5b47 system/fastboot: Support upload & oem(memdump, filedump) command
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
22f055472c system/fastboot: Retry if open EP failed
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wanggang26
e55666f90e fastboot:enable O_CLOEXEC explicit
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
f1ce26162b system/fastboot: Replace printf with syslog
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
anjiahao
53563b67e7 fastbootd:add delay ms for bootloader
usage in bootloader
if [flag == bootloader]
  fastbootd
else
  fastbootd 500
fi

host:
$fastboot flash app app.bin
 < waiting for any device >

let board enter booloader,use <reboot bootloader> or hard reset

then will flash it.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-11 23:20:48 +08:00
dongjiuzhu1
95abb3628c system/fastboot: fix crash when free invalid pointer
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
e3400b2555 Reduce the number of open() and close() to improve performance
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6ac7cbf4d2 system/fastboot: fastboot flash - call fsync()
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
6b53e1fae9 system/fastboot: erase - add driver independent
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
4d0b9d61de system/fastboot: Support USB boardctl
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
1752726479 system/fastboot: Complete the erase command
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
wangjianyu3
25ba30986f fastboot tool: Status read failed while rebooting into bootloader
Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-11 23:20:48 +08:00
dongjiuzhu1
dfa3ce5f5d system/uorb: using uorb.h to replace sensors header file
Sensors are just a part of uORB, and there are many virtual topics used
within uORB as well. For the library apps/system/uorb/, the nuttx/uorb.h
version is more preferable. So, move public type and definition to
nuttx/uorb.h.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-09-10 15:58:15 +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
Tim Hardisty
4ebd68f7d8 Update settings.c 2024-08-30 21:29:50 +08:00