Commit Graph

60318 Commits

Author SHA1 Message Date
simbit18 02831b0863 boards/arm/am335x: CMake build for BeagleBone Black board
- CMake added the BeagleBone Black board

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-01-15 01:14:26 +08:00
simbit18 8ce7a99b52 arch/arm/src/am335x: CMake build implemented for TI AM335x Sitara
- added TI Sitara AM335X

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-01-15 01:14:26 +08:00
xuxin19 81d1126965 tools[feat]: add config check tool
[checkkconfig.py] is a tool that simulates the effects of modifying a CONFIG item,
Can be used to check whether my config changes are what I expected.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-14 17:50:18 +01:00
simbit18 35ae7a761d arch/arm/imxrt: fix error header guard
- fix chip/imxrt_clockconfig_ver1.h:23: error: header guard '__ARCH_ARM_SRC_IMXRT_IMXRT_CLOCKCONFIG_VER1_H' followed by '#define' of a different macro [-Werror=header-guard]

Signed-off-by: simbit18 <simbit18@gmail.com>
2026-01-14 10:50:02 -05:00
xuxin19 f6db05a94f cmake(enhance):add target we can dump all CMake lib targets
`cmake --build -t dump_targets`
list all lib target current generator need to build

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-14 23:07:32 +08:00
xuxin19 bca7d17a1d cmake(enhance):make CMake extensions include path inherit PUBLIC
since we imply nuttx_link_libraries, nuttx_lib target can
inherit include path

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-14 23:07:32 +08:00
lpxiao a174dbb2f7 bugfix:k28_usbhshost.c:380:47: error: 'errcode' undeclared
arm/kinetis/freedom-k28f: fix usb automount compile error

This patch fix k28_usbhshost.c:380:47: error: 'errcode' undeclared

Signed-off-by: lipan118<lp.xiao@foxmail.com>
2026-01-14 15:48:25 +01:00
jingfei 36e5752205 ftl:optimize ftl's MTD_ERASE return value check
the MTD ERASE interface has inconsistent return values.
Some implementations return the number of erased sectors,
while others return OK (0). It is currently recommended
to uniformly treat ERASE success as OK. Therefore, the
logic for judging the return value of MTD_ERASE in the
FTL erase interface should be changed to check if it is
greater than 0.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-01-14 09:56:04 +08:00
jingfei 3559e97659 mtd/parition:MTD partiton check whether the erase interface exist
Since there is a storage device like RRAM that doesn't
require erasing, the MTD erase function may not exist.
Here, we should first check whether the erase interface
exists before performing the erasing operation.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-01-14 09:56:04 +08:00
jingfei e8fbc997fa ftl:adjust ftl for RRAM/MRAM
Accessing RRAM/MRAM from the FTL interface can
cause errors because RRAM lacks an erase interface.
To make RRAM/MRAM compatible with FTL, the FTL layer
erase interface needs to be modified.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-01-14 09:56:04 +08:00
jingfei 152ea6c4bd ftl:remove erase buffer for mtd device without erase interface
When there's no erase function for mtd, we decide if we
need erase_buffer based on this:

1. If we've got bad block marking, we still need the erase buffer.
   If a write fails, it's used to read back the entire bad block's
   contents before writing to a new block.
2. If we don't have bad block marking, the erase buffer isn't
   needed and can be skipped.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-01-14 09:56:04 +08:00
guoshichao e823681091 ghs: change the vfpv3 to vfpv5
referring to the documentation of Armv7-m, it is recommended to use teh
vfpv5 compile option

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:41:49 +08:00
guoshichao c210b056d8 ghs: add -ffunction-sections and -fdata-sections compile options
the -ffunction-sections and -fdata-sections are also supported by
greenhills, and these two compile options can benefit with section
layout optimization, and thus reduce the final image size

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:41:30 +08:00
v-zhangxiaomeng5 20aea64ced libcxx: porting for Infineon TASKING compiler in cmake&make scripts.
Exclude cpp files beyong c++14 e.g. filesystem/, ryu/, variant.cpp etc.

Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
2026-01-14 09:41:10 +08:00
guoshichao 49a57ddfbc ghs: replace the "-Wall" build option with the "-ghstd=last"
According to the Greenhills documentation, the "-Wall" option is
deprecated for use. Instead, the "-ghstd=last" option is recommended.
Compared with "-Wall", the "-ghstd=last" option can capture more
warnings and has stricter rules.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:40:32 +08:00
guoshichao ba8abb5643 sys/ioctl: extend the IOCTL defintion that compatible with linux kernel
Add the generic _IO() macro and aliases for FS_IOC_GETFLAGS and FS_IOC_SETFLAGS,
aligning the ioctl.h definitions with the Linux kernel API to improve source
compatibility when porting LTP linux kernel testcase code to NuttX

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:39:51 +08:00
v-zhangxiaomeng5 1327ce5214 libcxxabi: enable LIBCXXABI_BAREMETAL
This fix forces libcxxabi to parse typeinfo ptr in absolute relocation instead of GOT-REL.

Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
2026-01-14 09:38:22 +08:00
v-zhangxiaomeng5 594e32c384 libcxxabi: support for Infineon TASKING compiler
This commit contains:
1) excluding c++ exception relevant cpp files
2) excluding compile options tasking doesn't support

Signed-off-by: v-zhangxiaomeng5 <v-zhangxiaomeng5@xiaomi.com>
2026-01-14 09:38:22 +08:00
cuiziwei bb64889bef libcxxabi: remove gcc's libsupc++ from cmake/make scripts.
Both libcxxabi and libsupc++ implementat Itanium C++ ABI layer, just pick one.

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-01-14 09:38:22 +08:00
wangmingrong1 f27f501365 libxxabi: remove redefinition in cmake/make scripts for clang
The clang unwind.h file already defines these macros:
_URC_FATAL_PHASE2_ERROR = _URC_FAILURE
_URC_FATAL_PHASE1_ERROR = _URC_FAILURE

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-01-14 09:38:22 +08:00
jingfei c3010eafab fs/mtd/proxy:Replaced heap allocation of temporary device names
To simplify the handling of Block devices and MTD devices,
the unique_chardev and unique_blkdev functions now use local
variable names instead of allocating device names from the heap.

Signed-off-by: jingfei <jingfei@xiaomi.com>
2026-01-14 09:25:08 +08:00
guoshichao 99551e78f0 wqueue: fix the config typo error
Fix typo in CMakeLists.txt: CONFIG_LIB_USRWORK → CONFIG_LIBC_USRWORK.
This ensures work_usrthread.c, work_queue.c, and work_cancel.c are compiled
when the user work queue feature is enabled.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:24:00 +08:00
guoshichao cda60ceab3 ghs: fix the gnu-elf.ld handle error at pre-process
In Green Hills, if the name of the file to be preprocessed ends with ".ld",
this file must be renamed to ".ld.i". Otherwise, the following error will be reported:

ccarm: Error: -o out/build/cmake_out/mann_dcu_evb_ghs_ap/gnu-elf.ld has wrong suffix for -P option (expect .i)

Currently, based on the documentation and actual operations, only files
ending with "*.ld" can trigger this preprocessing error. There are no such
issues in other cases.

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-14 09:23:29 +08:00
liqinhui 1d8eab937f simwifi: refactor the interfaces of simwifi and simnet
Fix CMake logic to correctly include sim_wifihost.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-01-14 09:22:54 +08:00
liqinhui 3843f7b4fe wifi: Support the wifi operations based on the bss file.
Add support for BSS file-based WiFi simulation.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-01-14 09:22:54 +08:00
liqinhui dce89e1820 simwifi: Refactor the interfaces of simwifi and simnet
Refactor simwifi to separate host and sim logic.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-01-14 09:22:54 +08:00
liqinhui 58110f3d1a drivers/net: Fix crash in wifi_sim disconnect.
Add WLAN_STA_STATE_DISCONNECTED state to prevent race conditions or invalid state handling during disconnect.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-01-14 09:22:40 +08:00
Matteo Golin a35dcd82e3 drivers/sensors/fakesensor: Remove GNSS dependency
This commit removes the dependency of the fakesensor API on
`SENSORS_GNSS`. All of the logic for handling fake GNSS sensors is
conditionally compiled only if GNSS features are enabled. Other fake
sensors can be used without GNSS logic being included in the build.

Signed-off-by: Matteo Golin <matteo.golin@gmail.com>
2026-01-14 09:21:35 +08:00
guoshichao f47ff76589 signal: add default sigaction for SIGURG
according to the posix standard: the default action for SIGURG is to
ignore the signal, we need to add the default sigaction handler for
SIGURG
this fix the /tset/ANSI.os/signal/signal_X/T.signal_X testcase

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-13 13:56:39 -08:00
zhanghongyu a7f084bfd4 icmpv6_autoconfig.c: fix crash when ipv6 address modified during autoconfig
During the autoconfig process, if the user modifies the link local
address while waiting for the Router Advertisement message, a crash will
occur when sending the ICMPv6 Neighbor Advertisement message because
netdev_ipv6_lladdr returns NULL.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-01-13 13:55:17 -08:00
xuxin19 79d7ada455 cmake(bugfix):keep include directory order in cmake application
Adding a for loop will reverse the order of addition.

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-13 13:54:12 -08:00
xuxin19 4162e01a22 cmake(bugfix):Add BEFORE the inc path of the apps and library
Because we expect private configuration to always OVERRIDE public configuration

Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-01-13 13:54:12 -08:00
liqinhui 2740e40ee7 drivers/virtio: Use arc4random_buf to generate MAC address.
Use arc4random_buf instead of rand() to improve randomness quality and avoid using weak PRNG for MAC generation.

Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2026-01-13 13:53:03 -08:00
liucheng5 bbda415412 drivers/sensors: add a new sensor type ENG
Build Documentation / build-html (push) Has been cancelled
Add a new sensor type for ENG sensor.

Signed-off-by: liucheng5 <liucheng5@xiaomi.com>
Signed-off-by: likun17 <likun17@xiaomi.com>
2026-01-13 11:46:07 -03:00
ouyangxiangzhen 4514a11237 sched/sched: Update the comments and docs.
This commit updated the comments and docs after removing the
nxsched_tick_expiration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen 946bd659d8 sched/sched: Remove nxsched_tick_expiration.
This commit removed nxsched_tick_expiration to simplify the scheduler.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen dedfc9af1f sched/wdog: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen b968070829 sched/hrtimer: Update the documentation.
This commit updated the documentation.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen 02aaa976fd sched/hrtimer: Simplify the declaration.
This commit simplifed the type declaration.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
ouyangxiangzhen a518c28add sched/hrtimer: Add callback pointer in hrtimer_start.
The hrtimer is designed to replace the wdog timer in future, so it
should have the callback function in its API. The evaluation results showed there is no any
performance degradation since the CPU pipeline can hide the latency.
This commit also decoupled the rb-tree implementation with the pending
state checking.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-01-13 21:41:35 +08:00
guoshichao cd6a978ba9 arm64_head.S: fix the asm code build error
Add __ASSEMBLY__ protection in stddef.h and stdint.h to prevent assembly
files from attempting to parse C typedef statements, which causes
"unknown mnemonic" errors when assembly source includes these headers.

the following are the detailed build error:
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:167: Error: unknown mnemonic `typedef' -- `typedef _int8_t int8_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:168: Error: unknown mnemonic `typedef' -- `typedef _uint8_t uint8_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:170: Error: unknown mnemonic `typedef' -- `typedef _int16_t int16_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:171: Error: unknown mnemonic `typedef' -- `typedef _uint16_t uint16_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:178: Error: unknown mnemonic `typedef' -- `typedef _int32_t int32_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:179: Error: unknown mnemonic `typedef' -- `typedef _uint32_t uint32_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:193: Error: unknown mnemonic `typedef' -- `typedef _int8_t int_least8_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:194: Error: unknown mnemonic `typedef' -- `typedef _uint8_t uint_least8_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:196: Error: unknown mnemonic `typedef' -- `typedef _int16_t int_least16_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:197: Error: unknown mnemonic `typedef' -- `typedef _uint16_t uint_least16_t'
/home/guoshichao/work_profile/vela_os/vela_open_source_trunk4/nuttx/include/stdint.h:203: Error: unknown mnemonic `typedef' -- `typedef _int32_t int_least24_t'

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-13 21:20:52 +08:00
guoshichao 38e5cbead0 ghs: move the -fmacro-prefix-map compile option to compiler specific
the -fmacro-prefix-map compile option is gcc/clang/armclang specific
compile option, and greenhills do not recognize this compile option, if
we add this option is CMakeLists.txt, the following warning will be
reported when each file is being compiled:

ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/apps=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/boards/mann/dcu/fc4150f1m-labm_a1=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/chips/fc4150=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/nuttx=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/apps=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/boards/mann/dcu/fc4150f1m-labm_a1=" passed to linker
ccarm: Warning: Unknown option "-fmacro-prefix-map=/home/guoshichao/work_profile/vela_os/vela_car_5/vendor/flagchip/chips/fc4150=" passed to linker

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-01-13 21:20:21 +08:00
chenzihan1 513673c11a drivers/ioexpander: add enable & disable macro for gpio SETDEBOUNCE and SETMASK
IOEXPANDER_DEBOUNCE_DISABLE (0): Disable debounce filtering
IOEXPANDER_DEBOUNCE_ENABLE (1): Enable debounce filtering
IOEXPANDER_MASK_DISABLE (0): Unmask the interrupter
IOEXPANDER_MASK_ENABLE (1): Mask the interrupter

Signed-off-by: chenzihan1 <chenzihan1@xiaomi.com>
2026-01-13 09:27:52 -03:00
buxiasen a938926b52 arch/sim: add JB_ALIGN0 for x64 to ensure the align
Or will cause the fork break as call will auto push 1 item.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-01-13 10:29:24 +08:00
buxiasen 1058397807 arch/sim: save errno when do context switch
Avoid the errno changed after interrupt in sim and make return value
mistake when according to errno.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-01-13 10:29:24 +08:00
buxiasen 100c9dd20b arch/sim: add host_errno_get/set for sim to backup/restore in "irq"
Avoid the errno changed after interrupt in sim and make return value
mistake when according to errno.
Move host_errno_convert from macro to sim_errno.c.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-01-13 10:29:24 +08:00
buxiasen cd2bf49474 arch/sim/rawgadget: remove the host_uninterruptible_errno
We will remove the API in next commit, so remove the errno manual save
API and save errno more commonly.
After whole pull request, should no longer need to care about errno.

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-01-13 10:29:24 +08:00
buxiasen 8d2ef7f43c Revert "arch/sim: avoid host-call being interrupted before getting errno"
This reverts commit ac5b38c9e5.

Keep host_errno_convert as a common interface in sim_internal.h
Keep the up_irq_save & up_irq_restore as common interface

Signed-off-by: buxiasen <buxiasen@xiaomi.com>
2026-01-13 10:29:24 +08:00
raiden00pl 88c048b48b .github/build.yml: fix python venv installation
install venv package in one command to avoid issues with ubuntu mirrors

Signed-off-by: raiden00pl <raiden00@railab.me>
2026-01-13 03:10:37 +08:00
zhanghongyu 3bb8749672 drivers/net/igc.c: fix build error
otherwise, enable CONFIG_NETDEV_STATISTICS will result in a compile error

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-01-13 02:17:15 +08:00