Commit graph

7874 commits

Author SHA1 Message Date
yinshengkai
30df081276 examples: fix noteprint compile error
The sched_note_string/bprintf/dump interfaces have been removed and replaced with printf and event

Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2024-10-08 23:35:46 +08:00
Lars Kruse
d35dd65727 system/dhcp6c: add NET_ICMPv6_AUTOCONF dependency
Previously the build failed if NET_ICMPv6_AUTOCONF was disabled
(due to the missing `netlib_obtain_ipv6addr` symbol).

Closes: #2412
2024-10-08 19:56:50 +08:00
Lup Yuen Lee
a14429296e CI: Sync the Build Workflow from nuttx repo
This PR syncs the CI Build Workflow `build.yml` from `nuttx` repo to `nuttx-apps`. The updated `build.yml` consolidates these changes:
- https://github.com/apache/nuttx/pull/13301
- https://github.com/apache/nuttx/pull/13806
- https://github.com/apache/nuttx/pull/13862

`build.yml` from `nuttx` repo was slightly modified for `nuttx-apps`:
- All References to `apache/nuttx/.../arch.yml` were changed to `apache/nuttx-apps/.../arch.yml` (we decouple them so they are easier to update)
- Removed `pull_request > paths-ignore` and `push > paths-ignore` (following the existing convention)
2024-10-08 18:12:07 +08:00
wangmingrong
cc1c4a3722 examples/romfs: Compilation error after enabling options
Enable CONFIG_PROFIG_EXAMPLES_ROMFS compilation error

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-10-08 14:04:39 +08:00
Lup Yuen Lee
0918826561 CI: Sync the Build Rules from nuttx repo
This PR syncs the Build Rules from `nuttx` to `nuttx-apps` repo. The Build Rules were added to `nuttx` repo here: https://github.com/apache/nuttx/pull/13858
2024-10-08 14:04:23 +08:00
wangmingrong
c2597504e0 nsh: Fix PS printing misalignment
When the stack is allocated in megabytes, printing seven bits of ps will not align

Signed-off-by: wangmingrong <wangmingrong@xiaomi.com>
2024-10-08 07:58:51 +02:00
Xiang Xiao
c30583dda4 system/adbd: Fix typo error(CONFIG_ADB_SERVER->CONFIG_SYSTEM_ADBD)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-07 21:25:42 +08:00
Xiang Xiao
9b8a02749f net: Remove IFF_DOWN flag to compatible with Linux/*BSD
turn off interface by checking IFF_UP flag isn't set:
https://github.com/apache/nuttx/issues/1838

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2024-10-07 20:19:47 +08:00
wangjianyu3
58e5bc7e74 apps/Makefile: Passing extra arguments to mksymtab.sh
https://github.com/apache/nuttx-apps/pull/2637

For example, now can passing file(s) contain additional symbols that may be used in the future to mksymtab.sh by using "-a" option to avoid freuent kernel rebuilds:
SYMTABEXT="-a $(XXXX_PREFIX)/platform/nuttx/exports_xxxx_api.txt"
ifneq ($(CONFIG_LIBM),)
    SYMTABEXT+="-a $(XXXX_PREFIX)/platform/nuttx/exports_xxxx_api_math.txt"
endif

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-10-07 18:55:06 +08:00
wangjianyu3
266049bd11 tools/mksymtab.sh: Using getopts to parse parameters
Use the "-a" option to specify additional lists

Examples
  - The basic.txt
    $ cat basic.txt
    basic_func0
    basic_func1
    basic_func2

  - The additional.txt
    $ cat additional.txt
    additional_func0
    additional_func1
    additional_func2

  1. Get symbols from directory "EMPTY_DIR" and additional list basic.txt
    ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt
    #if defined(CONFIG_EXECFUNCS_HAVE_SYMTAB)
    const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] =
    #elif defined(CONFIG_NSH_SYMTAB)
    const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] =
    #else
    const struct symtab_s dummy_symtab[] =
    #endif
    {
      {"basic_func0", &basic_func0},
      {"basic_func1", &basic_func1},
      {"basic_func2", &basic_func2},
    };

  2. Get symbols from directory "EMPTY_DIR" and two additional lists basic.txt, additional.txt
    ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt -a additional.txt
    #if defined(CONFIG_EXECFUNCS_HAVE_SYMTAB)
    const struct symtab_s CONFIG_EXECFUNCS_SYMTAB_ARRAY[] =
    #elif defined(CONFIG_NSH_SYMTAB)
    const struct symtab_s CONFIG_NSH_SYMTAB_ARRAYNAME[] =
    #else
    const struct symtab_s dummy_symtab[] =
    #endif
    {
      {"additional_func0", &additional_func0},
      {"additional_func1", &additional_func1},
      {"additional_func2", &additional_func2},
      {"basic_func0", &basic_func0},
      {"basic_func1", &basic_func1},
      {"basic_func2", &basic_func2},
    };

  3. Set prefix and get symbols from directory "EMPTY_DIR" and two additional lists basic.txt, additional.txt
    ./tools/mksymtab.sh ./EMPTY_DIR PREFIX_TEST  -a basic.txt -a additional.txt
    const struct symtab_s PREFIX_TEST_exports[] =
    {
      {"additional_func0", &additional_func0},
      {"additional_func1", &additional_func1},
      {"additional_func2", &additional_func2},
      {"basic_func0", &basic_func0},
      {"basic_func1", &basic_func1},
      {"basic_func2", &basic_func2},
    };

  4. Error: Missing <imagedirpath>
    $ ./tools/mksymtab.sh
    ERROR: Missing <imagedirpath>

    Usage: ./tools/mksymtab.sh <imagedirpath> [symtabprefix] [-a additionalsymbolspath]

UNSUPPORTED usage examples
  # `getopt` supports these, but the usage in GNU and macOS is incompatible.
  - ./tools/mksymtab.sh ./EMPTY_DIR -a basic.txt PREFIX_TEST -a additional.txt
  - ./tools/mksymtab.sh -a basic.txt ./EMPTY_DIR PREFIX_TEST -a additional.txt

References
  BASH(1)   -- getopts
  GETOPT(1) -- getopt

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
2024-10-07 18:55:06 +08:00
wanggang26
d407670115 resetcause:restore to factory, factory to factory_inquiry
Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-07 05:10:19 +08:00
ligd
32e8b8e8ae mps2: add zero-latency-interrupt case on mps2
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-07 05:10:07 +08:00
wanggang26
d5d8e9eacb fix build error:
[linguini@pastabox nuttx]$ make -j
CC:  tcpblaster_server.c
LN: platform/board to
/home/linguini/cuinspace/pico-nuttx/apps/platform/dummy
tcpblaster_server.c: In function ‘tcpblaster_server’:
tcpblaster_server.c:159:14: error: implicit declaration of function
‘accept4’; did you mean ‘accept’? [-Wimplicit-function-declaration]
  159 |   acceptsd = accept4(listensd, (FAR struct sockaddr *)&myaddr,
&addrlen,
      |              ^~~~~~~
      |              accept
make[3]: *** [Makefile:92: tcpblaster_server.hobj] Error 1
make[2]: *** [Makefile:53:
/home/linguini/cuinspace/pico-nuttx/apps/examples/tcpblaster_context]
Error 2
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [Makefile:180: context] Error 2
make: *** [tools/Unix.mk:457:
/home/linguini/cuinspace/pico-nuttx/apps/.context] Error 2
make: *** Waiting for unfinished jobs....

from https://github.com/apache/nuttx-apps/issues/2632

Signed-off-by: wanggang26 <wanggang26@xiaomi.com>
2024-10-05 09:06:43 +08:00
Petro Karashchenko
86f367132a netutils/ptpd: add missing FAR
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-04 08:17:51 +08:00
Petro Karashchenko
66b79a7c89 style: fix indentation issues
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-04 08:17:51 +08:00
xucheng5
76d419ca45 example/can: replace field ch_unused with ch_tcf
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
2024-10-02 21:22:14 +08:00
anjiahao
c916f163f2 nsh:support wait command to wait task exit.
usage like:
  nsh> sleep 10 &
  [5:100]
  nsh>set pid1=$!
  nsh>sleep 15 &
  [6:100]
  nsh>set pid2=$!
  nsh>wait $pid1 $pid2

'wait' command will block nsh from running until pid1 and pid2 finish.
This is useful for parallel requirements to perform certain tasks

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2024-10-02 21:13:54 +08:00
W-M-R
8d1966e9fc kasantest: Fix compilation warning
signed-off-by: W-M-R <Mike_0528@163.com>
2024-10-02 21:10:22 +08:00
wangmingrong1
94a6f1837a kasantest: add CMakeLists.txt
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-02 21:10:22 +08:00
wangmingrong1
1fb3687eaa kasantest.c: fix the size passed by mm_initialize is incorrect
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2024-10-02 21:10:22 +08:00
raiden00pl
8fc7004f5b github: sync labels with nuttx repo
sync github lables with main NuttX repo
2024-10-02 20:55:54 +08:00
Petro Karashchenko
4f09da79cf system/uniqueid: remove FAR from int variables
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-02 10:40:05 +02:00
Petro Karashchenko
1dabdfa0ba lte: add missing FAR
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-02 10:40:05 +02:00
Petro Karashchenko
161c996079 apps: use sizeof array in snprintf
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2024-10-02 10:40:05 +02:00
dongjiuzhu1
6c88a1ad76 examples/elf/sotest: enable and run them simultaneously
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:53:14 +08:00
dongjiuzhu1
15c90ac17e examples/sotest/elf: rename romfs_img to run test with CONFIG_NSH_ROMFSETC
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:53:14 +08:00
dongjiuzhu1
fdc35d0bad examples/elf: remove unnecessary config CONFIG_EXAMPLES_ELF_DEVPATH
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:53:14 +08:00
dongjiuzhu1
a5516121e2 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-02 01:48:47 +08:00
dongjiuzhu1
b0b4ac0f39 system/uORB: return subscibe latency/interval
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:48:47 +08:00
dongjiuzhu1
6c237cfbc0 system/uorb: add O_DIRECT to access sensor as wachers
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:48:47 +08:00
dongjiuzhu1
925efc2314 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-02 01:48:47 +08:00
dongjiuzhu1
aa5a38399a 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-02 01:48:47 +08:00
dongjiuzhu1
686bab3160 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-02 01:48:47 +08:00
dongjiuzhu1
5732c76f39 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-02 01:48:47 +08:00
dongjiuzhu1
5b729162ad system/uorb: support build in aosp
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:48:47 +08:00
dongjiuzhu1
44239f11ff apps/uorb: change nuttx/list to posix queue
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2024-10-02 01:48:47 +08:00
yangguangcai
302c1f9dca drivertest_watchdog:change busyloop after capture.
busyloop should be after sem_init and WDIOC_CAPTURE.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
19a63bdc19 watchdog: change usleep to up_udelay.
change uleep to up_udelay prevent system into lower
power mode and watchdog be pause stop count.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
6358b481fb test/watchdog:add test case for capture.
Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
5d9d27d505 drivertest:fix compile error.
arm-none-eabi-ld: /home/ygc/ssd/vela_n62_4.0/nuttx/staging/libapps.a(drivertest_watchdog.c.home.ygc.ssd.vela_n62_4.0.apps.testing.drivertest.o): in function `cmocka_driver_watchdog_main':
/home/ygc/ssd/vela_n62_4.0/apps/testing/drivertest/drivertest_watchdog.c:480: multiple definition of `cmocka_driver_watchdog_main'; /home/ygc/ssd/vela_n62_4.0/nuttx/staging/libapps.a(drivertest_watchdog.c.home.ygc.ssd.vela_n62_4.0.apps.testing.drivertest.o):/home/ygc/ssd/vela_n62_4.0/apps/testing/drivertest/drivertest_watchdog.c:480: first defined here

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
yangguangcai
d02596835f drivertest/watchdog:add parameter to avoid testing api getstatus.
some vendor hardware not support get watchdog status.

Signed-off-by: yangguangcai <yangguangcai@xiaomi.com>
2024-10-01 21:55:02 +08:00
xuxingliang
3eb2124ca9 system/dhcpc: fix cmake program name
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 21:50:08 +08:00
xuxingliang
8e6b13489f system/fdt: add cmake support
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 21:50:08 +08:00
xuxingliang
9cc9a830eb ostest/smpcall: add smp call from interrupt test
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2024-10-01 12:27:25 +08:00
ouyangxiangzhen
34e70e7f0c testing/ostest: Fix timing assertions in wdog_test
This patch removed timing assertions in wdog_test.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
3d6785bcaf testing/ostest: Fix busyloop on tee platform
This patch fixed busyloop on tee platform.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
b01765c57d testing/ostest: Add recursive watchdog callback testcase
This patch added wdog recursive test cases.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
Signed-off-by: ligd <liguiding1@xiaomi.com>
2024-10-01 11:39:49 +08:00
zhangyuan29
54a8915f29 ostest: test wdog only in flat mode
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2024-10-01 11:39:49 +08:00
cuiziwei
e13d37f4d0 ostest:Ignore runtime error.
wdog.c:190:3: runtime error: signed integer overflow: 9223372036854775807 + 1 cannot be represented in type 'long int'
    #0 0x40e35d3a in wdog_test_run /home/cuiziwei/ska/vela/vela-dev2/apps/testing/ostest/wdog.c:190
    #1 0x40e35e75 in wdog_test_thread /home/cuiziwei/ska/vela/vela-dev2/apps/testing/ostest/wdog.c:207
    #2 0x40773ffa in pthread_startup pthread/pthread_create.c:59
    #3 0x4495e037 in pthread_start pthread/pthread_create.c:139
    #4 0x40301864 in pre_start sim/sim_initialstate.c:52

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2024-10-01 11:39:49 +08:00
ouyangxiangzhen
cc13d4b742 ostest/wdog: Fix Coverity problems
This patch is to make Coverity happy.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2024-10-01 11:39:49 +08:00