Commit Graph

7710 Commits

Author SHA1 Message Date
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
Huang Qi
0b3e5f2339 .gitignore: Add .aider* to .gitignore
Aider is AI pair programmer: https://aider.chat

The .aider* files is not a part of NuttX but used by
Aider as temporary files.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-11 15:05:56 +08:00
Xiang Xiao
2e01a7c7af Revert "ltp: handle low accuracy of time in some platfrom"
This reverts commit 142df1a001.
2024-09-10 23:33:37 +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
Luchian Mihai
0a4c97ac09 examples/amg88xx: add example for amg88xx driver
Simple example for the amg88xx driver
2024-09-09 19:45:44 +08:00
Alexey Matveev
0fc0cb2888 Thttpd Fix: wrong calc offset 2024-09-09 19:45:03 +08:00
dependabot[bot]
f4d21b0360 build(deps): bump github/super-linter from 6 to 7
Bumps [github/super-linter](https://github.com/github/super-linter) from 6 to 7.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/super-linter/compare/v6...v7)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-09 15:29:30 +08:00
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