Commit Graph

3282 Commits

Author SHA1 Message Date
fangpeina 888690a2fe examples/memory_pressure: fix daemon loop condition
Fix inverted loop condition: while (g_exit) should be while (!g_exit),
causing the daemon to exit immediately instead of running.

Signed-off-by: fangpeina <fangpeina@xiaomi.com>
2026-04-20 15:20:26 +08:00
Huang Qi f824e6852f apps/rust: makefile updates for unified library build system
Replace individual Rust crate building with unified library approach through
makefile modifications for better build performance and dependency management.

* Updated Application.mk to include Rust.mk and add unified build targets
* Modified top-level Makefile to integrate RUST_BUILD_UNIFIED in build process
* Added RUST_CLEAN_UNIFIED call to Application.mk clean target
* Updated Makefile distclean target to remove rust_unified_lib directory
* Updated example Makefiles to use nuttx_add_rust registration function
* Removed manual EXTRA_LIBS configurations from Rust example Make.defs files
* Added .rdat registry files and rust_unified_lib to gitignore
* Enhanced tools/Rust.mk with unified build system functions

The unified system builds all registered Rust crates together through
makefile integration, improving compilation efficiency and enabling better
dependency management across the NuttX applications framework.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 15:20:21 +08:00
gaoyuan28 13d295f909 fix building of hello_rust_cargo
Signed-off-by: gaoyuan28 <gaoyuan28@xiaomi.com>
2026-04-20 15:20:21 +08:00
xuxingliang 0ce84fc37c examples: fix sched_note_printf API change
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-20 15:20:18 +08:00
gaohedong 797540b0a2 net/pkt: add frame_type parameter for netpkt
The netpkt tool can specify the frame_type for sending and receiving message

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2026-04-20 15:20:17 +08:00
zhengyu16 0e866add56 fs: rename PSEUDOFS_SOFTLINKS to FS_LINKS
Signed-off-by: zhengyu16 <zhengyu16@xiaomi.com>
2026-04-20 15:20:16 +08:00
v-tangmeng 9ad4b9b723 examples/elf: add support for CONFIG_DISABLE_SIGNALS
make the example elf can work with SIGNAL disabled

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:20:15 +08:00
dongjiuzhu1 a0d85bdeca examples/capture: support monitor edge change by signal
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-20 15:20:14 +08:00
v-tangmeng 0f5b502859 sched: fix the compile error
error: implicit declaration of function 'sched_lock'
error: implicit declaration of function 'sched_unlock'

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:20:13 +08:00
hujun5 2fc983e2a8 fix compile error
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-20 15:20:13 +08:00
v-tangmeng 690fc1e0c3 fix the compilation error caused by CONFIG_DISABLE_SIGNALS
The commit 'add support for CONFIG_DISABLE_SIGNALS' led to:

undefined reference to `signal'
undefined reference to `sigaction'

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:20:13 +08:00
v-tangmeng 6528ef552a fix the compilation error caused by CONFIG_DISABLE_SIGNALS
The commit 'add support for CONFIG_DISABLE_SIGNALS' led to:

undefined reference to `sigaction'

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:20:13 +08:00
v-tangmeng 05f1ab7b6a adc: fix the compilation error
adc_main.c: In function 'main':
14:41:30  adc_main.c:310:22: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]
    310 |               printf("adc_main: read size=%ld is not a multiple of "
        |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    311 |                      "sample size=%d, Ignoring\n",
    312 |                      (long)nbytes, sizeof(struct adc_msg_s));
        |                                    ~~~~~~~~~~~~~~~~~~~~~~~~
        |                                    |
        |                                    long unsigned int
adc_main.c:311:36: note: format string is defined here
    311 |                      "sample size=%d, Ignoring\n",
        |                                   ~^
        |                                    |
        |                                    int
        |                                   %ld

Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:20:13 +08:00
chao an c33e23d46f libc/elf: rename modlib to libelf
Renaming "modlib" to "libelf" is more in line with the implementation content,
which makes it easier for individual developers to understand the capabilities of this module.

CONFIG_LIBC_MODLIB -> CONFIG_LIBC_ELF

Signed-off-by: chao an <anchao.archer@bytedance.com>
2026-04-20 15:20:13 +08:00
HongChao6 6cd455d8a3 examples: use deinit to free all resources.
Signed-off-by: HongChao6 <liuhongchao_00@126.com>
2026-04-20 15:19:55 +08:00
Tang Meng 243b7a4160 examples/i2schar: fix spelling mistakes
Signed-off-by: v-tangmeng <v-tangmeng@xiaomi.com>
2026-04-20 15:19:54 +08:00
xuxingliang 97c08c8be1 examples/fb: change the log message to avoid misunderstanding
To make VTF easier to understand which test is done.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-20 15:19:54 +08:00
zhangbo56 fcebd1969a rpsock: Move rpsock_server and rpsock_client to vendor
Because the lib it depends set proprietary: true.

Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
2026-04-20 15:19:53 +08:00
zhangbo56 19b46d4993 rpmsgsocket: Add kernel modules headers to rpmsgsocket build
Signed-off-by: zhangbo56 <zhangbo56@xiaomi.com>
2026-04-20 15:19:53 +08:00
mazhuang 5eff01043e apps/rpsock_server.c:Fix code quality issues Overflowed integer argument
Signed-off-by: mazhuang <mazhuang@xiaomi.com>
2026-04-20 15:19:53 +08:00
liuchan3 9bf3ce5822 examples/fb: fix sign extension issue in offset calculation
Signed-off-by: liuchan3 <liuchan3@xiaomi.com>
2026-04-20 15:19:53 +08:00
guanyi3 adfbc2cef3 usrsocktest: fix TEST_ASSERT_EQUAL(*events & POLLIN, pfd.revents & POLLIN) fail
This assertion should be removed because the POLLIN event is now only raised when there is data pending to be received. Previously, POLLIN was incorrectly set as soon as the connection was established, even when no data was available, which was not consistent with the expected behavior.

Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
2026-04-20 15:19:52 +08:00
Huang Qi b3bbb15284 cmake: Add unified Rust library build support and refactor existing logic
- Add unified Rust library generation tool (generate_rust_unified_lib.py)
- Refactor nuttx_add_rust.cmake to use unified library approach
- Support building multiple Rust crates as a single static library
- Add .config file generation support for unified library
- Update Rust examples to remove duplicate crate-type configuration

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 15:19:50 +08:00
zhangshuai39 cd12cf8ecb dhcpd: Increase dhcpd_stop's dependency on CONFIG_SCHED_WAITPID
dhcpd_stop is not supported when CONFIG_SCHED_WAITPID is not enabled

Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-04-20 15:19:49 +08:00
Bowen Wang 805088dc26 examples/rpmsgchar: add rpmsgchar test demo
User can use this example to test the rpmsg char device,
and this demo can be compiled to Linux/Android too.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-20 15:19:49 +08:00
zhangshuai39 5bd73b209c dhcpd: Using macros CONFIG_BUILD_KERNEL to control dhcpd_start compilation
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-04-20 15:19:49 +08:00
pengyinjie 7e0f5c49bd add cmake for sotest
1. sotest build romfs
2. sotest generate symtab
sotest symtab need to keep `no-lto` when compling to
pass redefine check since we can't get the real function
declaration from elf.

Signed-off-by: pengyinjie <pengyinjie@xiaomi.com>
2026-04-20 15:19:49 +08:00
zhangshuai39 783d582a6e dhcpd: Align makefile implementation
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-04-20 15:19:48 +08:00
Yongrong Wang b4c5db73ea vsock_main.c: vsock parameter cid supports string type
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2026-04-20 15:19:48 +08:00
yinshengkai 25f438c580 examples: add memory pressure example
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-20 15:19:47 +08:00
anjiahao e5727196b9 elf:Delete unnecessary generation, elf does not use kernel api
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 15:19:42 +08:00
wushenhui 23bd08ca41 Kconfig: add depends
- EXAMPLES_IGMP depends on NET_IGMP
- EXAMPLES_DHCPD depends on NETUTILS_DHCPD

Signed-off-by: wushenhui <wushenhui@xiaomi.com>
2026-04-20 15:19:42 +08:00
zhangshuai39 3ab9587059 netpkt: Add parameters to support specific network cards
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-04-20 15:19:38 +08:00
liuhongchao 56cef66e7f lvgldemo: add poll for mouse
Signed-off-by: liuhongchao <liuhongchao@xiaomi.com>
2026-04-20 15:19:36 +08:00
wangzhi16 32c6a6d4f8 examples/pty_test: fix compile error.
CC:  mm_heap/mm_heapmember.c pty_test.c: In function 'pts_main':
pty_test.c:244:3: error: unknown type name 'pthread_t'
  244 |   pthread_t si_thread;
      |   ^~~~~~~~~
pty_test.c:245:3: error: unknown type name 'pthread_t'
  245 |   pthread_t so_thread;
      |   ^~~~~~~~~
pty_test.c:378:9: warning: implicit declaration of function 'pthread_create'; did you mean 'timer_create'? [-Wimplicit-function-declaration]
  378 |   ret = pthread_create(&si_thread, NULL,
      |         ^~~~~~~~~~~~~~
      |         timer_create
pty_test.c:379:25: error: 'pthread_startroutine_t' undeclared (first use in this function)
  379 |                        (pthread_startroutine_t)serial_in,
      |                         ^~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:35 +08:00
anjiahao f9bdc47fca apps:modify examples elf compile method
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 15:19:35 +08:00
wangzhi16 a77b375865 fix compile error.
pwfb_events.c:215:11: error: implicit declaration of function 'pthread_exit' [-Werror=implicit-function-declaration]
  215 |           pthread_exit(NULL);
      |           ^~~~~~~~~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:33 +08:00
Yongrong Wang 6d23db9414 socket: modify the path of vm_sockets.h
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2026-04-20 15:19:33 +08:00
wangzhi16 a843190684 system/ofloader: fix compile error.
ofloader.c:78:11: error: implicit declaration of function 'close'; did you mean 'pclose'? [-Werror=implicit-function-declaration]
   78 |           close(devinfo[count].fd);
      |           ^~~~~
      |           pclose

ofloader.c:293:8: error: unknown type name 'pthread_addr_t'
  293 | static pthread_addr_t fake_idle(pthread_addr_t arg)
      |        ^~~~~~~~~~~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:33 +08:00
wangzhi16 7dbe3e8529 examples/pwlines: fix compile error
CC:  signal/sig_pselect.c pwlines_events.c: In function 'pwlines_listener':
pwlines_events.c:161:11: warning: implicit declaration of function 'pthread_exit' [-Wimplicit-function-declaration]
  161 |           pthread_exit(NULL);
      |           ^~~~~~~~~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:33 +08:00
wangzhi16 e2b4aa9c29 examples/camera: fix compile error.
camera_bkgd.c: In function 'nximage_initialize':
camera_bkgd.c:226:3: error: unknown type name 'pthread_t'
  226 |   pthread_t thread;
      |   ^~~~~~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:33 +08:00
Jukka Laitinen cfbee73286 examples/camera: Initialize g_nximage semaphore with SEM_INITIALIZER
Use SEM_INITIALIZER macro instead of direct { 0 }

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2026-04-20 15:19:32 +08:00
wangzhi16 132334dc98 examples/watcher: fix compile error.
watched.c:77:21: error: implicit declaration of function 'getpid' [-Werror=implicit-function-declaration]
   77 |   int watched_pid = getpid();
      |                     ^~~~~~
cc1: all warnings being treated as errors
make[2]: *** [/home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-CI/apps/Application.mk:253: watched.c.home.work.ssd1.workspace.Vela-Multi-Boards-dev-system-CI.apps.examples.watched.o] Error 1
make[2]: Target 'all' not remade because of errors.
make[1]: *** [Makefile:52: /home/work/ssd1/workspace/Vela-Multi-Boards-dev-system-CI/apps/examples/watched_all] Error 2
watcher_main.c: In function 'watcher_daemon':
watcher_main.c:195:17: error: implicit declaration of function 'getpid' [-Werror=implicit-function-declaration]
  195 |   watcher_pid = getpid();
      |                 ^~~~~~
watcher_main.c:218:7: error: implicit declaration of function 'pause' [-Werror=implicit-function-declaration]
  218 |       pause();
      |       ^~~~~

Signed-off-by: wangzhi16 <wangzhi16@xiaomi.com>
2026-04-20 15:19:32 +08:00
hongfengchen 332eeb5328 fix compile errors
Fix compile error for andorid.bp method.

Signed-off-by: hongfengchen <hongfengchen@xiaomi.com>
2026-04-20 15:19:31 +08:00
yinshengkai c205c4aff2 examples/pipe: fix double close
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-20 15:19:29 +08:00
xuxin19 2ccc0b9129 cmake(feat):add cmake apps_symtab generate
this patch allow hello world and ostest
build with `m` in flat mode

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-20 15:19:28 +08:00
xinbingnan 0d66c45f45 fb: support for complete non-/consecutive fbdev mmap processing
Signed-off-by: xinbingnan <xinbingnan@xiaomi.com>
2026-04-20 15:19:28 +08:00
yezhonghui 12a1fce532 gpio: example gpio add poll case for irq
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-20 15:19:27 +08:00
anjiahao b419759530 Kconfig/task heap:use Kconfig to contrl Application heapsize
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 15:19:27 +08:00
zhangkai25 1cc77a2194 [apps]:Update CMAKEList.txt for UDP tests under CMAKE
Signed-off-by: zhangkai25 <zhangkai25@xiaomi.com>
2026-04-20 15:19:26 +08:00