simbit18
2be45a3391
Update Fix more generic for platforms that do not have execinfo.h
...
Improve multiplatform code with __has_include.
2023-10-15 01:34:17 +08:00
TaiJuWu
1989749850
cpu_pause.c: fix typo
...
Signed-off-by: TaiJuWu <tjwu1217@gmail.com>
2023-10-14 00:26:31 -04:00
liqinhui
d27ca03b6c
wifi/simdriver: Support the sim wifi.
...
Add the Sim WiFi function, which can provide the wifi operating on nuttx sim emulator,
and support two modes that simulate wifi, HWSIM and RNC(real network card).
- In the HWSIM mode, we simulates two wlan interfaces. The wlan0 is STA and
the wlan1 is AP. The wlan0 can connect to the wlan1 in the nuttx simulator.
- In the RNC mode, we can use the same wlan interface name on the nuttx simulator
to control the connection behavior of the real wireless card.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-10-12 17:08:25 +08:00
Xiang Xiao
dfa0283d83
spinlock: Rename spin_islocked to spin_is_locked
...
align with Linux naming style
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-10-06 20:03:19 -04:00
Xiang Xiao
cb11747f36
arch: add use_data to g_tcbinfo
...
to avoid compiler/linker remove it from the final image
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-29 08:00:18 +03:00
yinshengkai
4f25c287d2
arch/sim: add sim uart_ram support
...
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-09-23 15:22:42 +08:00
yintao
da7d6ef37b
sim_rptun: unlink shm when quit
...
if not unlink shm, the shared memory object still exists in host /dev/shm after quit
if nuttx is started with administrator privileges, or if it is restarted with user
privileges, there will be a problem with the permission to open this shm file
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-23 08:39:38 +02:00
yintao
f3c9a8643b
nuttx: change RPTUNIOC_START and RPTUNIOC_STOP to synchronous
...
Support quit remote when server poweroff
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-20 00:42:02 +08:00
Xiang Xiao
15e78470f8
arch/sim: Guard frame buffer related setting in SIM_X11FB
...
and remove SIM_VNCSERVER
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-19 10:33:52 +08:00
qiaohaijiao1
31da767cfc
sim/alsa: add AUDIO_FMT_PCM query handler
...
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-09-19 09:39:44 +08:00
hujun5
02a3bbc73b
sim/posix: Add the host_system interface
...
Encapsulate the host system interface to host_system.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
2023-09-18 11:41:24 -04:00
qiaohaijiao1
9334ae47c7
sim/sim_alsa: reset alsa pcm device when snd_pcm_avail < 0
...
Signed-off-by: qiaohaijiao1 <qiaohaijiao1@xiaomi.com>
2023-09-18 21:24:02 +08:00
Xiang Xiao
8dbe86084e
Remove FAR from source code under 32bit arch and board
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-16 19:12:13 +03:00
shipei
0beba027e7
audio:add 24K sample rate support
...
Signed-off-by: shipei <shipei@xiaomi.com>
2023-09-15 02:26:03 +08:00
jianglianfang
479bfd5414
sim_framebuffer: add double buffer for sim
...
support double framebuffer mode and adapter to the new vsync queue.
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-09-12 22:10:10 +08:00
pengyiqiang
6536ddcdcf
sim/framebuffer: remove duplicate poll notify
...
The framebuffer of the emulator is a single buffer mode, and the pan_display method is not implemented, so as long as the fb device is created and poll notify once, the fb can be kept in a writable state.
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-09-12 22:10:10 +08:00
Xiang Xiao
d4fd9f53cd
Fix error: arch/sim/src/sim/posix/sim_alsa.c:290:18: error: 'flags' undeclared
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-09-12 10:02:50 +08:00
yintao
9e43a4d31c
sim: To avoid system calls being interrupted when use host api
...
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-11 20:33:49 +08:00
shipei
f150699d7a
audio:add media session support for sim_alsa audio_ops_s interface
...
fix Compiler Warning:initialization of ‘int (*)(struct audio_lowerhalf_s *, void *)’
from incompatible pointer type ‘int (*)(struct audio_lowerhalf_s *)’ [-Wincompatible-pointer-types]
Signed-off-by: shipei <shipei@xiaomi.com>
2023-09-09 00:13:06 +08:00
yanxiaowei
5c780f6697
sim/framebuffer: fix memory leak
...
LeakSanitizer: detected memory leaks in XStringListToTextProperty
Signed-off-by: yanxiaowei <yanxiaowei@xiaomi.com>
2023-09-07 11:21:58 +03:00
cuiziwei
ba73272f67
nuttx/sim:add up_irq_enbale function.
...
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2023-09-06 21:42:42 +03:00
yintao
cb105192c7
nuttx/sim: Sim_rptun support configuring whether the master will automatically boot slave
...
Signed-off-by: yintao <yintao@xiaomi.com>
2023-09-06 17:05:55 +03:00
chao an
664927c86e
mm/alloc: remove all unnecessary cast for alloc
...
Fix the minor style issue and remove unnecessary cast
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-30 14:34:20 +08:00
chao an
518dcbdaad
sim/internal: add typedef pid_t to enhance sim compatibility
...
enhance sim compatibility on windows
Signed-off-by: chao an <anchao@xiaomi.com>
2023-08-28 17:12:45 +03:00
Xiang Xiao
47faeeb360
tls: Move task_tls_alloc and task_tls_destruct to libc
...
so task_tls_destruct can be called from usrspace, which is required by:
https://github.com/apache/nuttx/pull/10288
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-08-28 11:02:18 +03:00
chengkai
d867c46bbc
serial/uart/h5: add bt h5 uart serial driver
...
Signed-off-by: chengkai <chengkai@xiaomi.com>
2023-08-25 17:17:37 +08:00
liqinhui
0d39246b4e
sim/posix: Add the host_system interface used to execute the host command
...
Encapsulate the host system/popen interface to host_system.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
2023-08-21 17:40:40 +08:00
yintao
4b5910efc1
nuttx/sim: simlulator rptun powerdown
...
Signed-off-by: yintao <yintao@xiaomi.com>
2023-08-21 13:21:50 +08:00
chenrun1
709301cbfd
hostfs:support SEEK_CUR
...
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
2023-08-19 01:48:48 +08:00
yinshengkai
88f3bc77f1
toolchain: detect use of large stack variables
...
partition/fs_gpt.c:384:5: warning: stack usage might be 288 bytes [-Wstack-usage=]
384 | int parse_gpt_partition(FAR struct partition_state_s *state,
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-08-15 14:50:27 +03:00
chenxiaoyi
fd34be15eb
sim: use correct size to avoid buffer overflow
...
Fix buffer overflow issue from PR #10128 , since the sizeof
xcpt_reg_t is different on 32/64 bit platform.
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-08-11 20:13:28 +08:00
chenxiaoyi
6d6e1aea3b
sim: Fix sim stack smashing problem
...
The reason is that the new created task receives signal while
it has not entered its stack frame.
Signed-off-by: chenxiaoyi <chenxiaoyi@xiaomi.com>
2023-08-10 23:30:22 +08:00
ligd
324aa7d17f
sim: rptun support panic & reset
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-10 23:13:40 +08:00
wangbowen6
cbb594dcbc
sim: add set/get_power for sim_framebuffer.c
...
add set/get_power operation for sim_framebuffer to avoid assert
in fb_ioctl(cmd= FBIOSET_POWER/FBIOGET_POWER)
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-08-10 15:57:57 +08:00
cuiziwei
c1ddfcfa83
nuttx/arch:support to obtain host cpuinfo in NSH.
2023-08-05 14:57:15 -07:00
yangsen5
d8ca744052
drivers/video: video driver supports NV12
...
Signed-off-by: yangsen5 <yangsen5@xiaomi.com>
2023-08-03 22:37:53 -07:00
yintao
5d1536c5e3
nuttx/sim: use workquene instead of sim_bthcisock_loop
...
Signed-off-by: yintao <yintao@xiaomi.com>
2023-08-03 21:15:36 -07:00
jianglianfang
d5a8746be8
sim framebuffer: Optimize the timing of window to open and to close
...
The window opens when the fb opens and closes when the fb closes.
test step: run fb demo, 1. ./nuttx 2. fb
Signed-off-by: jianglianfang <jianglianfang@xiaomi.com>
2023-08-03 10:36:17 -07:00
ligd
ebaea6bd9f
sim: set loop thread priority to configurable
...
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-08-03 10:15:43 -07:00
yuexinyi
4f0a8dc391
drivers/video: fix if video node do not exist on host of sim env, video driver init fail
...
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-08-02 22:50:03 -07:00
shipei
238eba14ad
alsa/sim_alsa.c:fix ioctl AUDIOIOC_GETBUFFERINFO error
...
when executing ioctl AUDIOIOC_GETBUFFERINFO,the priv->pcm is still NULL,
so it will return -ENXIO,we can remove this check at the start of ioctl
and add in the case where it is used.
Signed-off-by: shipei <shipei@xiaomi.com>
2023-08-02 03:27:12 -07:00
zhangyuan21
8f39ba6ae4
arch: update g_running_tasks when context switch occurred
...
When supporting high-priority interrupts, updating the
g_running_tasks within a high-priority interrupt may be
cause problems. The g_running_tasks should only be updated
when it is determined that a task context switch has occurred.
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-08-01 09:35:18 -07:00
yuexinyi
56be0ab050
drivers/video: add capture arg to support multi instance
...
Signed-off-by: yuexinyi <yuexinyi@xiaomi.com>
2023-07-29 07:42:29 -07:00
dongjiuzhu1
d89e0996f5
sim/usbdev: Add string table as it is needed when USBTRACE is turned on
...
nuttx/drivers/usbdev/usbdev_trprintf.c:418: undefined reference to `g_usb_trace_strings_intdecode'
/usr/bin/ld: nuttx/drivers/usbdev/usbdev_trprintf.c:496: undefined reference to `g_usb_trace_strings_deverror'
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:58:23 -07:00
dongjiuzhu1
ddc2c62aa8
sim/rawgadget: don't push fifo if ioctl failed because it will cause busy read
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 20:58:23 -07:00
dongjiuzhu1
7d281f46de
sim/hostfs: fix issue about access file with size more than 2GB
...
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-07-28 07:42:12 -07:00
anjiahao
2645e59901
sim/tcbinfo:add ebp to tcbinfo
...
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-07-26 06:57:25 -07:00
guoshichao
3524f4b9ce
libs/libc/fork: add lib_fork implementation
...
1. add lib_fork api in libs/libc, we need a fork() api to implement the
fork relative method, such as pthread_atfork
2. rename the assembly fork entry function name to up_fork(), and rename
the up_fork() to arch specific name, such as
sim_fork()/arm_fork()/mips_fork() etc.
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2023-07-26 10:41:52 +02:00
Xiang Xiao
46b25b3849
arch: Compute the array size by nitems
...
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-26 09:33:38 +02:00
Xiang Xiao
f3269a6caa
sched: Rename DEBUG_TCBINFO to ARCH_HAVE_TCBINFO
...
and select if the arch support to define g_tcbinfo variable
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-07-26 09:33:38 +02:00