Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2301_76519099
rt-thread
提交
e6ae01e3
R
rt-thread
项目概览
2301_76519099
/
rt-thread
与 Fork 源项目一致
Fork自
RT-Thread / rt-thread
通知
3
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rt-thread
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
e6ae01e3
编写于
11月 10, 2021
作者:
B
Bernard Xiong
提交者:
GitHub
11月 10, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #5259 from mysterywolf/posix
[posix] 优化posix若干
上级
fdbaa2a8
219d1e20
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
178 addition
and
289 deletion
+178
-289
bsp/qemu-vexpress-a9/.config
bsp/qemu-vexpress-a9/.config
+35
-70
bsp/qemu-vexpress-a9/rtconfig.h
bsp/qemu-vexpress-a9/rtconfig.h
+14
-51
components/dfs/Kconfig
components/dfs/Kconfig
+1
-1
components/dfs/include/dfs_fs.h
components/dfs/include/dfs_fs.h
+1
-2
components/dfs/src/dfs.c
components/dfs/src/dfs.c
+4
-4
components/finsh/shell.c
components/finsh/shell.c
+6
-6
components/finsh/shell.h
components/finsh/shell.h
+1
-1
components/libc/Kconfig
components/libc/Kconfig
+46
-27
components/libc/compilers/armlibc/syscalls.c
components/libc/compilers/armlibc/syscalls.c
+7
-7
components/libc/compilers/dlib/syscall_read.c
components/libc/compilers/dlib/syscall_read.c
+2
-2
components/libc/compilers/dlib/syscall_write.c
components/libc/compilers/dlib/syscall_write.c
+2
-2
components/libc/compilers/gcc/newlib/syscalls.c
components/libc/compilers/gcc/newlib/syscalls.c
+4
-2
components/libc/compilers/readme.md
components/libc/compilers/readme.md
+1
-0
components/libc/posix/mmap/SConscript
components/libc/posix/mmap/SConscript
+0
-13
components/libc/posix/readme.md
components/libc/posix/readme.md
+1
-0
components/libc/posix/src/SConscript
components/libc/posix/src/SConscript
+14
-4
components/libc/posix/src/delay.c
components/libc/posix/src/delay.c
+36
-0
components/libc/posix/src/mmap.c
components/libc/posix/src/mmap.c
+0
-0
components/libc/posix/src/poll.c
components/libc/posix/src/poll.c
+0
-4
components/libc/posix/src/select.c
components/libc/posix/src/select.c
+0
-4
components/libc/posix/src/unistd.c
components/libc/posix/src/unistd.c
+0
-78
components/lwp/Kconfig
components/lwp/Kconfig
+2
-1
components/lwp/lwp_syscall.c
components/lwp/lwp_syscall.c
+0
-1
components/net/Kconfig
components/net/Kconfig
+1
-2
include/rtdebug.h
include/rtdebug.h
+0
-7
未找到文件。
bsp/qemu-vexpress-a9/.config
浏览文件 @
e6ae01e3
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib)
#
# Automatically generated file; DO NOT EDIT.
# RT-Thread Project Configuration
#
#
# RT-Thread Kernel
#
CONFIG_RT_NAME_MAX
=
8
# CONFIG_RT_USING_BIG_ENDIAN is not set
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
CONFIG_RT_USING_SMP
=
y
CONFIG_RT_CPUS_NR
=
2
...
...
@@ -28,8 +32,7 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024
#
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# end of kservice optimization
# CONFIG_RT_USING_ASM_MEMCPY is not set
CONFIG_RT_DEBUG
=
y
CONFIG_RT_DEBUG_COLOR
=
y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set
...
...
@@ -52,7 +55,6 @@ CONFIG_RT_USING_EVENT=y
CONFIG_RT_USING_MAILBOX
=
y
CONFIG_RT_USING_MESSAGEQUEUE
=
y
CONFIG_RT_USING_SIGNALS
=
y
# end of Inter-Thread communication
#
# Memory Management
...
...
@@ -66,7 +68,6 @@ CONFIG_RT_USING_SMALL_MEM=y
# CONFIG_RT_USING_USERHEAP is not set
CONFIG_RT_USING_MEMTRACE
=
y
CONFIG_RT_USING_HEAP
=
y
# end of Memory Management
#
# Kernel Device Object
...
...
@@ -78,16 +79,15 @@ CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE
=
256
CONFIG_RT_CONSOLE_DEVICE_NAME
=
"uart0"
# CONFIG_RT_PRINTF_LONGLONG is not set
# end of Kernel Device Object
CONFIG_RT_VER_NUM
=
0
x40004
# end of RT-Thread Kernel
CONFIG_ARCH_ARM
=
y
CONFIG_RT_USING_CPU_FFS
=
y
CONFIG_ARCH_ARM_CORTEX_A
=
y
# CONFIG_RT_SMP_AUTO_BOOT is not set
CONFIG_RT_USING_GIC_V2
=
y
# CONFIG_RT_USING_GIC_V3 is not set
CONFIG_ARCH_ARM_CORTEX_A9
=
y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
#
# RT-Thread Components
...
...
@@ -102,7 +102,6 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10
#
CONFIG_RT_USING_CPLUSPLUS
=
y
# CONFIG_RT_USING_CPLUSPLUS11 is not set
# end of C++ features
#
# Command shell
...
...
@@ -122,7 +121,6 @@ CONFIG_FINSH_USING_DESCRIPTION=y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
# CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_ARG_MAX
=
10
# end of Command shell
#
# Device virtual file system
...
...
@@ -156,13 +154,10 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT
=
y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT
=
3000
# end of elm-chan's FatFs, Generic FAT Filesystem Module
CONFIG_RT_USING_DFS_DEVFS
=
y
CONFIG_RT_USING_DFS_ROMFS
=
y
CONFIG_RT_USING_DFS_RAMFS
=
y
# CONFIG_RT_USING_DFS_NFS is not set
# end of Device virtual file system
#
# Device Drivers
...
...
@@ -226,26 +221,29 @@ CONFIG_RT_USING_WDT=y
#
# Using USB
#
# CONFIG_RT_USING_USB is not set
# CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE is not set
# end of Using USB
# end of Device Drivers
#
# POSIX layer and C standard library
#
CONFIG_RT_USING_LIBC
=
y
CONFIG_RT_USING_PTHREADS
=
y
CONFIG_PTHREAD_NUM_MAX
=
8
CONFIG_RT_LIBC_USING_TIME
=
y
# CONFIG_RT_LIBC_USING_FILEIO is not set
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE
=
8
CONFIG_RT_USING_POSIX
=
y
# CONFIG_RT_USING_POSIX_STDIO is not set
CONFIG_RT_USING_POSIX_POLL
=
y
CONFIG_RT_USING_POSIX_SELECT
=
y
CONFIG_RT_USING_POSIX_DELAY
=
y
CONFIG_RT_USING_POSIX_GETLINE
=
y
CONFIG_RT_USING_POSIX_MMAP
=
y
CONFIG_RT_USING_POSIX_TERMIOS
=
y
CONFIG_RT_USING_POSIX_GETLINE
=
y
CONFIG_RT_USING_POSIX_AIO
=
y
CONFIG_RT_LIBC_USING_TIME
=
y
# CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE
=
8
# end of POSIX layer and C standard library
CONFIG_RT_USING_PTHREADS
=
y
CONFIG_PTHREAD_NUM_MAX
=
8
#
# Network
...
...
@@ -261,10 +259,7 @@ CONFIG_SAL_INTERNET_CHECK=y
# protocol stack implement
#
CONFIG_SAL_USING_LWIP
=
y
# end of protocol stack implement
CONFIG_SAL_USING_POSIX
=
y
# end of Socket abstraction layer
#
# Network interface device
...
...
@@ -277,7 +272,7 @@ CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4
=
1
CONFIG_NETDEV_IPV6
=
0
#
end of Network interface device
#
CONFIG_NETDEV_IPV6_SCOPES is not set
#
# light weight TCP/IP stack
...
...
@@ -303,8 +298,6 @@ CONFIG_IP_SOF_BROADCAST_RECV=1
CONFIG_RT_LWIP_IPADDR
=
"192.168.1.30"
CONFIG_RT_LWIP_GWADDR
=
"192.168.1.1"
CONFIG_RT_LWIP_MSKADDR
=
"255.255.255.0"
# end of Static IPv4 Address
CONFIG_RT_LWIP_UDP
=
y
CONFIG_RT_LWIP_TCP
=
y
CONFIG_RT_LWIP_RAW
=
y
...
...
@@ -339,22 +332,17 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
# CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set
CONFIG_RT_LWIP_USING_PING
=
y
# CONFIG_RT_LWIP_DEBUG is not set
# end of light weight TCP/IP stack
#
# AT commands
#
# CONFIG_RT_USING_AT is not set
# end of AT commands
# CONFIG_LWIP_USING_DHCPD is not set
# end of Network
#
# VBUS(Virtual Software BUS)
#
# CONFIG_RT_USING_VBUS is not set
# end of VBUS(Virtual Software BUS)
#
# Utilities
...
...
@@ -364,16 +352,12 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set
# end of Utilities
CONFIG_RT_USING_LWP
=
y
# end of RT-Thread Components
#
# RT-Thread Utestcases
#
# CONFIG_RT_USING_UTESTCASES is not set
# end of RT-Thread Utestcases
#
# RT-Thread online packages
...
...
@@ -408,17 +392,12 @@ CONFIG_RT_USING_LWP=y
# Marvell WiFi
#
# CONFIG_PKG_USING_WLANMARVELL is not set
# end of Marvell WiFi
#
# Wiced WiFi
#
# CONFIG_PKG_USING_WLAN_WICED is not set
# end of Wiced WiFi
# CONFIG_PKG_USING_RW007 is not set
# end of Wi-Fi
# CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set
...
...
@@ -440,8 +419,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set
# end of IoT Cloud
# CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
# CONFIG_PKG_USING_IPMSG is not set
...
...
@@ -475,7 +452,7 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set
# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set
# CONFIG_PKG_USING_HM is not set
#
end of IoT - internet of things
#
CONFIG_PKG_USING_SMALL_MODBUS is not set
#
# security packages
...
...
@@ -485,7 +462,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set
# end of security packages
#
# language packages
...
...
@@ -494,22 +470,19 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set
# CONFIG_PKG_USING_PIKASCRIPT is not set
# end of language packages
#
# multimedia packages
#
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set
#
#
lvgl
: powerful and easy-to-use embedded GUI library
#
LVGL
: powerful and easy-to-use embedded GUI library
#
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LVGL is not set
# end of lvgl: powerful and easy-to-use embedded GUI library
# CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set
# CONFIG_PKG_USING_WAVPLAYER is not set
# CONFIG_PKG_USING_TJPGD is not set
# CONFIG_PKG_USING_PDFGEN is not set
...
...
@@ -526,8 +499,6 @@ CONFIG_RT_USING_LWP=y
#
# CONFIG_PKG_USING_U8G2_OFFICIAL is not set
# CONFIG_PKG_USING_U8G2 is not set
# end of u8g2: a monochrome graphic library
# end of multimedia packages
#
# tools packages
...
...
@@ -570,7 +541,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_MEM_SANDBOX is not set
# CONFIG_PKG_USING_SOLAR_TERMS is not set
# CONFIG_PKG_USING_GAN_ZHI is not set
# end of tools packages
#
# system packages
...
...
@@ -583,7 +553,13 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
# CONFIG_PKG_USING_QFPLIB_M3 is not set
# end of acceleration: Assembly language or algorithmic acceleration packages
#
# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard
#
# CONFIG_PKG_USING_CMSIS_5 is not set
# CONFIG_PKG_USING_CMSIS_5_AUX is not set
# CONFIG_PKG_USING_CMSIS_RTOS2 is not set
#
# Micrium: Micrium software products porting for RT-Thread
...
...
@@ -594,8 +570,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_UC_CLK is not set
# CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set
# end of Micrium: Micrium software products porting for RT-Thread
# CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set
# CONFIG_PKG_USING_CAIRO is not set
...
...
@@ -605,7 +579,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_FLASHDB is not set
# CONFIG_PKG_USING_SQLITE is not set
# CONFIG_PKG_USING_RTI is not set
# CONFIG_PKG_USING_CMSIS is not set
# CONFIG_PKG_USING_DFS_YAFFS is not set
# CONFIG_PKG_USING_LITTLEFS is not set
# CONFIG_PKG_USING_DFS_JFFS2 is not set
...
...
@@ -630,7 +603,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_WCWIDTH is not set
# CONFIG_PKG_USING_MCUBOOT is not set
# CONFIG_PKG_USING_TINYUSB is not set
# end of system packages
#
# peripheral libraries and drivers
...
...
@@ -706,7 +678,7 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
# CONFIG_PKG_USING_BL_MCU_SDK is not set
# CONFIG_PKG_USING_SOFT_SERIAL is not set
#
end of peripheral libraries and drivers
#
CONFIG_PKG_USING_MB85RS16 is not set
#
# AI packages
...
...
@@ -720,7 +692,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_QUEST is not set
# CONFIG_PKG_USING_NAXOS is not set
# end of AI packages
#
# miscellaneous packages
...
...
@@ -733,7 +704,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set
# end of samples: kernel and components samples
#
# entertainment: terminal games and other interesting software packages
...
...
@@ -747,8 +717,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_SNAKE is not set
# CONFIG_PKG_USING_TETRIS is not set
# CONFIG_PKG_USING_DONUT is not set
# end of entertainment: terminal games and other interesting software packages
# CONFIG_PKG_USING_LIBCSV is not set
# CONFIG_PKG_USING_OPTPARSE is not set
# CONFIG_PKG_USING_FASTLZ is not set
...
...
@@ -778,9 +746,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_MCURSES is not set
# CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_TERMBOX is not set
# end of miscellaneous packages
# end of RT-Thread online packages
CONFIG_SOC_VEXPRESS_A9
=
y
CONFIG_RT_USING_UART0
=
y
CONFIG_RT_USING_UART1
=
y
...
...
bsp/qemu-vexpress-a9/rtconfig.h
浏览文件 @
e6ae01e3
#ifndef RT_CONFIG_H__
#define RT_CONFIG_H__
/* Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) */
/* Automatically generated file; DO NOT EDIT. */
/* RT-Thread Project Configuration */
/* RT-Thread Kernel */
...
...
@@ -24,7 +25,6 @@
/* kservice optimization */
/* end of kservice optimization */
#define RT_DEBUG
#define RT_DEBUG_COLOR
...
...
@@ -36,7 +36,6 @@
#define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE
#define RT_USING_SIGNALS
/* end of Inter-Thread communication */
/* Memory Management */
...
...
@@ -45,7 +44,6 @@
#define RT_USING_SMALL_MEM
#define RT_USING_MEMTRACE
#define RT_USING_HEAP
/* end of Memory Management */
/* Kernel Device Object */
...
...
@@ -55,9 +53,7 @@
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 256
#define RT_CONSOLE_DEVICE_NAME "uart0"
/* end of Kernel Device Object */
#define RT_VER_NUM 0x40004
/* end of RT-Thread Kernel */
#define ARCH_ARM
#define RT_USING_CPU_FFS
#define ARCH_ARM_CORTEX_A
...
...
@@ -74,7 +70,6 @@
/* C++ features */
#define RT_USING_CPLUSPLUS
/* end of C++ features */
/* Command shell */
...
...
@@ -91,7 +86,6 @@
#define MSH_USING_BUILT_IN_COMMANDS
#define FINSH_USING_DESCRIPTION
#define FINSH_ARG_MAX 10
/* end of Command shell */
/* Device virtual file system */
...
...
@@ -115,11 +109,9 @@
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
#define RT_DFS_ELM_REENTRANT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000
/* end of elm-chan's FatFs, Generic FAT Filesystem Module */
#define RT_USING_DFS_DEVFS
#define RT_USING_DFS_ROMFS
#define RT_USING_DFS_RAMFS
/* end of Device virtual file system */
/* Device Drivers */
...
...
@@ -156,22 +148,22 @@
/* Using USB */
/* end of Using USB */
/* end of Device Drivers */
/* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_
USING_PTHREADS
#define
PTHREAD_NUM_MAX
8
#define RT_
LIBC_USING_TIME
#define
RT_LIBC_DEFAULT_TIMEZONE
8
#define RT_USING_POSIX
#define RT_USING_POSIX_POLL
#define RT_USING_POSIX_SELECT
#define RT_USING_POSIX_DELAY
#define RT_USING_POSIX_GETLINE
#define RT_USING_POSIX_MMAP
#define RT_USING_POSIX_TERMIOS
#define RT_USING_POSIX_GETLINE
#define RT_USING_POSIX_AIO
#define RT_LIBC_USING_TIME
#define RT_LIBC_DEFAULT_TIMEZONE 8
/* end of POSIX layer and C standard library */
#define RT_USING_PTHREADS
#define PTHREAD_NUM_MAX 8
/* Network */
...
...
@@ -183,9 +175,7 @@
/* protocol stack implement */
#define SAL_USING_LWIP
/* end of protocol stack implement */
#define SAL_USING_POSIX
/* end of Socket abstraction layer */
/* Network interface device */
...
...
@@ -196,7 +186,6 @@
#define NETDEV_USING_AUTO_DEFAULT
#define NETDEV_IPV4 1
#define NETDEV_IPV6 0
/* end of Network interface device */
/* light weight TCP/IP stack */
...
...
@@ -214,7 +203,6 @@
#define RT_LWIP_IPADDR "192.168.1.30"
#define RT_LWIP_GWADDR "192.168.1.1"
#define RT_LWIP_MSKADDR "255.255.255.0"
/* end of Static IPv4 Address */
#define RT_LWIP_UDP
#define RT_LWIP_TCP
#define RT_LWIP_RAW
...
...
@@ -242,26 +230,19 @@
#define LWIP_SO_LINGER 0
#define LWIP_NETIF_LOOPBACK 0
#define RT_LWIP_USING_PING
/* end of light weight TCP/IP stack */
/* AT commands */
/* end of AT commands */
/* end of Network */
/* VBUS(Virtual Software BUS) */
/* end of VBUS(Virtual Software BUS) */
/* Utilities */
/* end of Utilities */
#define RT_USING_LWP
/* end of RT-Thread Components */
/* RT-Thread Utestcases */
/* end of RT-Thread Utestcases */
/* RT-Thread online packages */
...
...
@@ -272,72 +253,54 @@
/* Marvell WiFi */
/* end of Marvell WiFi */
/* Wiced WiFi */
/* end of Wiced WiFi */
/* end of Wi-Fi */
/* IoT Cloud */
/* end of IoT Cloud */
/* end of IoT - internet of things */
/* security packages */
/* end of security packages */
/* language packages */
/* end of language packages */
/* multimedia packages */
/* LVGL: powerful and easy-to-use embedded GUI library */
/* lvgl: powerful and easy-to-use embedded GUI library */
/* end of lvgl: powerful and easy-to-use embedded GUI library */
/* u8g2: a monochrome graphic library */
/* end of u8g2: a monochrome graphic library */
/* end of multimedia packages */
/* tools packages */
/* end of tools packages */
/* system packages */
/* acceleration: Assembly language or algorithmic acceleration packages */
/* end of acceleration: Assembly language or algorithmic acceleration packages */
/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
/* Micrium: Micrium software products porting for RT-Thread */
/* end of Micrium: Micrium software products porting for RT-Thread */
/* end of system packages */
/* peripheral libraries and drivers */
/* end of peripheral libraries and drivers */
/* AI packages */
/* end of AI packages */
/* miscellaneous packages */
/* samples: kernel and components samples */
/* end of samples: kernel and components samples */
/* entertainment: terminal games and other interesting software packages */
/* end of entertainment: terminal games and other interesting software packages */
/* end of miscellaneous packages */
/* end of RT-Thread online packages */
#define SOC_VEXPRESS_A9
#define RT_USING_UART0
#define RT_USING_UART1
...
...
components/dfs/Kconfig
浏览文件 @
e6ae01e3
...
...
@@ -133,7 +133,7 @@ if RT_USING_DFS
config RT_USING_DFS_DEVFS
bool "Using devfs for device objects"
default
y
default
n
config RT_USING_DFS_ROMFS
bool "Enable ReadOnly file system on flash"
...
...
components/dfs/include/dfs_fs.h
浏览文件 @
e6ae01e3
...
...
@@ -12,10 +12,9 @@
#define __DFS_FS_H__
#include <dfs.h>
#ifdef RT_USING_LIBC
#include <sys/types.h>
#endif
#include <sys/errno.h>
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
components/dfs/src/dfs.c
浏览文件 @
e6ae01e3
...
...
@@ -18,9 +18,9 @@
#include <lwp.h>
#endif
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
#include <libc.h>
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
/* Global variables */
const
struct
dfs_filesystem_ops
*
filesystem_operation_table
[
DFS_FILESYSTEM_TYPES_MAX
];
...
...
@@ -216,10 +216,10 @@ struct dfs_fd *fd_get(int fd)
struct
dfs_fd
*
d
;
struct
dfs_fdtable
*
fdt
;
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
if
((
0
<=
fd
)
&&
(
fd
<=
2
))
fd
=
libc_stdio_get_console
();
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
fdt
=
dfs_fdtable_get
();
fd
=
fd
-
DFS_FD_OFFSET
;
...
...
components/finsh/shell.c
浏览文件 @
e6ae01e3
...
...
@@ -146,7 +146,7 @@ int finsh_getchar(void)
{
#ifdef RT_USING_DEVICE
char
ch
=
0
;
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
if
(
read
(
STDIN_FILENO
,
&
ch
,
1
)
>
0
)
{
return
ch
;
...
...
@@ -170,14 +170,14 @@ int finsh_getchar(void)
rt_sem_take
(
&
shell
->
rx_sem
,
RT_WAITING_FOREVER
);
return
ch
;
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
#else
extern
char
rt_hw_console_getchar
(
void
);
return
rt_hw_console_getchar
();
#endif
/* RT_USING_DEVICE */
}
#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
#if !defined(RT_USING_POSIX
_STDIO
) && defined(RT_USING_DEVICE)
static
rt_err_t
finsh_rx_ind
(
rt_device_t
dev
,
rt_size_t
size
)
{
RT_ASSERT
(
shell
!=
RT_NULL
);
...
...
@@ -241,7 +241,7 @@ const char *finsh_get_device()
RT_ASSERT
(
shell
!=
RT_NULL
);
return
shell
->
device
->
parent
.
name
;
}
#endif
#endif
/* !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE) */
/**
* @ingroup finsh
...
...
@@ -443,7 +443,7 @@ void finsh_thread_entry(void *parameter)
shell
->
echo_mode
=
0
;
#endif
#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
#if !defined(RT_USING_POSIX
_STDIO
) && defined(RT_USING_DEVICE)
/* set console device as shell device */
if
(
shell
->
device
==
RT_NULL
)
{
...
...
@@ -453,7 +453,7 @@ void finsh_thread_entry(void *parameter)
finsh_set_device
(
console
->
parent
.
name
);
}
}
#endif
#endif
/* !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE) */
#ifdef FINSH_USING_AUTH
/* set the default password when the password isn't setting */
...
...
components/finsh/shell.h
浏览文件 @
e6ae01e3
...
...
@@ -78,7 +78,7 @@ struct finsh_shell
rt_uint16_t
line_position
;
rt_uint16_t
line_curpos
;
#if !defined(RT_USING_POSIX) && defined(RT_USING_DEVICE)
#if !defined(RT_USING_POSIX
_STDIO
) && defined(RT_USING_DEVICE)
rt_device_t
device
;
#endif
...
...
components/libc/Kconfig
浏览文件 @
e6ae01e3
...
...
@@ -10,8 +10,8 @@ if RT_USING_LIBC
config RT_LIBC_USING_FILEIO
bool "Enable libc with file operation, eg.fopen/fwrite/fread/getchar"
select RT_USING_DFS
select RT_USING_POSIX
select RT_USING_POSIX_STDIO
default n
config RT_USING_MODULE
...
...
@@ -37,40 +37,59 @@ config RT_LIBC_DEFAULT_TIMEZONE
range -12 12
default 8
config RT_USING_PTHREADS
bool "Enable pthreads APIs"
config RT_USING_POSIX
bool "Enable basic POSIX layer, open/read/write/close etc"
select RT_USING_DFS
default n
if RT_USING_PTHREADS
config PTHREAD_NUM_MAX
int "Maximum number of pthreads"
default 8
endif
if RT_USING_DFS
config RT_USING_POSIX
bool "Enable POSIX layer, open/read/write/select etc"
if RT_USING_POSIX
config RT_USING_POSIX_STDIO
bool "Enable standard I/O"
select RT_USING_DFS
select RT_USING_DFS_DEVFS
default
y
default
n
if RT_USING_POSIX
config RT_USING_POSIX_MMAP
bool "Enable mmap() API"
default n
config RT_USING_POSIX_POLL
bool "Enable poll()"
select RT_USING_DFS
default n
config RT_USING_POSIX_TERMIOS
bool "Enable termios APIs"
default n
config RT_USING_POSIX_SELECT
bool "Enable select()"
select RT_USING_DFS
select RT_USING_POSIX_POLL
default n
config RT_USING_POSIX_GETLINE
bool "Enable getline()/getdelim() API
s"
default n
config RT_USING_POSIX_DELAY
bool "Enable delay function
s"
default n
config RT_USING_POSIX_AIO
bool "Enable AIO"
default n
endif
config RT_USING_POSIX_GETLINE
bool "Enable getline()/getdelim() APIs"
default n
config RT_USING_POSIX_MMAP
bool "Enable mmap() API"
select RT_USING_DFS
default n
config RT_USING_POSIX_TERMIOS
bool "Enable termios APIs"
default n
config RT_USING_POSIX_AIO
bool "Enable AIO"
default n
endif
config RT_USING_PTHREADS
bool "Enable pthreads APIs"
default n
if RT_USING_PTHREADS
config PTHREAD_NUM_MAX
int "Maximum number of pthreads"
default 8
endif
endmenu
components/libc/compilers/armlibc/syscalls.c
浏览文件 @
e6ae01e3
...
...
@@ -21,7 +21,7 @@
#include <fcntl.h>
#include <unistd.h>
#include <sys/stat.h>
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
#include "libc.h"
#endif
...
...
@@ -144,7 +144,7 @@ int _sys_close(FILEHANDLE fh)
*/
int
_sys_read
(
FILEHANDLE
fh
,
unsigned
char
*
buf
,
unsigned
len
,
int
mode
)
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
int
size
;
if
(
fh
==
STDIN
)
...
...
@@ -169,7 +169,7 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
return
0
;
/* error */
#else
return
0
;
/* error */
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
}
/*
...
...
@@ -185,7 +185,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
if
((
fh
==
STDOUT
)
||
(
fh
==
STDERR
))
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
if
(
libc_stdio_get_console
()
<
0
)
{
LOG_W
(
"Do not invoke standard input before initializing libc"
);
...
...
@@ -200,7 +200,7 @@ int _sys_write(FILEHANDLE fh, const unsigned char *buf, unsigned len, int mode)
}
return
0
;
/* error */
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
}
else
if
(
fh
==
STDIN
)
{
...
...
@@ -325,7 +325,7 @@ int fputc(int c, FILE *f)
int
fgetc
(
FILE
*
f
)
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
char
ch
;
if
(
libc_stdio_get_console
()
<
0
)
...
...
@@ -336,7 +336,7 @@ int fgetc(FILE *f)
if
(
read
(
STDIN_FILENO
,
&
ch
,
1
)
==
1
)
return
ch
;
#endif
/* RT_USING_POSIX */
#endif
/* RT_USING_POSIX
_STDIO
*/
return
0
;
/* error */
}
...
...
components/libc/compilers/dlib/syscall_read.c
浏览文件 @
e6ae01e3
...
...
@@ -11,7 +11,7 @@
#include <rtthread.h>
#include <yfuns.h>
#include <unistd.h>
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
#include "libc.h"
#endif
...
...
@@ -22,7 +22,7 @@
#pragma module_name = "?__read"
size_t
__read
(
int
handle
,
unsigned
char
*
buf
,
size_t
len
)
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
int
size
;
if
(
handle
==
_LLIO_STDIN
)
...
...
components/libc/compilers/dlib/syscall_write.c
浏览文件 @
e6ae01e3
...
...
@@ -11,7 +11,7 @@
#include <rtthread.h>
#include <yfuns.h>
#include <unistd.h>
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
#include "libc.h"
#endif
...
...
@@ -29,7 +29,7 @@ size_t __write(int handle, const unsigned char *buf, size_t len)
if
((
handle
==
_LLIO_STDOUT
)
||
(
handle
==
_LLIO_STDERR
))
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
if
(
libc_stdio_get_console
()
<
0
)
{
LOG_W
(
"Do not invoke standard output before initializing libc"
);
...
...
components/libc/compilers/gcc/newlib/syscalls.c
浏览文件 @
e6ae01e3
...
...
@@ -20,7 +20,7 @@
#include <unistd.h>
#include <sys/errno.h>
#include <sys/stat.h>
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
#include "libc.h"
#endif
#ifdef RT_USING_MODULE
...
...
@@ -216,7 +216,7 @@ int _open_r(struct _reent *ptr, const char *file, int flags, int mode)
_ssize_t
_read_r
(
struct
_reent
*
ptr
,
int
fd
,
void
*
buf
,
size_t
nbytes
)
{
#ifdef RT_USING_POSIX
#ifdef RT_USING_POSIX
_STDIO
_ssize_t
rc
;
if
(
libc_stdio_get_console
()
<
0
&&
fd
==
STDIN_FILENO
)
{
...
...
@@ -271,11 +271,13 @@ _ssize_t _write_r(struct _reent *ptr, int fd, const void *buf, size_t nbytes)
{
#ifdef RT_USING_POSIX
_ssize_t
rc
;
#ifdef RT_USING_POSIX_STDIO
if
(
libc_stdio_get_console
()
<
0
&&
fd
==
STDOUT_FILENO
)
{
LOG_W
(
"Do not invoke standard output before initializing libc"
);
return
0
;
}
#endif
/* RT_USING_POSIX_STDIO */
rc
=
write
(
fd
,
buf
,
nbytes
);
return
rc
;
#elif defined(RT_USING_CONSOLE)
...
...
components/libc/compilers/readme.md
0 → 100644
浏览文件 @
e6ae01e3
This folder provides uniformed header files crossing different compiler platforms, and supports basic standard C library functions, such as memory management and time management, etc.
\ No newline at end of file
components/libc/posix/mmap/SConscript
已删除
100644 → 0
浏览文件 @
fdbaa2a8
# RT-Thread building script for component
from
building
import
*
cwd
=
GetCurrentDir
()
src
=
Glob
(
'*.c'
)
+
Glob
(
'*.cpp'
)
CPPPATH
=
[
cwd
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_DFS'
,
'RT_USING_POSIX_MMAP'
],
CPPPATH
=
CPPPATH
)
Return
(
'group'
)
components/libc/posix/readme.md
0 → 100644
浏览文件 @
e6ae01e3
This folder provides functions that are not part of the standard C library but are part of the POSIX.1 (IEEE Standard 1003.1) standard.
\ No newline at end of file
components/libc/posix/src/SConscript
浏览文件 @
e6ae01e3
# RT-Thread building script for component
from
building
import
*
Import
(
'rtconfig'
)
src
=
Glob
(
'*.c'
)
src
=
[
'unistd.c'
,
'delay.c'
]
cwd
=
GetCurrentDir
()
CPPPATH
=
[
cwd
]
if
rtconfig
.
ARCH
==
'sim'
:
# the vs simulator does not support select and poll
SrcRemove
(
src
,
[
'select.c'
,
'poll.c'
])
if
GetDepend
(
'RT_USING_POSIX_STDIO'
):
src
+=
[
'libc.c'
]
if
GetDepend
(
'RT_USING_POSIX_POLL'
):
src
+=
[
'poll.c'
]
if
GetDepend
(
'RT_USING_POSIX_SELECT'
):
src
+=
[
'select.c'
]
if
GetDepend
(
'RT_USING_POSIX_MMAP'
):
src
+=
[
'mmap.c'
]
group
=
DefineGroup
(
'POSIX'
,
src
,
depend
=
[
'RT_USING_POSIX'
],
CPPPATH
=
CPPPATH
)
...
...
components/libc/posix/src/delay.c
浏览文件 @
e6ae01e3
...
...
@@ -7,6 +7,7 @@
* Date Author Notes
* 2021-05-07 Meco Man first Version
*/
#include <sys/types.h>
#include <rtthread.h>
#include <rthw.h>
#define DBG_TAG "POSIX.delay"
...
...
@@ -48,3 +49,38 @@ void ndelay(unsigned long nsecs)
rt_hw_us_delay
(
1
);
}
RTM_EXPORT
(
ndelay
);
unsigned
int
sleep
(
unsigned
int
seconds
)
{
if
(
rt_thread_self
()
!=
RT_NULL
)
{
ssleep
(
seconds
);
}
else
/* scheduler has not run yet */
{
while
(
seconds
>
0
)
{
udelay
(
1000000u
);
seconds
--
;
}
}
return
0
;
}
RTM_EXPORT
(
sleep
);
int
usleep
(
useconds_t
usec
)
{
if
(
rt_thread_self
()
!=
RT_NULL
)
{
msleep
(
usec
/
1000u
);
}
else
/* scheduler has not run yet */
{
udelay
(
usec
/
1000u
);
}
udelay
(
usec
%
1000u
);
return
0
;
}
RTM_EXPORT
(
usleep
);
components/libc/posix/
mmap/posix_
mmap.c
→
components/libc/posix/
src/
mmap.c
浏览文件 @
e6ae01e3
文件已移动
components/libc/posix/src/poll.c
浏览文件 @
e6ae01e3
...
...
@@ -14,8 +14,6 @@
#include <dfs_file.h>
#include <poll.h>
#ifdef RT_USING_POSIX
struct
rt_poll_node
;
struct
rt_poll_table
...
...
@@ -226,5 +224,3 @@ int poll(struct pollfd *fds, nfds_t nfds, int timeout)
return
num
;
}
#endif
components/libc/posix/src/select.c
浏览文件 @
e6ae01e3
...
...
@@ -11,8 +11,6 @@
#include <poll.h>
#include <sys/select.h>
#ifdef RT_USING_POSIX
static
void
fdszero
(
fd_set
*
set
,
int
nfds
)
{
fd_mask
*
m
;
...
...
@@ -176,5 +174,3 @@ int select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struc
return
ret
;
}
#endif
components/libc/posix/src/unistd.c
浏览文件 @
e6ae01e3
...
...
@@ -13,7 +13,6 @@
#include <dfs_private.h>
#include <sys/errno.h>
#include <unistd.h>
#include <delay.h>
/**
* this function is a POSIX compliant version, which will open a file and
...
...
@@ -965,80 +964,3 @@ char *ttyname(int fd)
return
"/dev/tty"
;
/* TODO: need to add more specific */
}
RTM_EXPORT
(
ttyname
);
unsigned
int
sleep
(
unsigned
int
seconds
)
{
if
(
rt_thread_self
()
!=
RT_NULL
)
{
ssleep
(
seconds
);
}
else
/* scheduler has not run yet */
{
while
(
seconds
>
0
)
{
udelay
(
1000000u
);
seconds
--
;
}
}
return
0
;
}
RTM_EXPORT
(
sleep
);
int
usleep
(
useconds_t
usec
)
{
if
(
rt_thread_self
()
!=
RT_NULL
)
{
msleep
(
usec
/
1000u
);
}
else
/* scheduler has not run yet */
{
udelay
(
usec
/
1000u
);
}
udelay
(
usec
%
1000u
);
return
0
;
}
RTM_EXPORT
(
usleep
);
pid_t
gettid
(
void
)
{
/*TODO*/
return
0
;
}
pid_t
getpid
(
void
)
{
return
gettid
();
}
RTM_EXPORT
(
getpid
);
pid_t
getppid
(
void
)
{
return
0
;
}
RTM_EXPORT
(
getppid
);
uid_t
getuid
(
void
)
{
return
0
;
/*ROOT*/
}
RTM_EXPORT
(
getuid
);
uid_t
geteuid
(
void
)
{
return
0
;
/*ROOT*/
}
RTM_EXPORT
(
geteuid
);
gid_t
getgid
(
void
)
{
return
0
;
/*ROOT*/
}
RTM_EXPORT
(
getgid
);
gid_t
getegid
(
void
)
{
return
0
;
/*ROOT*/
}
RTM_EXPORT
(
getegid
);
components/lwp/Kconfig
浏览文件 @
e6ae01e3
config RT_USING_LWP
bool "Using light-weight process"
select RT_USING_DFS
select RT_USING_POSIX
select RT_USING_POSIX_SELECT
select RT_USING_LIBC
depends on ARCH_ARM_CORTEX_M || ARCH_ARM_ARM9 || ARCH_ARM_CORTEX_A
default n
...
...
components/lwp/lwp_syscall.c
浏览文件 @
e6ae01e3
...
...
@@ -18,7 +18,6 @@
#if (defined(RT_USING_SAL) && defined(SAL_USING_POSIX))
#include <sys/socket.h>
#define SYSCALL_NET(f) ((void*)(f))
#else
#define SYSCALL_NET(f) ((void*)sys_notimpl)
...
...
components/net/Kconfig
浏览文件 @
e6ae01e3
...
...
@@ -41,9 +41,8 @@ config RT_USING_SAL
config SAL_USING_POSIX
bool "Enable BSD socket operated by file system API"
default n
select RT_USING_DFS
select RT_USING_LIBC
select RT_USING_POSIX
select RT_USING_POSIX_SELECT
help
Let BSD socket operated by file system API, such as read/write and involveed in select/poll POSIX APIs.
...
...
include/rtdebug.h
浏览文件 @
e6ae01e3
...
...
@@ -12,13 +12,6 @@
#include <rtconfig.h>
/* settings depend check */
#ifdef RT_USING_POSIX
#if !defined(RT_USING_DFS) || !defined(RT_USING_DFS_DEVFS)
#error "POSIX poll/select, stdin need file system(RT_USING_DFS) and device file system(RT_USING_DFS_DEVFS)"
#endif
#endif
/* RT_USING_POSIX */
/* Using this macro to control all kernel debug features. */
#ifdef RT_DEBUG
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录