zhanghongyu
ac3a7da8ed
sim_netdriver: add addmac/rmmac support
...
Avoid PACKET_ADD_MEMBERSHIP calls returning errors.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2025-12-25 10:01:43 +08:00
yezhonghui
ba681d3ddf
sim_uart: used wd timer to process transmit
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
276095dc77
sim_rptun: used wd timer to process transmit
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
aeda575c5b
sim_hcisock: used wd timer to process transmit
...
used wdt thread to process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
93bf613505
sim/loop: delete sim loop theads at bringup
...
wdt thread replace sim loop thread
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
0e6afae4f2
usbhost: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
bb304441db
foc: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
a536ea8569
usbdev: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
e2ca205f12
camera: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
954122641a
audio: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
bbcf8fe30b
usrsock: used wd timer to process loop event
...
used wdt thread process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
c594616e99
netdriver: used wd timer to process netdata
...
used wdt thread to process loop event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
c385d74669
lcd/fb: sim used wd timer to process loop event
...
used wdt thread to process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
yezhonghui
6b1f484bbd
input: change wd timer to precoss input device event
...
used wdt threads process event
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-24 22:50:24 +08:00
wangchen
d59cf4a91c
sim_wifidriver.c:resolve issue in wapi save_config & wapi reconnect command
...
resolove issue wapi save_config & wapi reconnect command in sim
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2025-12-23 09:06:11 -03:00
anjiahao
0a2b01950c
sched:use tcb_s inside of task_tcb_s , remove all cast
...
Simplify the code and remove different tcb
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-12-22 17:55:45 +08:00
yezhonghui
1fe3de379a
sim/spi: delete invaild cs change with ioctl transfer
...
delete invaild cs
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-21 06:37:39 +08:00
yezhonghui
96db23e7df
sim/spi: ioctl stytemcall use host_uninterruptible
...
syscall use macro host_uninterruptible
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2025-12-21 06:37:39 +08:00
guohao15
635d81a76b
cmake:add missing cflag "-D_FILE_OFFSET_BITS=64" of sim
...
The -D_FILE_OFFSET_BITS=64 parameter is missing
during the CMake compilation of the sim (simulator) build,
which causes incorrect version invocations of interfaces
such as hostfs_stat.
Signed-off-by: guohao15 <guohao15@xiaomi.com>
2025-12-18 22:18:49 +08:00
anjiahao
b623c781c5
arch:use ARCH_64BIT to mark arch is support 64bit
...
Add ARCH_64BIT macro to indicate architectures with 64-bit support,
improving portability and conditional compilation.
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2025-12-18 22:05:12 +08:00
yangsong8
3a76917058
sim/usbdev: Process all pending data at once
...
After processing a packet of data, do not exit interrupt, but continues
to check whether there is data to be processed. If there is, continue
processing.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
ligd
6736558d10
sim_usb: fix host function caused up_interrupt_context() failed
...
use host_uninterruptible to protect some system functions
Signed-off-by: ligd <liguiding1@xiaomi.com>
2025-12-12 09:35:26 +08:00
yangsong8
8bf88945ce
sim/usbdev: Supports registering multiple USB devices on a same host
...
when start multiple sim, the host refuses to recognize multiple USB
devices, and the prompt message is as follows:
[365652.175289] UDC core: USB Raw Gadget: couldn't find an available UDC or it's busy
[365652.175304] misc raw-gadget: fail, usb_gadget_probe_driver returned -16
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
yangsong8
3a0d2cbd41
sim_usb: fix dev function caused up_interrupt_context() failed
...
use host_uninterruptible to protect some system functions.
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2025-12-12 09:35:26 +08:00
chenxiaoyi
6308167c45
arch/sim: fix oneshot driver to work with both signal and sleep
...
This commit fixed oneshot driver to work with both signal and sleep.
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
29bf45c371
arch/sim: Add clkdev driver for sim.
...
This commit added clkdev driver for sim.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-24 19:43:07 +08:00
ouyangxiangzhen
fc28b93224
timers/oneshot: Remove all callback and args.
...
This commit remove all callback and args in the APIs.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
ouyangxiangzhen
5c113f79b7
timers/oneshot: Remove all private callback.
...
This commit removed all private callback and handle it on the upperhalf
of oneshot.
Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2025-11-18 13:02:29 +01:00
guoshengyuan1
5d7ac216f2
arch: optimize up_check_tcbstack for stack overflow detection
...
Many times, context switching does not occur when the thread stack
memory is almost exhausted, so we need to mofify up_check_tcbstack to
accurately detect it.
Co-authored-by: Chengdong Wang <wangchengdong@lixiang.com>
Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
2025-09-27 12:56:11 +08:00
guoshengyuan1
6a57c56925
arch: replace all nxsched_suspend/resume_*** with nxsched_switch_context
...
Complete the missing scheduling information in some architectures
In these architectures (riscv, avr, tricor) context switching
can occur in both up_switch_context and xx_doirq
Co-authored-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
2025-09-25 16:40:23 +08:00
guoshengyuan1
fc15b8da8a
arch: unify the scheduling information of task_exit
...
Replace all nxsched_suspend/resume_*** with nxsched_switch_context
Delete nxsched_resume_scheduler in up_exit and call it uniformly in task_exit
Co-authored-by: yinshengkai <yinshengkai@xiaomi.com>
Signed-off-by: guoshengyuan1 <guoshengyuan1@xiaomi.com>
2025-09-25 16:40:23 +08:00
wangchengdong
b92e0b6730
arch: fix alignment bug for archs that need stack alignment
...
These archs only align the size of the stack, forgeting to do the
stack start addr alignment, this patch fixes it.
Signed-off-by: Chengdong Wang <wangchengdong@lixiang.com>
2025-09-18 11:11:32 -03:00
nuttxs
a5b810bdb1
Kconfig: Add configurable Stack Canaries protection levels.
...
Introduce a configurable stack-protection level for the existing
CONFIG_STACK_CANARIES, instead of hard-coding -fstack-protector-all.
Add Kconfig choice STACK_CANARIES_LEVEL four selectable levels:
-fstack-protector
-fstack-protector-strong
-fstack-protector-all (default)
-fstack-protector-explicit
Signed-off-by: nuttxs <zhaoqing.zhang@sony.com>
2025-09-11 19:56:42 +08:00
raiden00pl
40690a9951
arch/sim/sim_canchar.c: fix CAN flags decoding for message
...
fix CAN flags decoding for SIM CAN
Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-08 21:47:48 +08:00
raiden00pl
67eb2bfd29
arch/sim/can: add loopback support for CAN character dev
...
add loopback support for sim CAN character dev
Signed-off-by: raiden00pl <raiden00@railab.me>
2025-09-08 21:41:18 +08:00
guanyi
ac5b38c9e5
arch/sim: avoid host-call being interrupted before getting errno
...
Sim use coroutine base on one thread in host to do switch context. but if we allow switch context with in one API (host-API and errno get), maybe the switch context from coroutine cause re-enter host-API call. Make the errno get behavior not work as expected.
Signed-off-by: guanyi3 <guanyi3@xiaomi.com>
2025-07-21 19:19:05 -03:00
raiden00pl
194b635739
arch: unify Private Types banners
...
unify Private Types banners according to NuttX coding standard
Signed-off-by: raiden00pl <raiden00@railab.me>
2025-05-28 10:17:15 +08:00
wangzhi16
35a62b7d5e
Revert "Reduce the size of tcb by four bytes."
...
This reverts commit 893c5e92c2 .
2025-05-27 16:30:35 +08:00
p-szafonimateusz
7cb09d96e3
arch/sim/sim_canchar.c: fix compilation when CAN FD is disabled
...
Fix case for CAN character driver in simulator when CANFD is disabled
and ch_edl field is not present in CAN header.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-24 21:28:51 +08:00
Lars Kruse
3dc53adb28
arch | boards | drivers: fix whitespace issues for switch case statements
2025-05-23 10:48:41 +08:00
Lars Kruse
3ce85ca54e
style: fix spelling in code comments and strings
2025-05-23 10:48:41 +08:00
p-szafonimateusz
cc5d6fcb41
arch/sim/Kconfig: fix codespell issues
...
arch/sim/Kconfig: fix codespell issues
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-14 21:50:15 +08:00
p-szafonimateusz
df76246c03
arch/sim/Kconfig: simulated CAN depends on LINUX host
...
simulated CAN depends on LINUX host now
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-14 21:50:15 +08:00
p-szafonimateusz
5bf3110777
arch/sim/sim_canchar.c: notify upper-half driver that tx done
...
add missing can_txdone() callback after message is send
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-14 03:05:56 +08:00
Jukka Laitinen
e78a33464e
arch/sim/src/sim/sim_oneshot.c: Fix spelling in comments, "Ths" -> "This"
...
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-13 21:05:12 +08:00
Jukka Laitinen
bf870e51ba
arch/sim/sim_oneshot: Calculate next oneshot time in ticks instead of timespec
...
This removes drift in tick start times, when the base time is always rounded to
tick boundary.
Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
2025-05-13 21:05:12 +08:00
p-szafonimateusz
76e1b80076
arch/sim: add CAN support based on host SocketCAN
...
Add CAN support for sim target based on host SocketCAN interface.
Tested with virtual CAN on Linux but should work also with hardware CAN cards supported by host.
Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
2025-05-03 11:26:08 +08:00
chao an
52482219c8
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>
2025-04-11 09:43:22 +08:00
zhangshoukui
69597ec486
arch/sim: Add i2s setup and shutdown interface
...
This interface is required if you want to open an i2c node directly on the sim
https://github.com/apache/nuttx/pull/12848/commits/12b4340b009d55f30508b1ebb1da1c4faec674a7
Signed-off-by: zhangshoukui <zhangshoukui@xiaomi.com>
2025-04-10 18:10:54 +08:00
Xiang Xiao
8fd8af9edc
Revert "Use small lock to protect usbdev and endpoint in sim."
...
This reverts commit 4558db18e4 .
2025-02-13 14:15:43 +08:00