Commit Graph

272 Commits

Author SHA1 Message Date
openvela-robot 1482e60cde arch/x86_64: Resolve weak symbol compilation relocation errors
Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:01:42 +08:00
openvela-robot e8591d9e23 pthread: delete pthread tls flag
Signed-off-by: zhangyuan29 <zhangyuan29@xiaomi.com>
2026-04-21 01:01:36 +08:00
openvela-robot 2e05d4a9b9 sched: export sched_getcpu API in AMP mode
Some app with same code runs on different cores in AMP mode,
need known physical core id on which the function is called.

Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2026-04-21 01:01:30 +08:00
openvela-robot e44133cd68 rptun: minor nxstyle fix, sync with community
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:01:21 +08:00
openvela-robot 0d22531d60 misc/dev_mem: fix compile error in aarch64
misc/dev_mem.c:203:24: error: comparison between two arrays [-Werror=array-compare]
  203 |   bool merge = (_edata == _sbss);
      |                        ^~
misc/dev_mem.c:203:24: note: use '&_edata[0] == &_sbss[0]' to compare the addresses

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:01:13 +08:00
openvela-robot 200b48bf35 procfs/cpuinfo: Zero copylen in cpuinfo_read
to avoid return the negative number

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:01:06 +08:00
openvela-robot 1b12410f95 mq: correct inode release in mq_inode_release()
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 01:01:01 +08:00
openvela-robot 923523ecec tools/gdb: support string type in offset_of
1. Support any type of value as pointer address in container_of
2. Support string as type in offset_of
3. Make sure type is a pointer in container_of, and not a pointer in
   offset_of

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:55 +08:00
openvela-robot bba9037914 usensor.c:fix container_of member error.
Signed-off-by: likun17 <likun17@xiaomi.com>
2026-04-21 01:00:47 +08:00
openvela-robot 793cd570f8 tools/gdb: decode backtrace of crashlog
Now crash log can be directly pass to addr2line tool to get all backtraces.

E.g.
(gdb) addr2line -f crash.log -p 485
Address              Symbol                           Source

Backtrace of 485
0x402cc0ac           <up_switch_context+84>           /home/work/ssd1/workspace/MiRTOS-specific product-Stable-Build/nuttx/include/arch/syscall.h:179
0x40291276           <nxsig_timedwait+386>            signal/sig_timedwait.c:365
0x4028fc7e           <nxsig_nanosleep+106>            signal/sig_nanosleep.c:141
0x4028fdba           <clock_nanosleep+26>             signal/sig_nanosleep.c:333
0x402c3736           <usleep+62>                      unistd/lib_usleep.c:108
0x415018c0           <cs2p2p_mSecSleep+24>            Src/PPPP_Common.c:1139
0x414fabde           <cs2p2p_Run_send_DRW+258>        Src/PPPP_API.c:5577
0x414fac62           <cs2p2p_PPPP_thread_send_DRW+18> Src/PPPP_API.c:5616
0x40446f62           <pthread_startup+10>             pthread/pthread_create.c:59
0x41094f4a           <pthread_start+106>              pthread/pthread_create.c:139

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:41 +08:00
openvela-robot 61f982bb25 fs/semaphore: fix a minor issue with goto label
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
2026-04-21 01:00:29 +08:00
openvela-robot 0dc07fb6b1 tools/gdb: imporve nxgcore speed
Let GDB to read from ELF for readonly data.
Disable this feature by nxgcore --no-trust-readonly.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:00:18 +08:00
openvela-robot d2ce98f28b fs_open:Adjust the definition of the open path
Summary:
  Reference https://man7.org/linux/man-pages/man2/open.2.html
       EISDIR pathname refers to a directory and the access requested
              involved writing (that is, O_WRONLY or O_RDWR is set).

Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2026-04-21 01:00:11 +08:00
openvela-robot b09d89a476 risc-v: Support customize idle loop
Support customize idle loop by CONFIG_ARCH_IDLE_CUSTOM
as other architectures.

Then user can provide their own `up_idle()` function
with CONFIG_ARCH_IDLE_CUSTOM enabled.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-21 01:00:05 +08:00
openvela-robot 8d3b73559f timers: add goldfish timer support
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-21 00:59:57 +08:00
openvela-robot f506bd34c8 sched: synchronize with community code and use nxsched_remove_self.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2026-04-21 00:59:51 +08:00
openvela-robot 5bb8c15749 arch: fix the sched parameter update when exiting
Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-04-21 00:59:45 +08:00
openvela-robot b566da436e sim:support sim elf and dynamic libs package in post build
use the dynamic library .so of the binding compilation environment,
and then modify the dynamic loader of elf at runtime to run sim elf across system versions

1.add post-build for sim build
2.collect dynamic .so and dynamic interpreter
3.add execution script for the entire package sim elf

change text-segment to 0x50000000
because patchelf will modify the .dynamic section in elf,
the upward alignment of elf will be less than 0x3fffffff,
which will cause asan shadow memory overlap error

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 00:59:38 +08:00
openvela-robot 57e00d628f arch/arm64/src/imx9/imx9_usbdev.c: Clean up cache operations, add DEBUGASSERTS
Correct some of the cache operations:

- EP0 request length was handled incorrectly
- Received data cache invalidate was exceeding the received buffer
- writedtd is also called with no data (EP0 ACK/NACK). Don't touch cache in that case.

Fix trip wire handling to conform with the IMX93 reference manual

Also add DEBUGASSERTS for future to check the validity of pointers and sizes

Co-authored-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
2026-04-21 00:59:15 +08:00
openvela-robot 2f6c45cb01 arch/intel64: optimise context switch
We save interrupted TCB state on tcb->xcp.regs not interrupt stack now
which allows us to remove x86_64_savestate() from up_switch_context()
and other places.

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-04-21 00:59:09 +08:00
openvela-robot 3d928157d7 build.yml: Undo debug print
Undo the unintended changes for debug printing. I edited the wrong repo, I am deeply sorry about this.
2026-04-21 00:59:01 +08:00
openvela-robot f2d0966e9b arch/intel64/intel64_head.S: align XCP region
align XCP region to match regs allocation in up_initial_state()

Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2026-04-21 00:58:55 +08:00
Alin Jerpelea e2b1af69be libs/libc: migrate to SPDX identifier
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-21 00:58:50 +08:00
openvela-robot 91c1f346b6 cpuload: fix crash because of the member of g_pidhash is NULL
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:21:10 +08:00
openvela-robot 7e25096cb1 fix time_t overflow
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 21:21:05 +08:00
openvela-robot 963d12e058 build: Replace 'make download' with 'make flash' 2026-04-20 21:21:00 +08:00
openvela-robot 3497365242 xtensa_dumpstate.c: Fix the name of the TCB variable when dumping the
backtrace.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2026-04-20 21:20:57 +08:00
openvela-robot eb4a903dc8 i2c/bitbang: fix compile break when enable CONFIG_I2C_BITBANG_NO_DELAY
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:54 +08:00
openvela-robot 23e434723e exfat: optimize and fix compile warnring
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:51 +08:00
openvela-robot 5eef628b8a battery_charger:add poll support
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2026-04-20 21:20:48 +08:00
openvela-robot fbf441a5f2 power/polaris: Replace ops and batsem with dev
and remove the batsem initialization since it is arleady done in common code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:20:46 +08:00
openvela-robot c4e79a3f25 driver/power: using upper-half structure directly in the lower-half structure.
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:43 +08:00
openvela-robot 63911d9dc9 fix: update aw88266a lib
update aw88266a lib of stable version

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
2026-04-20 21:20:40 +08:00
openvela-robot 1a57ab43f8 net: always compile listen.c and accept.c when enable CONFIG_NET
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:38 +08:00
openvela-robot 98b540027a feat: charge: initialize rx charger stwlc38 driver
Signed-off-by: zhangguoliang <zhangguoliang3@xiaomi.com>
2026-04-20 21:20:34 +08:00
openvela-robot f49e965be8 Open ble controller adaptation code
N/A

Signed-off-by: jsun <jsun@bouffalolab.com>
2026-04-20 21:20:32 +08:00
openvela-robot 4d57b21dfa fix: driver: modify some fields and comments
change FBIOPAN_DISPLAY IOCTL command to _FBIOC(0x0016).
change  xoffest to xoffset in fb_planeinfo_s.
modify comments for xoffset and yoffset in fb_planeinfo_s.
add comment for pandisplay interface.

Signed-off-by: liushuai25 <liushuai25@xiaomi.com>
2026-04-20 21:20:30 +08:00
openvela-robot 08a37a4da8 Use ethernet MAC programmed in imxrt OCOTP MAC0/MAC1 (teemsy board has this) 2026-04-20 21:20:23 +08:00
openvela-robot 5024dbfd8c driver/sensor: support sensor_ops: selftest
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:20 +08:00
openvela-robot 327bef1033 sched/sched/remove_readytorun.c: Fix CPU affinity issues in SMP
the logical may choose the head of g_readytorun(the greatest priority)
task as the next while ignoring the cpu affinity of it.

Signed-off-by: chenhonglin <chenhonglin@xiaomi.com>
2026-04-20 21:20:18 +08:00
openvela-robot aa29d2a58d driver/power: using upper-half structure directly in the lower-half structure.
N/A

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:20:15 +08:00
openvela-robot 6c5d9a65d9 risc-v/esp32-c3/rttimer: Disable alarm before setting a new value and enabling it 2026-04-20 21:20:13 +08:00
openvela-robot 61d2803c79 sched/signal: Correct kill with cancellation
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:20:09 +08:00
openvela-robot b6dd0b15c1 input/touch: add io command for touch firmware version
Signed-off-by: futerigele <futerigele@xiaomi.com>
2026-04-20 21:20:06 +08:00
openvela-robot f0507bd23d fs:procfs: add waiting_paging_fill state names
Follow task_state in tcb_s.
2026-04-20 21:20:03 +08:00
openvela-robot dbe04d7c61 Merge remote-tracking branch 'mirtos/master' into dev
Last commit id:
commit 649f99ce3029a0648d315ec9ebea537f651d9573 (mirtos/master)
Author: FASTSHIFT <vifextech@foxmail.com>
Date:   Wed Sep 22 15:38:43 2021 +0800

    libc/misc: add lib_glob.

    Signed-off-by: FASTSHIFT <vifextech@foxmail.com>

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 21:19:59 +08:00
openvela-robot ae2182db0f feat: touch: add nt38350 selftest
add nt38350 selftest

Signed-off-by: futerigele <futerigele@xiaomi.com>
2026-04-20 21:19:57 +08:00
openvela-robot a676010b32 risc-v/esp32-c3: Remove _s of non static variables from esp32c3_rt_timer.c 2026-04-20 21:19:53 +08:00
openvela-robot 076e7601fc arch/sim/usrsock: correct the address length
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:19:51 +08:00
openvela-robot fbcef52ddd esp32_spiram.c: Remove esp_himem_reserved_area_size from esp32_spiram.c
file.  This function is already defined in esp_himem and is used only
when that file is built.  We don't need another weak function.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2026-04-20 21:19:48 +08:00
openvela-robot 496d7869cc net/local: add socket message control support
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:19:45 +08:00
openvela-robot fa62fd7cb1 Add LCD backpack support for ESP32 (devkit-c). 2026-04-20 21:19:42 +08:00
openvela-robot 7595b7e792 Revert "net/local: bypass the message field to support SCM further"
This reverts commit 23943944015e21cdcdf707913c4f3c1d7bd28661.

Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:19:39 +08:00
openvela-robot 94672d5d31 libc/string: add lib_strchrnul. 2026-04-20 21:19:36 +08:00
openvela-robot aff474dfdb net/devif/devif_callback.c: corrected the connection event list to work as FIFO instead of LIFO.
In case of enabled packet forwarding mode, packets were forwarded in a reverse order
because of LIFO behavior of the connection event list.
The issue exposed only during high network traffic. Thus the event list started to grow
that resulted in changing the order of packets inside of groups of several packets
like the following: 3, 2, 1, 6, 5, 4, 8, 7 etc.

Remarks concerning the connection event list implementation:
* Now the queue (list) is FIFO as it should be.
* The list is singly linked.
* The list has a head pointer (inside of outer net_driver_s structure),
  and a tail pointer is added into outer net_driver_s structure.
* The list item is devif_callback_s structure.
  It still has two pointers to two different list chains (*nxtconn and *nxtdev).
* As before the first argument (*dev) of the list functions can be NULL,
  while the other argument (*list) is effective (not NULL).
* An extra (*tail) argument is added to devif_callback_alloc()
  and devif_conn_callback_free() functions.
* devif_callback_alloc() time complexity is O(1) (i.e. O(n) to fill the whole list).
* devif_callback_free() time complexity is O(n) (i.e. O(n^2) to empty the whole list).
* devif_conn_event() time complexity is O(n).

Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:19:34 +08:00
openvela-robot a0c50d31de arch/xtensa: Remove FAR qualifier for Xtensa-specific files
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 21:19:28 +08:00
openvela-robot 0eae921c84 exfat: limit EXFAT_UTF8_NAME_BUFFER_MAX and EXFAT_UTF8_ENAME_BUFFER_MAX to EXFAT_NAME_MAX
N/A

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:19:20 +08:00
openvela-robot f4af765586 mpfs: emmcsd: add Kconfig/Makefile and board files
Add necessary Kconfig, Make.defs, Makefile and board
file changes.

Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
2026-04-20 21:19:15 +08:00
openvela-robot a6ecb6dc32 feature: bsp: add bq25618 driver
Signed-off-by: liangdongdong<liangdongdong@xiaomi.com>
2026-04-20 21:19:13 +08:00
openvela-robot e171092f26 arch/sim: Implement up_puts function
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:19:10 +08:00
openvela-robot d26073b7ad fix: sensor: add factory test for lsm6dso.
Add read id and selftest interface in ioctl, it will
be called in the factory test. Fix some bugs in driver.

Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2026-04-20 21:19:08 +08:00
openvela-robot cf2b42a639 Add bl602 os adapter layer
N/A

Signed-off-by: jsun <jsun@bouffalolab.com>
2026-04-20 21:19:05 +08:00
openvela-robot e5dea03f85 build:xtensa: remove build warning
./build.sh: line 67: [: too many arguments

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:19:03 +08:00
openvela-robot dfe2345f92 lcd/st77xx: change 16 bit cmd send to 8 bit
Make sending commands independent of processor endianness. The data can
be handled by application side, such as LVGL has SWAP16 option.

Signed-off-by: Peter Bee <bijunda1@xiaomi.com>
2026-04-20 21:19:00 +08:00
openvela-robot c34e0af335 tools/build.sh: Add WASI_SDK_ROOT env variable
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:18:57 +08:00
openvela-robot 40e417dc12 bcm43xxx/Kconfig: added SDPCM frame pool size parameter.
Also I have set the parameter to 8 instead of 4 by default
because there were many "alloc failed" messages in debug log
even during initialization / automatic IP address assignment
via DHCP negotiation.
2026-04-20 21:18:55 +08:00
openvela-robot 9567c38a7b drivers/sdmmc: Remove rwbuffer to avoid panic
since rwbuffer isn't fully initiailized in mmcsd_slotinitialize.
BTW, if the cache is important for performance, it is better to
implement a general block cache and put in a common location.

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:18:51 +08:00
openvela-robot cea54f2cd2 arch/arm: correct the function name from arm_getsp() to up_getsp()
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:18:45 +08:00
openvela-robot 54b8163685 xtensa:dcache_clean: use DCACHE_LINZESIZE instead of DCACHE_SIZE
Clean_dcache use DCACHE_LINZESIZE instead of DCACHE_SIZE in addr loop

Signed-off-by: zhuyanlin <zhuyanlin1@xiaomi.com>
2026-04-20 21:18:43 +08:00
openvela-robot 8ca29e0834 LICENSE: add license for wireless/spirit
The license for wireless/spirit is added to the LICENSE file

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-20 21:18:40 +08:00
openvela-robot 0db9160ac9 fs/littlefs: revert fstat and use lfs_file_attr function
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2026-04-20 21:18:37 +08:00
openvela-robot 126ef65897 mpfs/corepwm: remove wrong header include 2026-04-20 21:18:33 +08:00
openvela-robot ded3d5e9ec uClibc++:remove typeinfo.cpp that confict with libsupc++
Typeinfo.cpp already defined in libsupc++
2026-04-20 21:18:30 +08:00
openvela-robot 6961dfafd4 tools/esp32: Create option for merging all binaries into a single file
This is only useful when the path to binary files (e.g. bootloader) is
provided via the ESPTOOL_BINDIR variable.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 21:18:26 +08:00
openvela-robot f9e634907c checkpatch.sh: add check gerrit Change-ID support
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 21:18:22 +08:00
openvela-robot 1f41cfe709 Revert "Make: use gcc as LD"
This reverts commit 45672c269db13f59bdaa417e564837e8bbb6c8c1.

Because:

* It's very confusing to have cc as LD.
* I don't see what "-nostartfiles -nodefaultlibs" in LDFLAGS are
  supposed to do when we use LD directly. It would be simpler to
  remove them from our LDFLAGS.
2026-04-20 21:18:18 +08:00
openvela-robot 9c21882d24 drivers/mmcsd: Change mmsd_ prefix to mmcsd_ prefix
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:18:14 +08:00
openvela-robot 4bcdf95ac3 LICENSE: BDS License: add AES cypher support
Add AES cypher support to the ALLOW_BSD help

This change will increase awareness on which components
are disabled by the ALLOW_BSD menu

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-20 21:18:11 +08:00
openvela-robot b3988a3805 tools/checkstack.pl: handle the <stmdb> instruct properly
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:18:09 +08:00
openvela-robot be3321642e Revert "esp32: remove FS_SPIFFS from defconfigs"
This reverts commit 35a004bdd017a23dd0eb5d535ab75bca2fdae371.
2026-04-20 21:18:05 +08:00
openvela-robot 76f1a221fc tools/checkstack.pl: Support thumb2 function prologue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:18:02 +08:00
openvela-robot b08e26a65a Revert "libxx:uClibxx:add-weak-function-for-new-del-operations"
This reverts commit 40a110b4a8c3688a61c32aafa21a76adfcf2c404.
2026-04-20 21:18:00 +08:00
openvela-robot cc6f95f710 fs/littlefs: Fix the bug of missing file types
N/A

Signed-off-by: zhouliang3 <zhouliang3@xiaomi.com>
2026-04-20 21:17:58 +08:00
openvela-robot 56e691cbe4 nuttx: Add function attribute for inhibiting stack protector
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 21:17:55 +08:00
openvela-robot 5e309caef5 libxx: Move the partial c++ abi implementation to libcxxmini sub folder
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:17:52 +08:00
openvela-robot 0aa22287fb boards/arm/imxrt/teensy-4.x: add option to have CAN3 as can0
This commit adds option for Teensy 4.x board to initialize CAN3 as can0.
The reason of this is the CAN FD capability of CAN3. This commit also
disables tickless mode support for pikron-bb configuration as this option
started causing hard faults which are yet to be solved.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-20 21:17:49 +08:00
openvela-robot 36836c499e libs/libxx/uClibc++.defs: Download the correct file type.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2026-04-20 21:17:45 +08:00
openvela-robot 7734e796a1 libxx: Give VERSION make variable prefix to avoid the conflict
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:17:41 +08:00
openvela-robot e0c8a75ced arch:xtensa: rename XCHAL_INT_NLEVELS
The name used in Tensilica support file core-isa.h for all vendors is
`XCHAL_NUM_INTLEVELS`.
Use a new name may be confused by newer porting xtensa arch.
2026-04-20 21:17:35 +08:00
openvela-robot 80f9b438ae esp32/ttgo_lora_esp32: Add support to SSD1306 OLED display 2026-04-20 21:17:33 +08:00
openvela-robot 5816f0c4c5 arch/arm/assert: enhance the assert dump
show the all tasks info including backtrace and registers

Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:17:30 +08:00
openvela-robot a2b71c9ef0 libcxx: Avoid the waring: "__EXCEPTIONS" is not defined, evaluates to 0 [-Werror=undef]
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:17:28 +08:00
openvela-robot 12a8ca04d7 arch/armv8-m: Add SAU support
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:17:24 +08:00
openvela-robot d1939cd3cc arm: add ARM_HAVE_NEON to Kconfig
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 21:17:17 +08:00
openvela-robot 05cd227bcb Fix xtensa_btdump() to look at the exception frame
Remove xtensa_backtrace_start() since it is not used anymore
2026-04-20 21:17:14 +08:00
openvela-robot 857f2b16e6 xtensa/esp32_cpuint: export only one function to allocate a CPU
interrupt.

That function will have a parameter to decide whether to allocate a
level sensitive interrupt or an edge sensitive interrupt.

All the drivers are also updated with this API change.

Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2026-04-20 21:17:05 +08:00
openvela-robot 3058083e01 sched/backtrace: simplify the assign of tcb in case of negative pid
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:16:55 +08:00
openvela-robot 9f25362706 byteswap.h: add byteswap.h header file
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:16:51 +08:00
openvela-robot f081525545 Revert "sim: add popen and pclose to nuttx-name.in"
This reverts commit 6eb29f9715cd74e1d7178fcb9c210d90eb98f242.

Reason for revert: don't need
2026-04-20 21:16:48 +08:00
openvela-robot 89e6034a88 Kconfig: add NuttX License setup for BSD components
This commit will add a build option to enable BSD code in License setup.

NOTE: When this option is enabled components with BSD licenses can be
added to the build. Please make sure that the licenses match your
project.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2026-04-20 21:16:45 +08:00
openvela-robot 52a383acd8 libc/string: add lib_strchrnul.
N/A

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2026-04-20 21:16:43 +08:00
openvela-robot c6138f611a riscv/common: add CURRENT_REGS declare in RV32
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:16:37 +08:00
openvela-robot c4a805996c Kconfig: add quotes in source to clean warnings from setconfig
To avoid the setconfig warning "style: quotes recommended around xxx in
source xxx"

Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:16:34 +08:00
openvela-robot 3c36ec4764 mtd: include nuttx/fs/fs.h explicitly
To fix struct partition_info_s undefined type issue.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 21:16:31 +08:00
openvela-robot 7303c033aa fs/partition: Support BIOC_PARTINFO
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:55 +08:00
openvela-robot 1343b7d18d xtensa/esp32: Enable boot from Espressif's port of MCUboot
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 21:07:52 +08:00
openvela-robot e0f1e3287a mtd: Add MTDIOC_ERASESTATE command for retrieving erase state value
Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
2026-04-20 21:07:45 +08:00
openvela-robot 81b03ee043 fs: Remove endsector from partition_info_s
since it can be computed from startsector and numsectors simply

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:41 +08:00
openvela-robot 37c4e4f151 fs/unionfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:38 +08:00
openvela-robot d30453bdfd xtensa:coproc: fix XTENSA_CP_ALLSET error in some case
Consider follow coprocessor configuration case:

\#define XCHAL_CP_NUM                    1       /* number of coprocessors */
\#define XCHAL_CP_MAX                    2       /* max CP ID + 1 (0 if none) */
\#define XCHAL_CP_MASK                   0x02    /* bitmask of all CPs by ID */
\#define XCHAL_CP_PORT_MASK              0x00    /* bitmask of only port CPs */
\
\#define XCHAL_CP1_NAME                  "AudioEngineLX"
\#define XCHAL_CP1_IDENT                 AudioEngineLX
\#define XCHAL_CP1_SA_SIZE               208     /* size of state save area */
\#define XCHAL_CP1_SA_ALIGN              8       /* min alignment of save area */
\#define XCHAL_CP_ID_AUDIOENGINELX       1       /* coprocessor ID (0..7) */

In this case, XTENSA_CP_ALLSET is 0x1, but valid coprocessors
bitmap is 0x2, use marco XCHAL_CP_MASK instead, it is bitmap of all
vaild coprocs.
2026-04-20 21:07:32 +08:00
openvela-robot bb0963803a fs/hostfs: Support fchstat and chstat callback
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:24 +08:00
openvela-robot 313ade5b5d fs: Add utimens and lutimens
https://pubs.opengroup.org/onlinepubs/9699919799/functions/futimens.html
https://www.daemon-systems.org/man/utimens.2.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:22 +08:00
openvela-robot 0645fb036a board/sim: Enable locale related setting in nsh
to extend the daily build cover the locale code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:07:16 +08:00
openvela-robot 41791b8d65 Doc/FAQ: Add more entries about board initialization 2026-04-20 21:07:14 +08:00
openvela-robot 378f766e64 specific product: Sensor: Add sensor driver for LSM6DSO.
N/A

Add driver for the STMicro LSM6DSO.

Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2026-04-20 21:07:12 +08:00
openvela-robot 98e320bc75 tcp: fix an assertion in "fix iob allocation deadlock" commit
Fix a wrong assertion in:

```
commit 98ec46d726b4b58e58f8fc149a38628d7dde193e
Author: YAMAMOTO Takashi <yamamoto@midokura.com>
Date:   Tue Jul 20 09:10:43 2021 +0900

    tcp_send_buffered.c: fix iob allocation deadlock

    Ensure to put the wrb back onto the write_q when blocking
    on iob allocation. Otherwise, it can deadlock with other
    threads doing the same thing.
```

I forget to submit this with https://github.com/apache/incubator-nuttx/pull/4257
2026-04-20 21:07:09 +08:00
openvela-robot 9331da6779 cmd/df: Fix the abnormal output after off_t change
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:07:07 +08:00
openvela-robot 04fbc67cf3 arch/arm/src/imxrt/imxrt_flexpwm.c: Set LDOK bits after all channels are set
This commit changes the FLexPWM driver for iMXRT MCU so that LDOK bits in
Master Control Register are set at once after all channels are configured.
Setting LDOK bit enables the driver to load prescaler, modulus and PWM
values of corresponging submodule and start PWM output. Setting all bits
at once instead of doing it separately can help avoiding the channels to
be out of sync with each other.

Signed-off-by: Michal Lenc <michallenc@seznam.cz>
2026-04-20 21:07:04 +08:00
openvela-robot b4f4f50a05 net/local: remove unused client lc_remaining
Signed-off-by: chao.an <anchao@xiaomi.com>
2026-04-20 21:07:02 +08:00
openvela-robot f98a10389f tzset: avoid taking semaphore in interrupt for non-kernel mode
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:07:00 +08:00
openvela-robot 63ba50422b build.sh: add license file and set EXTRAFLAG when arch is xtensa. 2026-04-20 21:06:57 +08:00
openvela-robot 76ba6016d4 fs: Change off_t and related types to int64_t if long long is supported
since it is very popular that the storage capcacity is large than 4GB
even in the embedded system:
https://www.opengroup.org/platform/lfs.html
https://en.wikipedia.org/wiki/Large-file_support

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:54 +08:00
openvela-robot e78fd6c338 Revert "Revert "armv8-m: Fix EXC_RETURN for non-secure usage""
This reverts commit 48beda08e2fca24c74d832f31efe0a90c4450984.

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 21:06:51 +08:00
openvela-robot 1663af885a libc: Remove include/nuttx/lib/regex.h and libs/libc/misc/lib_match.c
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:48 +08:00
openvela-robot eb85df54a5 fs: Save umask to tls_task_s for non kernel mode only
since the kernel mode has the dedicated userspace

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:46 +08:00
openvela-robot e85336d0f7 EXC_SECURE and SECURE_STACK just can clear at TRUSTZONE_NONSECURE 2026-04-20 21:06:43 +08:00
openvela-robot 920e80e523 libc: Support message catalog function
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/nl_types.h.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:41 +08:00
openvela-robot 7e73b7e342 libc: Rename match to fnmatch
specified here:
https://pubs.opengroup.org/onlinepubs/007904875/functions/fnmatch.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:39 +08:00
openvela-robot 67ce7ef737 specific product: Sensor: Add driver for OPT3007 light sensor.
N/A

Add light sensor.

Signed-off-by: yangjiukui <yangjiukui@xiaomi.com>
2026-04-20 21:06:36 +08:00
openvela-robot 2781118d59 Replace all __attribute__((aligned(x)) with aligned_data(x)
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:30 +08:00
openvela-robot 8c0af90507 Revert "sim: change ownership to user ID of the calling process for shm file"
This reverts commit 03c1496e8e6fedbec2cd8daf1b04fb9676825540.
2026-04-20 21:06:28 +08:00
openvela-robot 38e82b7951 drivers/mmcsd:Send cmd0 just once for Increased compatibility
Signed-off-by: anjianjun <anjianjun@xiaomi.com>
2026-04-20 21:06:23 +08:00
openvela-robot 5df85237d1 drivers/mmcsd:fix build error of debug
N/A

Signed-off-by: anjianjun <anjianjun@xiaomi.com>
2026-04-20 21:06:21 +08:00
openvela-robot d004101b04 Documentation/bl602: Update some imformation; Add partition.toml in tool/bl602 2026-04-20 21:06:19 +08:00
openvela-robot cd0fe8c939 sim: Correct the typedef in nuttx/hostfs.h
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:16 +08:00
openvela-robot a328c21e19 arch/sim: Copy include/nuttx/config.h to the local folder
so the source code compiled by host environment can include config.h
directly and then avoid pass Kconfig option through Makefile manually

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:14 +08:00
openvela-robot 0ca1ebe31f board/ctrl: add BOARDCTL_SWITCH_BOOT switch boot system support
BOARDIOC_SWITCH_BOOT is required to communicate the boot partition from
userspace (OTA subsystem) to board. It can be used to change the system
boot behavior. So it's useful for A/B boot or even single boot case.

For the board support A/B boot case:
1. Download the new image from the sever
2. Write the new image to the alternative partition
3. Call BOARDCTL_SWITCH_BOOT to the alternative system

For single boot partition case:
1. Download the new image from the sever
2. Call BOARDCTL_SWITCH_BOOT and reboot to a small system
3. Write the new image to the main partition in the small system
4. Call BOARDCTL_SWITCH_BOOT again to the main system

Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2026-04-20 21:06:11 +08:00
openvela-robot cd72f6f2fe fs/inode: add sanity check for inode to avoid nullpointer
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:06:09 +08:00
openvela-robot 42bf66ac3a pthread: Shouldn't check the uninitialized field in pthread_barrier_init
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:06:05 +08:00
openvela-robot 302a32d031 libs/libxx/libcxx.defs: Fix build error on Windows platform
The libcxx-X.Y.Z.src.tar.xz contains a symbolic link to a directory
that not exist as below.

`libcxx-X.Y.Z.src/test/std/pstl -> ../../../pstl/test/std`

Linux and macOS environment have no problem, but it causes an error
when extracting tarball on Windows platform. This symbolic link is not
actually used, so exclude it from extracting the tarball.
2026-04-20 21:05:59 +08:00
openvela-robot d11bc89ec8 iob_trimhead: fix an integer truncation
I guess this fixes https://github.com/apache/incubator-nuttx/issues/4181
2026-04-20 21:05:53 +08:00
openvela-robot aa68b302cc socket_rpmsg: fix recv block when remote close early
Signed-off-by: ligd <liguiding1@xiaomi.com>
2026-04-20 21:05:51 +08:00
openvela-robot 339a733b4c wqueue: delete sem_wait to avoid race condition
when work_cancel was called, we need to check work.timer whether is active
by WDOG_ISACTIVE for work_queue with delay.

The wdog cb has not been executed when the flag:active is cleared
and if we check flag:active at this moment, WDOG_ISACTIVE will return false.
so the work_cancel will sem_wait until post a semaphore, but all free hpwork_thread
also wait this semphore and their priority are high than caller, this will be a race
condition causing thread/task of calling work_cancel block.

Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:05:49 +08:00
openvela-robot 4244a2d9fe sched: Remove unused TLS member from task_group_s
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2026-04-20 21:05:46 +08:00
openvela-robot 36d7020a39 net: Add file_socket function
and move the socket special process from fstat/nx_vfcntl/ to file_fstat/file_vfcntl

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:05:43 +08:00
openvela-robot b35e59c539 fs: Simplify sendfile implementation
and avoid call nx_ file API in the kernel space

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:05:41 +08:00
openvela-robot e94d1e9c31 fs: should only apply umask to the userspace caller
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:05:39 +08:00
openvela-robot b6f64e9926 wqueue: Fix typos
include/nuttx/wqueue.h:
libs/libc/wqueue/work_cancel.c:
libs/libc/wqueue/work_queue.c:
sched/wqueue/kwork_cancel.c:
sched/wqueue/kwork_queue.c:

    * Fix spelling, grammar, and typos.
    * Improve wording in a few areas.
    * These changes affect comments only. No functional changes.
2026-04-20 21:05:37 +08:00
openvela-robot 357e8caf65 fs: Move umask to task_info_s
and implement the related semantic correctly

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-20 21:05:32 +08:00
openvela-robot 543d8a3b86 group/child_status: Dynamically expand group child_status
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2026-04-20 21:05:30 +08:00