Commit Graph

7768 Commits

Author SHA1 Message Date
Alan Carvalho de Assis
21f5bc9b70 testing/ramtest: Fix not updated CMake file
This issue was preventing ramtest to be displayed into
nsh (this is why all modifications need to be tested!!
"should work" doesn't work).

This is was discovered by user @nonpawite

Signed-off-by: Alan C. Assis <acassis@gmail.com>
2024-09-20 10:55:06 +08:00
wangjianyu3
b1c4e39205 examples/gps: Add default case for switch-warning of vendor extended sentence
Vendor may add extended sentence may not handled in switch, error if -Werror=switch enabled.
And extended sentence should not added to general examples.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 22:11:39 +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
makejian
9a1a8d3ca3 mbedtls/psa: provides PSA method for using hardware random driver
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-19 08:36:46 +08:00
makejian
96b220659d apps/mbedtls-alt: support cmac
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-19 08:36:46 +08:00
xuxin19
d3942fa1b0 module build:replace BUILD_LOADABLE with MODULES
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-19 08:32:26 +08:00
wangjianyu3
d1fc46d978 tools/mksymtab.sh: Support symbol name overriding
The lines start with "," make no effects(as comments)

e.g.
  $ cat exports.txt | grep atan2
  atan2Override,atan2

  $ /PATH/TO/APPS/tools/mksymtab.sh FOO BAR exports.txt | grep atan2
  extern void *atan2Override;
    {"atan2", &atan2Override},

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:46:46 +08:00
wangjianyu3
7f7ff8c7d4 tools/mksymtab.sh: Support adding additional symbols that are not in undefined list
e.g. For CHRE dynamic nanoapps, pre-saving symbols that may be used later, no need recompiling.

Test: (unique & sorted)
    $ nm ./hello_world.o | grep " U "
             U __aeabi_unwind_cpp_pr1
             U chreGetTime
             U chreGetVersion
             U chreLog
             U __stack_chk_fail
             U __stack_chk_guard

    $ cat additional.txt -n
         1  test_symbol
         2  test_symbol

    $ /PATH/TO/APPS/tools/mksymtab.sh ./hello_world.o MY_PREFIX -a additional.txt
    #include <nuttx/compiler.h>
    #include <nuttx/symtab.h>

    extern void *__aeabi_unwind_cpp_pr1;
    extern void *__stack_chk_fail;
    extern void *__stack_chk_guard;
    extern void *chreGetTime;
    extern void *chreGetVersion;
    extern void *chreLog;
    extern void *test_symbol;

    const struct symtab_s MY_PREFIX_exports[] =
    {
      {"__aeabi_unwind_cpp_pr1", &__aeabi_unwind_cpp_pr1},
      {"__stack_chk_fail", &__stack_chk_fail},
      {"__stack_chk_guard", &__stack_chk_guard},
      {"chreGetTime", &chreGetTime},
      {"chreGetVersion", &chreGetVersion},
      {"chreLog", &chreLog},
      {"test_symbol", &test_symbol},
    };

    const int MY_PREFIX_nexports = sizeof(MY_PREFIX_exports) / sizeof(struct symtab_s);

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:46:46 +08:00
wangjianyu3
da83fa8ab2 tools/mksymtab.sh: Check sed expression
sed: -e expression #1, char 0: no previous regular expression

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:46:46 +08:00
anjiahao
ddaec5f188 apps/tools/mksymtab.sh:When generating symbols, exclude symbols that dynamic modules in bin/ call each other.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-09-19 03:46:46 +08:00
pengyiqiang
c0d8a07042 lvgl/Makefile: support multiple options for LV_OPTLEVEL
This configuration is added to put LVGL into PSRAM for execution, and the lv_*.o file needs to be matched in the link script. Since LTO optimization will cause the file name to be modified, resulting in a matching failure, it will only take effect if LTO optimization is removed during compilation.

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-09-19 03:46:34 +08:00
pengyiqiang
eee2a2ef6b lvgl: add customize compilation optimization level config
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2024-09-19 03:46:34 +08:00
wangjianyu3
aaf4e9d480 nshlib: Support "-f" option for command "rm"
In below two cases "rm" command with "-f" option will return 0:
  a. Bad arguments
  b. File not exists

Following "rm" of GNU coreutils 8.32

GNU coreutils
  $ rm --version
  rm (GNU coreutils) 8.32
  Copyright (C) 2020 Free Software Foundation, Inc.
  License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
  This is free software: you are free to change and redistribute it.
  There is NO WARRANTY, to the extent permitted by law.

  Written by Paul Rubin, David MacKenzie, Richard M. Stallman,
  and Jim Meyering.

  $ rm /FILE_NOT_EXISTS
  rm: cannot remove '/FILE_NOT_EXISTS': No such file or directory
  $ echo $?
  1

  $ rm -f
  $ echo $?
  0

  $ rm -f /FILE_NOT_EXISTS
  $ echo $?
  0

Without this patch
  nsh> rm
  nsh: rm: missing required argument(s)

  nsh> rm /FILE_NOT_EXISTS
  nsh: rm: unlink failed: 2
  nsh> echo $?
  1

With this patch
  nsh> rm -f
  nsh> echo $?
  0

  nsh> rm -f /FILE_NOT_EXISTS
  nsh> echo $?
  0

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:45:37 +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
ad2514fc6f examples/gps: Fix switch error
Log:
  gps_main.c:83:7: error: enumeration value 'MINMEA_SENTENCE_LOR_LSQ' not handled in switch [-Werror=switch]
     83 |       switch (minmea_sentence_id(line, false))
        |       ^~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-19 03:42:31 +08:00
wangjianyu3
8764f502d5 testing/sensortest: Rename GPS to GNSS
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
dae4d7572f module/sotest: Try devminor of romdisk
For case that /dev/ram${EXAMPLES_SOTEST_DEVMINOR}(e.g. /dev/ram0) already exists, and users may not care which device to use.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 12:16:02 +08:00
wangjianyu3
758ed55722 examples/sotest: Fix warning of unused variable 'devname'
Config:
  +CONFIG_EXAMPLES_SOTEST=y
  +CONFIG_EXAMPLES_SOTEST_BINDIR="/data"
Log:
  sotest_main.c: In function 'sotest_main':
  sotest_main.c:105:8: error: unused variable 'devname' [-Werror=unused-variable]
    105 |   char devname[32];
        |        ^~~~~~~

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 11:36:27 +08:00
wangjianyu3
74b05468d6 module/sotest: Fix depends of SOTEST_BUILTINFS
Log:
  sotest_main.c: In function 'sotest_main':
  sotest_main.c:116:29: error: storage size of 'desc' isn't known
    116 |   struct boardioc_romdisk_s desc;
        |                             ^~~~
  sotest_main.c:116:29: error: unused variable 'desc' [-Werror=unused-variable]
  cc1: all warnings being treated as errors

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-09-18 11:36:27 +08:00
Huang Qi
140647cf8c Minor code style fixes
Fix issue in these files:
examples/flowc/flowc_mktestdata.c
examples/nxhello/nxhello_listener.c
examples/system/system_main.c
fsutils/passwd/passwd_append.c
graphics/ft80x/ft80x_gpio.c
graphics/pdcurs34/pdcurses/pdc_keyname.c
graphics/pdcurs34/pdcurses/pdc_touch.c
modbus/functions/mbfuncdiag.c

Fixed by AI and checked by manual

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-09-15 02:27:41 +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
ligd
ef95bd8d29 pthread_cleanup: move clenup down to tls
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-09-14 20:15:31 +08:00
Leandro Zungri
0c734ca62b ppp: Reformat to match nuttx coding style 2024-09-14 13:49:08 +08:00
Leandro Zungri
800b93de9f ppp: Fix wrong lcp_state handling on peer reconnection
If a PPP peer disconnects and then tries to reconnect it will send an 'LCP configure request' packet. The code that handles that scenario seems to be clearing the wrong lcp_state flag (LCP_RX_UP instead of LCP_TX_UP) and thus the nuttx ppp client will keep sending IPCP packets which are rightfully dropped by the new peer since it is still in the LCP negotiation phase.
2024-09-14 13:49:08 +08:00
xuxin19
f96461c385 cmake:refine libyuv CMakeLists
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
683f25af15 cmake:support romfs prog for SIM CMake build
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
cfe229c67f cmake:bugfix fix mbedtls missing source and depend issue
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +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
xuxin19
9b8d8d0c4f cmake:fix testing cxx_main suffix error
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
3a2b74d701 cmake:port benchmarks to CMake build for testing
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
xuxin19
3fe177825a cmake:export tinycrypt headers
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 23:16:26 +08:00
wangmingrong1
7c94d13be4 kasantest: Add performance testing for Kasan, including pile insertion testing and algorithm testing
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
f2c21b11d8 kasantest: Add a test set for global variable out of bounds detection
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
277c968b6a kasantest: Add the ability to run a single program
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
wangmingrong1
797fd04796 kasantest: Fix errors running on 64 bit
1. Change 'heap' to a global variable. When using the software tag 'kasan', the base of 'heap' is dynamically changing, which may result in runtime errors
2. Modify the length of the argv array to ensure that all 64 bit addresses can be copied
3. After initialization, the registration of the heap must be canceled

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-09-13 23:14:08 +08:00
yinshengkai
85ad50c39e testing: refactor kasan test
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-09-13 23:14:08 +08:00
makejian
7cd9919a46 testing/crypto: add rsa testcase
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
b1f2e63a6b testing/crypto: Add test cases for Diffie-Hellman algorithm
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
ce58e85aa6 testing/crypto: add ecdsa testing
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
b53ee36d47 testing/crypto: add aes-128-cmac testcase
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +08:00
makejian
6db82199a6 testing/crypto: add crc32 testcases
Signed-off-by: makejian <makejian@xiaomi.com>
2024-09-13 23:10:19 +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
Shoukui Zhang
dad9b5afa3 drivertest: Modify output format
before:
slave size 4slave poll read     0       1       2       3
master write    0       1       2       3

now:
read size = 4
slave poll read         0       1       2       3
master write    0       1       2       3

Signed-off-by: Shoukui Zhang <zhangshoukui@xiaomi.com>
2024-09-13 12:33:25 +08:00
yuyun1
ed5ca1c512 i2c slave: add i2c slave test code
Signed-off-by: yuyun1 <yuyun1@xiaomi.com>
2024-09-13 12:33:25 +08:00
xuxin19
3d8dc5dce5 cmake:implement CMake build for NuttX Lua interpreter
add CMake module for register lua mod
nsh> lua
Lua 5.4.0  Copyright (C) 1994-2020 Lua.org, PUC-Rio
> hello.say_hello()
Hello World!
> io.write("abs is =",math.abs(-10),"\n")
abs is =10
> os.exit()
nsh>

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2024-09-13 12:31:10 +08:00
meijian
1f51bfe64d apps/ipforward: fix ci check failure
note: static declaration of 'chksum' follows non-static declaration

Signed-off-by: meijian <meijian@xiaomi.com>
2024-09-12 13:38:38 +08:00