add RT_USING_POSIX_STDIO

This commit is contained in:
Meco Man 2022-01-02 17:51:44 -05:00 committed by Bernard Xiong
parent 0e5dd7d1ab
commit 918ee6147c
41 changed files with 112 additions and 206 deletions

View File

@ -38,7 +38,7 @@ int main(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(FINSH_DEVICE_NAME); finsh_set_device(FINSH_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -62,7 +62,7 @@ void rtthread_startup(void)
/* init finsh */ /* init finsh */
extern int finsh_system_init(void); extern int finsh_system_init(void);
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart0"); finsh_set_device("uart0");
#endif #endif
#endif #endif

View File

@ -111,7 +111,7 @@ void rtthread_startup(void)
/* init finsh */ /* init finsh */
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(CONSOLE_DEVICE); finsh_set_device(CONSOLE_DEVICE);
#endif #endif
#endif #endif

View File

@ -79,8 +79,8 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device( FINSH_DEVICE_NAME ); finsh_set_device(FINSH_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -119,7 +119,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -119,7 +119,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -119,7 +119,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -28,7 +28,7 @@ void rt_init_thread_entry(void *parameter)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* initialize finsh */ /* initialize finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -59,7 +59,7 @@ void rt_init_thread_entry(void *parameter)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* initialize finsh */ /* initialize finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -65,7 +65,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart0"); finsh_set_device("uart0");
#endif #endif
#endif #endif

View File

@ -25,7 +25,7 @@ void rt_init_thread_entry(void *parameter)
//finsh_system_init(); //finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif

View File

@ -84,7 +84,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -77,7 +77,7 @@ void rtthread_startup()
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart0"); finsh_set_device("uart0");
#endif #endif
#endif #endif

View File

@ -60,7 +60,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart"); finsh_set_device("uart");
#endif #endif
#endif #endif

View File

@ -18,7 +18,7 @@ int main(void)
rt_thread_t thread; rt_thread_t thread;
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -48,7 +48,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -1,9 +1,13 @@
# Generated by Kconfiglib (https://github.com/ulfalizer/Kconfiglib) #
# Automatically generated file; DO NOT EDIT.
# RT-Thread Project Configuration
#
# #
# RT-Thread Kernel # RT-Thread Kernel
# #
CONFIG_RT_NAME_MAX=8 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_ARCH_DATA_TYPE is not set
CONFIG_RT_USING_SMP=y CONFIG_RT_USING_SMP=y
CONFIG_RT_CPUS_NR=2 CONFIG_RT_CPUS_NR=2
@ -30,8 +34,6 @@ CONFIG_RT_TIMER_THREAD_STACK_SIZE=1024
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set # CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
# CONFIG_RT_USING_TINY_FFS is not set # CONFIG_RT_USING_TINY_FFS is not set
# CONFIG_RT_PRINTF_LONGLONG is not set # CONFIG_RT_PRINTF_LONGLONG is not set
# end of kservice optimization
CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG=y
CONFIG_RT_DEBUG_COLOR=y CONFIG_RT_DEBUG_COLOR=y
# CONFIG_RT_DEBUG_INIT_CONFIG is not set # CONFIG_RT_DEBUG_INIT_CONFIG is not set
@ -54,7 +56,6 @@ CONFIG_RT_USING_EVENT=y
CONFIG_RT_USING_MAILBOX=y CONFIG_RT_USING_MAILBOX=y
CONFIG_RT_USING_MESSAGEQUEUE=y CONFIG_RT_USING_MESSAGEQUEUE=y
CONFIG_RT_USING_SIGNALS=y CONFIG_RT_USING_SIGNALS=y
# end of Inter-Thread communication
# #
# Memory Management # Memory Management
@ -73,7 +74,6 @@ CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y
CONFIG_RT_USING_MEMTRACE=y CONFIG_RT_USING_MEMTRACE=y
# CONFIG_RT_USING_HEAP_ISR is not set # CONFIG_RT_USING_HEAP_ISR is not set
CONFIG_RT_USING_HEAP=y CONFIG_RT_USING_HEAP=y
# end of Memory Management
# #
# Kernel Device Object # Kernel Device Object
@ -84,16 +84,15 @@ CONFIG_RT_USING_INTERRUPT_INFO=y
CONFIG_RT_USING_CONSOLE=y CONFIG_RT_USING_CONSOLE=y
CONFIG_RT_CONSOLEBUF_SIZE=256 CONFIG_RT_CONSOLEBUF_SIZE=256
CONFIG_RT_CONSOLE_DEVICE_NAME="uart0" CONFIG_RT_CONSOLE_DEVICE_NAME="uart0"
# end of Kernel Device Object
CONFIG_RT_VER_NUM=0x40100 CONFIG_RT_VER_NUM=0x40100
# end of RT-Thread Kernel
CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM=y
CONFIG_RT_USING_CPU_FFS=y CONFIG_RT_USING_CPU_FFS=y
CONFIG_ARCH_ARM_CORTEX_A=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_V2=y
# CONFIG_RT_USING_GIC_V3 is not set
CONFIG_ARCH_ARM_CORTEX_A9=y CONFIG_ARCH_ARM_CORTEX_A9=y
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
# #
# RT-Thread Components # RT-Thread Components
@ -109,7 +108,6 @@ CONFIG_RT_MAIN_THREAD_PRIORITY=10
# #
CONFIG_RT_USING_CPLUSPLUS=y CONFIG_RT_USING_CPLUSPLUS=y
# CONFIG_RT_USING_CPLUSPLUS11 is not set # CONFIG_RT_USING_CPLUSPLUS11 is not set
# end of C++ features
# #
# Command shell # Command shell
@ -129,7 +127,6 @@ CONFIG_FINSH_USING_DESCRIPTION=y
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set # CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
# CONFIG_FINSH_USING_AUTH is not set # CONFIG_FINSH_USING_AUTH is not set
CONFIG_FINSH_ARG_MAX=10 CONFIG_FINSH_ARG_MAX=10
# end of Command shell
# #
# Device virtual file system # Device virtual file system
@ -164,13 +161,10 @@ CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=4096
# CONFIG_RT_DFS_ELM_USE_ERASE is not set # CONFIG_RT_DFS_ELM_USE_ERASE is not set
CONFIG_RT_DFS_ELM_REENTRANT=y CONFIG_RT_DFS_ELM_REENTRANT=y
CONFIG_RT_DFS_ELM_MUTEX_TIMEOUT=3000 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_DEVFS=y
CONFIG_RT_USING_DFS_ROMFS=y CONFIG_RT_USING_DFS_ROMFS=y
CONFIG_RT_USING_DFS_RAMFS=y CONFIG_RT_USING_DFS_RAMFS=y
# CONFIG_RT_USING_DFS_NFS is not set # CONFIG_RT_USING_DFS_NFS is not set
# end of Device virtual file system
# #
# Device Drivers # Device Drivers
@ -233,17 +227,13 @@ CONFIG_RT_USING_WDT=y
# #
# Using USB # Using USB
# #
# CONFIG_RT_USING_USB is not set
# CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_HOST is not set
# CONFIG_RT_USING_USB_DEVICE 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 # POSIX layer and C standard library
# #
CONFIG_RT_USING_LIBC=y
CONFIG_RT_LIBC_USING_TIME=y
CONFIG_RT_LIBC_USING_FILEIO=y
# CONFIG_RT_USING_MODULE is not set # CONFIG_RT_USING_MODULE is not set
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8 CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
@ -252,6 +242,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# #
CONFIG_RT_USING_POSIX_FS=y CONFIG_RT_USING_POSIX_FS=y
CONFIG_RT_USING_POSIX_DEVIO=y CONFIG_RT_USING_POSIX_DEVIO=y
CONFIG_RT_USING_POSIX_STDIO=y
CONFIG_RT_USING_POSIX_POLL=y CONFIG_RT_USING_POSIX_POLL=y
CONFIG_RT_USING_POSIX_SELECT=y CONFIG_RT_USING_POSIX_SELECT=y
CONFIG_RT_USING_POSIX_TERMIOS=y CONFIG_RT_USING_POSIX_TERMIOS=y
@ -259,7 +250,6 @@ CONFIG_RT_USING_POSIX_AIO=y
# CONFIG_RT_USING_POSIX_MMAN is not set # CONFIG_RT_USING_POSIX_MMAN is not set
CONFIG_RT_USING_POSIX_DELAY=y CONFIG_RT_USING_POSIX_DELAY=y
CONFIG_RT_USING_POSIX_CLOCK=y CONFIG_RT_USING_POSIX_CLOCK=y
CONFIG_RT_USING_POSIX_GETLINE=y
CONFIG_RT_USING_PTHREADS=y CONFIG_RT_USING_PTHREADS=y
CONFIG_PTHREAD_NUM_MAX=8 CONFIG_PTHREAD_NUM_MAX=8
@ -273,9 +263,6 @@ CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE=y
# #
# Socket is in the 'Network' category # Socket is in the 'Network' category
# #
# end of Interprocess Communication (IPC)
# end of POSIX (Portable Operating System Interface) layer
# end of POSIX layer and C standard library
# #
# Network # Network
@ -291,10 +278,7 @@ CONFIG_SAL_INTERNET_CHECK=y
# protocol stack implement # protocol stack implement
# #
CONFIG_SAL_USING_LWIP=y CONFIG_SAL_USING_LWIP=y
# end of protocol stack implement
CONFIG_SAL_USING_POSIX=y CONFIG_SAL_USING_POSIX=y
# end of Socket abstraction layer
# #
# Network interface device # Network interface device
@ -307,7 +291,7 @@ CONFIG_NETDEV_USING_AUTO_DEFAULT=y
# CONFIG_NETDEV_USING_IPV6 is not set # CONFIG_NETDEV_USING_IPV6 is not set
CONFIG_NETDEV_IPV4=1 CONFIG_NETDEV_IPV4=1
CONFIG_NETDEV_IPV6=0 CONFIG_NETDEV_IPV6=0
# end of Network interface device # CONFIG_NETDEV_IPV6_SCOPES is not set
# #
# light weight TCP/IP stack # light weight TCP/IP stack
@ -333,8 +317,6 @@ CONFIG_IP_SOF_BROADCAST_RECV=1
CONFIG_RT_LWIP_IPADDR="192.168.1.30" CONFIG_RT_LWIP_IPADDR="192.168.1.30"
CONFIG_RT_LWIP_GWADDR="192.168.1.1" CONFIG_RT_LWIP_GWADDR="192.168.1.1"
CONFIG_RT_LWIP_MSKADDR="255.255.255.0" CONFIG_RT_LWIP_MSKADDR="255.255.255.0"
# end of Static IPv4 Address
CONFIG_RT_LWIP_UDP=y CONFIG_RT_LWIP_UDP=y
CONFIG_RT_LWIP_TCP=y CONFIG_RT_LWIP_TCP=y
CONFIG_RT_LWIP_RAW=y CONFIG_RT_LWIP_RAW=y
@ -369,22 +351,17 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
# CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set # CONFIG_RT_LWIP_USING_HW_CHECKSUM is not set
CONFIG_RT_LWIP_USING_PING=y CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_LWIP_DEBUG is not set # CONFIG_RT_LWIP_DEBUG is not set
# end of light weight TCP/IP stack
# #
# AT commands # AT commands
# #
# CONFIG_RT_USING_AT is not set # CONFIG_RT_USING_AT is not set
# end of AT commands
# CONFIG_LWIP_USING_DHCPD is not set # CONFIG_LWIP_USING_DHCPD is not set
# end of Network
# #
# VBUS(Virtual Software BUS) # VBUS(Virtual Software BUS)
# #
# CONFIG_RT_USING_VBUS is not set # CONFIG_RT_USING_VBUS is not set
# end of VBUS(Virtual Software BUS)
# #
# Utilities # Utilities
@ -394,16 +371,12 @@ CONFIG_RT_LWIP_USING_PING=y
# CONFIG_RT_USING_UTEST is not set # CONFIG_RT_USING_UTEST is not set
# CONFIG_RT_USING_VAR_EXPORT is not set # CONFIG_RT_USING_VAR_EXPORT is not set
# CONFIG_RT_USING_RT_LINK is not set # CONFIG_RT_USING_RT_LINK is not set
# end of Utilities
CONFIG_RT_USING_LWP=y CONFIG_RT_USING_LWP=y
# end of RT-Thread Components
# #
# RT-Thread Utestcases # RT-Thread Utestcases
# #
# CONFIG_RT_USING_UTESTCASES is not set # CONFIG_RT_USING_UTESTCASES is not set
# end of RT-Thread Utestcases
# #
# RT-Thread online packages # RT-Thread online packages
@ -438,17 +411,12 @@ CONFIG_RT_USING_LWP=y
# Marvell WiFi # Marvell WiFi
# #
# CONFIG_PKG_USING_WLANMARVELL is not set # CONFIG_PKG_USING_WLANMARVELL is not set
# end of Marvell WiFi
# #
# Wiced WiFi # Wiced WiFi
# #
# CONFIG_PKG_USING_WLAN_WICED is not set # CONFIG_PKG_USING_WLAN_WICED is not set
# end of Wiced WiFi
# CONFIG_PKG_USING_RW007 is not set # CONFIG_PKG_USING_RW007 is not set
# end of Wi-Fi
# CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_COAP is not set
# CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NOPOLL is not set
# CONFIG_PKG_USING_NETUTILS is not set # CONFIG_PKG_USING_NETUTILS is not set
@ -470,8 +438,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_JIOT-C-SDK is not set # CONFIG_PKG_USING_JIOT-C-SDK is not set
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set # CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
# CONFIG_PKG_USING_JOYLINK is not set # CONFIG_PKG_USING_JOYLINK is not set
# end of IoT Cloud
# CONFIG_PKG_USING_NIMBLE is not set # CONFIG_PKG_USING_NIMBLE is not set
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set # CONFIG_PKG_USING_OTA_DOWNLOADER is not set
# CONFIG_PKG_USING_IPMSG is not set # CONFIG_PKG_USING_IPMSG is not set
@ -506,7 +472,7 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set # CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set
# CONFIG_PKG_USING_HM is not set # CONFIG_PKG_USING_HM is not set
# CONFIG_PKG_USING_SMALL_MODBUS is not set # CONFIG_PKG_USING_SMALL_MODBUS is not set
# end of IoT - internet of things # CONFIG_PKG_USING_NET_SERVER is not set
# #
# security packages # security packages
@ -516,7 +482,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_TINYCRYPT is not set # CONFIG_PKG_USING_TINYCRYPT is not set
# CONFIG_PKG_USING_TFM is not set # CONFIG_PKG_USING_TFM is not set
# CONFIG_PKG_USING_YD_CRYPTO is not set # CONFIG_PKG_USING_YD_CRYPTO is not set
# end of security packages
# #
# language packages # language packages
@ -525,7 +490,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_JERRYSCRIPT is not set
# CONFIG_PKG_USING_MICROPYTHON is not set # CONFIG_PKG_USING_MICROPYTHON is not set
# CONFIG_PKG_USING_PIKASCRIPT is not set # CONFIG_PKG_USING_PIKASCRIPT is not set
# end of language packages
# #
# multimedia packages # multimedia packages
@ -537,15 +501,12 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_LVGL is not set # CONFIG_PKG_USING_LVGL is not set
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set # CONFIG_PKG_USING_LITTLEVGL2RTT is not set
# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set # CONFIG_PKG_USING_LV_MUSIC_DEMO is not set
# end of LVGL: powerful and easy-to-use embedded GUI library
# #
# u8g2: a monochrome graphic library # u8g2: a monochrome graphic library
# #
# CONFIG_PKG_USING_U8G2_OFFICIAL is not set # CONFIG_PKG_USING_U8G2_OFFICIAL is not set
# CONFIG_PKG_USING_U8G2 is not set # CONFIG_PKG_USING_U8G2 is not set
# end of u8g2: a monochrome graphic library
# CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_OPENMV is not set
# CONFIG_PKG_USING_MUPDF is not set # CONFIG_PKG_USING_MUPDF is not set
# CONFIG_PKG_USING_STEMWIN is not set # CONFIG_PKG_USING_STEMWIN is not set
@ -565,8 +526,9 @@ CONFIG_RT_USING_LWP=y
# #
# CONFIG_PKG_USING_PAINTERENGINE is not set # CONFIG_PKG_USING_PAINTERENGINE is not set
# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set # CONFIG_PKG_USING_PAINTERENGINE_AUX is not set
# end of PainterEngine: A cross-platform graphics application framework written in C language # CONFIG_PKG_USING_MCURSES is not set
# end of multimedia packages # CONFIG_PKG_USING_TERMBOX is not set
# CONFIG_PKG_USING_VT100 is not set
# #
# tools packages # tools packages
@ -610,7 +572,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_SOLAR_TERMS is not set # CONFIG_PKG_USING_SOLAR_TERMS is not set
# CONFIG_PKG_USING_GAN_ZHI is not set # CONFIG_PKG_USING_GAN_ZHI is not set
# CONFIG_PKG_USING_FDT is not set # CONFIG_PKG_USING_FDT is not set
# end of tools packages
# #
# system packages # system packages
@ -622,7 +583,12 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set # CONFIG_PKG_USING_RT_MEMCPY_CM is not set
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set # CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set # CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
# end of enhanced kernel services
#
# POSIX extension functions
#
# CONFIG_PKG_USING_POSIX_GETLINE is not set
# CONFIG_PKG_USING_POSIX_WCWIDTH is not set
# #
# acceleration: Assembly language or algorithmic acceleration packages # acceleration: Assembly language or algorithmic acceleration packages
@ -630,14 +596,12 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set # CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set # CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
# CONFIG_PKG_USING_QFPLIB_M3 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 # CMSIS: ARM Cortex-M Microcontroller Software Interface Standard
# #
# CONFIG_PKG_USING_CMSIS_5 is not set # CONFIG_PKG_USING_CMSIS_5 is not set
# CONFIG_PKG_USING_CMSIS_RTOS2 is not set # CONFIG_PKG_USING_CMSIS_RTOS2 is not set
# end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard
# #
# Micrium: Micrium software products porting for RT-Thread # Micrium: Micrium software products porting for RT-Thread
@ -648,8 +612,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_UC_CLK is not set # CONFIG_PKG_USING_UC_CLK is not set
# CONFIG_PKG_USING_UC_COMMON is not set # CONFIG_PKG_USING_UC_COMMON is not set
# CONFIG_PKG_USING_UC_MODBUS is not set # CONFIG_PKG_USING_UC_MODBUS is not set
# end of Micrium: Micrium software products porting for RT-Thread
# CONFIG_RT_USING_ARDUINO is not set # CONFIG_RT_USING_ARDUINO is not set
# CONFIG_PKG_USING_GUIENGINE is not set # CONFIG_PKG_USING_GUIENGINE is not set
# CONFIG_PKG_USING_PERSIMMON is not set # CONFIG_PKG_USING_PERSIMMON is not set
@ -680,11 +642,10 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_TLSF is not set # CONFIG_PKG_USING_TLSF is not set
# CONFIG_PKG_USING_EVENT_RECORDER is not set # CONFIG_PKG_USING_EVENT_RECORDER is not set
# CONFIG_PKG_USING_ARM_2D is not set # CONFIG_PKG_USING_ARM_2D is not set
# CONFIG_PKG_USING_WCWIDTH is not set
# CONFIG_PKG_USING_MCUBOOT is not set # CONFIG_PKG_USING_MCUBOOT is not set
# CONFIG_PKG_USING_TINYUSB is not set # CONFIG_PKG_USING_TINYUSB is not set
# CONFIG_PKG_USING_USB_STACK is not set # CONFIG_PKG_USING_USB_STACK is not set
# end of system packages # CONFIG_PKG_USING_LUATOS_SOC is not set
# #
# peripheral libraries and drivers # peripheral libraries and drivers
@ -758,10 +719,10 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_BLUETRUM_SDK is not set # CONFIG_PKG_USING_BLUETRUM_SDK is not set
# CONFIG_PKG_USING_MISAKA_AT24CXX is not set # CONFIG_PKG_USING_MISAKA_AT24CXX is not set
# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set # CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set
# CONFIG_PKG_USING_BL_MCU_SDK is not set # CONFIG_PKG_USING_BL_MCU_SDK is not set
# CONFIG_PKG_USING_SOFT_SERIAL is not set # CONFIG_PKG_USING_SOFT_SERIAL is not set
# CONFIG_PKG_USING_MB85RS16 is not set # CONFIG_PKG_USING_MB85RS16 is not set
# end of peripheral libraries and drivers
# #
# AI packages # AI packages
@ -775,7 +736,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_ULAPACK is not set # CONFIG_PKG_USING_ULAPACK is not set
# CONFIG_PKG_USING_QUEST is not set # CONFIG_PKG_USING_QUEST is not set
# CONFIG_PKG_USING_NAXOS is not set # CONFIG_PKG_USING_NAXOS is not set
# end of AI packages
# #
# miscellaneous packages # miscellaneous packages
@ -788,7 +748,6 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set # CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set
# CONFIG_PKG_USING_NETWORK_SAMPLES is not set # CONFIG_PKG_USING_NETWORK_SAMPLES is not set
# CONFIG_PKG_USING_PERIPHERAL_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 # entertainment: terminal games and other interesting software packages
@ -802,8 +761,7 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_SNAKE is not set # CONFIG_PKG_USING_SNAKE is not set
# CONFIG_PKG_USING_TETRIS is not set # CONFIG_PKG_USING_TETRIS is not set
# CONFIG_PKG_USING_DONUT is not set # CONFIG_PKG_USING_DONUT is not set
# end of entertainment: terminal games and other interesting software packages # CONFIG_PKG_USING_COWSAY is not set
# CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_LIBCSV is not set
# CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_OPTPARSE is not set
# CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_FASTLZ is not set
@ -825,16 +783,11 @@ CONFIG_RT_USING_LWP=y
# CONFIG_PKG_USING_VI is not set # CONFIG_PKG_USING_VI is not set
# CONFIG_PKG_USING_KI is not set # CONFIG_PKG_USING_KI is not set
# CONFIG_PKG_USING_ARMv7M_DWT is not set # CONFIG_PKG_USING_ARMv7M_DWT is not set
# CONFIG_PKG_USING_VT100 is not set
# CONFIG_PKG_USING_UKAL is not set # CONFIG_PKG_USING_UKAL is not set
# CONFIG_PKG_USING_CRCLIB is not set # CONFIG_PKG_USING_CRCLIB is not set
# CONFIG_PKG_USING_LWGPS is not set # CONFIG_PKG_USING_LWGPS is not set
# CONFIG_PKG_USING_STATE_MACHINE is not set # CONFIG_PKG_USING_STATE_MACHINE is not set
# CONFIG_PKG_USING_MCURSES is not set # CONFIG_PKG_USING_DESIGN_PATTERN 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
# #
# Hardware Drivers Config # Hardware Drivers Config
@ -851,5 +804,3 @@ CONFIG_RT_USING_UART1=y
# CONFIG_BSP_DRV_MOUSE is not set # CONFIG_BSP_DRV_MOUSE is not set
CONFIG_BSP_DRV_EMAC=y CONFIG_BSP_DRV_EMAC=y
# CONFIG_BSP_DRV_AUDIO is not set # CONFIG_BSP_DRV_AUDIO is not set
# end of Onboard Peripheral Drivers
# end of Hardware Drivers Config

View File

@ -1,7 +1,8 @@
#ifndef RT_CONFIG_H__ #ifndef RT_CONFIG_H__
#define 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 */ /* RT-Thread Kernel */
@ -24,7 +25,6 @@
/* kservice optimization */ /* kservice optimization */
/* end of kservice optimization */
#define RT_DEBUG #define RT_DEBUG
#define RT_DEBUG_COLOR #define RT_DEBUG_COLOR
@ -36,7 +36,6 @@
#define RT_USING_MAILBOX #define RT_USING_MAILBOX
#define RT_USING_MESSAGEQUEUE #define RT_USING_MESSAGEQUEUE
#define RT_USING_SIGNALS #define RT_USING_SIGNALS
/* end of Inter-Thread communication */
/* Memory Management */ /* Memory Management */
@ -48,7 +47,6 @@
#define RT_USING_SMALL_MEM_AS_HEAP #define RT_USING_SMALL_MEM_AS_HEAP
#define RT_USING_MEMTRACE #define RT_USING_MEMTRACE
#define RT_USING_HEAP #define RT_USING_HEAP
/* end of Memory Management */
/* Kernel Device Object */ /* Kernel Device Object */
@ -58,9 +56,7 @@
#define RT_USING_CONSOLE #define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 256 #define RT_CONSOLEBUF_SIZE 256
#define RT_CONSOLE_DEVICE_NAME "uart0" #define RT_CONSOLE_DEVICE_NAME "uart0"
/* end of Kernel Device Object */
#define RT_VER_NUM 0x40100 #define RT_VER_NUM 0x40100
/* end of RT-Thread Kernel */
#define ARCH_ARM #define ARCH_ARM
#define RT_USING_CPU_FFS #define RT_USING_CPU_FFS
#define ARCH_ARM_CORTEX_A #define ARCH_ARM_CORTEX_A
@ -77,7 +73,6 @@
/* C++ features */ /* C++ features */
#define RT_USING_CPLUSPLUS #define RT_USING_CPLUSPLUS
/* end of C++ features */
/* Command shell */ /* Command shell */
@ -94,7 +89,6 @@
#define MSH_USING_BUILT_IN_COMMANDS #define MSH_USING_BUILT_IN_COMMANDS
#define FINSH_USING_DESCRIPTION #define FINSH_USING_DESCRIPTION
#define FINSH_ARG_MAX 10 #define FINSH_ARG_MAX 10
/* end of Command shell */
/* Device virtual file system */ /* Device virtual file system */
@ -119,11 +113,9 @@
#define RT_DFS_ELM_MAX_SECTOR_SIZE 4096 #define RT_DFS_ELM_MAX_SECTOR_SIZE 4096
#define RT_DFS_ELM_REENTRANT #define RT_DFS_ELM_REENTRANT
#define RT_DFS_ELM_MUTEX_TIMEOUT 3000 #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_DEVFS
#define RT_USING_DFS_ROMFS #define RT_USING_DFS_ROMFS
#define RT_USING_DFS_RAMFS #define RT_USING_DFS_RAMFS
/* end of Device virtual file system */
/* Device Drivers */ /* Device Drivers */
@ -159,27 +151,22 @@
/* Using USB */ /* Using USB */
/* end of Using USB */
/* end of Device Drivers */
/* POSIX layer and C standard library */ /* POSIX layer and C standard library */
#define RT_USING_LIBC
#define RT_LIBC_USING_TIME
#define RT_LIBC_USING_FILEIO
#define RT_LIBC_DEFAULT_TIMEZONE 8 #define RT_LIBC_DEFAULT_TIMEZONE 8
/* POSIX (Portable Operating System Interface) layer */ /* POSIX (Portable Operating System Interface) layer */
#define RT_USING_POSIX_FS #define RT_USING_POSIX_FS
#define RT_USING_POSIX_DEVIO #define RT_USING_POSIX_DEVIO
#define RT_USING_POSIX_STDIO
#define RT_USING_POSIX_POLL #define RT_USING_POSIX_POLL
#define RT_USING_POSIX_SELECT #define RT_USING_POSIX_SELECT
#define RT_USING_POSIX_TERMIOS #define RT_USING_POSIX_TERMIOS
#define RT_USING_POSIX_AIO #define RT_USING_POSIX_AIO
#define RT_USING_POSIX_DELAY #define RT_USING_POSIX_DELAY
#define RT_USING_POSIX_CLOCK #define RT_USING_POSIX_CLOCK
#define RT_USING_POSIX_GETLINE
#define RT_USING_PTHREADS #define RT_USING_PTHREADS
#define PTHREAD_NUM_MAX 8 #define PTHREAD_NUM_MAX 8
@ -190,10 +177,6 @@
/* Socket is in the 'Network' category */ /* Socket is in the 'Network' category */
/* end of Interprocess Communication (IPC) */
/* end of POSIX (Portable Operating System Interface) layer */
/* end of POSIX layer and C standard library */
/* Network */ /* Network */
/* Socket abstraction layer */ /* Socket abstraction layer */
@ -204,9 +187,7 @@
/* protocol stack implement */ /* protocol stack implement */
#define SAL_USING_LWIP #define SAL_USING_LWIP
/* end of protocol stack implement */
#define SAL_USING_POSIX #define SAL_USING_POSIX
/* end of Socket abstraction layer */
/* Network interface device */ /* Network interface device */
@ -217,7 +198,6 @@
#define NETDEV_USING_AUTO_DEFAULT #define NETDEV_USING_AUTO_DEFAULT
#define NETDEV_IPV4 1 #define NETDEV_IPV4 1
#define NETDEV_IPV6 0 #define NETDEV_IPV6 0
/* end of Network interface device */
/* light weight TCP/IP stack */ /* light weight TCP/IP stack */
@ -235,7 +215,6 @@
#define RT_LWIP_IPADDR "192.168.1.30" #define RT_LWIP_IPADDR "192.168.1.30"
#define RT_LWIP_GWADDR "192.168.1.1" #define RT_LWIP_GWADDR "192.168.1.1"
#define RT_LWIP_MSKADDR "255.255.255.0" #define RT_LWIP_MSKADDR "255.255.255.0"
/* end of Static IPv4 Address */
#define RT_LWIP_UDP #define RT_LWIP_UDP
#define RT_LWIP_TCP #define RT_LWIP_TCP
#define RT_LWIP_RAW #define RT_LWIP_RAW
@ -263,26 +242,19 @@
#define LWIP_SO_LINGER 0 #define LWIP_SO_LINGER 0
#define LWIP_NETIF_LOOPBACK 0 #define LWIP_NETIF_LOOPBACK 0
#define RT_LWIP_USING_PING #define RT_LWIP_USING_PING
/* end of light weight TCP/IP stack */
/* AT commands */ /* AT commands */
/* end of AT commands */
/* end of Network */
/* VBUS(Virtual Software BUS) */ /* VBUS(Virtual Software BUS) */
/* end of VBUS(Virtual Software BUS) */
/* Utilities */ /* Utilities */
/* end of Utilities */
#define RT_USING_LWP #define RT_USING_LWP
/* end of RT-Thread Components */
/* RT-Thread Utestcases */ /* RT-Thread Utestcases */
/* end of RT-Thread Utestcases */
/* RT-Thread online packages */ /* RT-Thread online packages */
@ -293,83 +265,63 @@
/* Marvell WiFi */ /* Marvell WiFi */
/* end of Marvell WiFi */
/* Wiced WiFi */ /* Wiced WiFi */
/* end of Wiced WiFi */
/* end of Wi-Fi */
/* IoT Cloud */ /* IoT Cloud */
/* end of IoT Cloud */
/* end of IoT - internet of things */
/* security packages */ /* security packages */
/* end of security packages */
/* language packages */ /* language packages */
/* end of language packages */
/* multimedia 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 */ /* u8g2: a monochrome graphic library */
/* end of u8g2: a monochrome graphic library */
/* PainterEngine: A cross-platform graphics application framework written in C language */ /* PainterEngine: A cross-platform graphics application framework written in C language */
/* end of PainterEngine: A cross-platform graphics application framework written in C language */
/* end of multimedia packages */
/* tools packages */ /* tools packages */
/* end of tools packages */
/* system packages */ /* system packages */
/* enhanced kernel services */ /* enhanced kernel services */
/* end of enhanced kernel services */
/* POSIX extension functions */
/* acceleration: Assembly language or algorithmic acceleration 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 */ /* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
/* end of CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
/* Micrium: Micrium software products porting for RT-Thread */ /* 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 */ /* peripheral libraries and drivers */
/* end of peripheral libraries and drivers */
/* AI packages */ /* AI packages */
/* end of AI packages */
/* miscellaneous packages */ /* miscellaneous packages */
/* samples: kernel and components samples */ /* samples: kernel and components samples */
/* end of samples: kernel and components samples */
/* entertainment: terminal games and other interesting software packages */ /* 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 */
/* Hardware Drivers Config */ /* Hardware Drivers Config */
@ -380,7 +332,5 @@
#define RT_USING_UART0 #define RT_USING_UART0
#define RT_USING_UART1 #define RT_USING_UART1
#define BSP_DRV_EMAC #define BSP_DRV_EMAC
/* end of Onboard Peripheral Drivers */
/* end of Hardware Drivers Config */
#endif #endif

View File

@ -104,7 +104,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("sci2"); finsh_set_device("sci2");
#endif #endif
#endif #endif

View File

@ -60,7 +60,7 @@ void rt_init_thread_entry(void* parameter)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* initialize finsh */ /* initialize finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif #endif
@ -123,7 +123,7 @@ void rt_init_thread_entry(void* parameter)
#endif #endif
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif /* RT_USING_FINSH */ #endif /* RT_USING_FINSH */

View File

@ -114,7 +114,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -87,7 +87,7 @@ void rt_init_thread_entry(void* parameter)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -64,7 +64,7 @@ void rtthread_startup()
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart0"); finsh_set_device("uart0");
#endif #endif
#endif #endif

View File

@ -53,7 +53,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart1"); finsh_set_device("uart1");
#endif #endif
#endif #endif

View File

@ -64,7 +64,7 @@ void rtthread_startup(void)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* init finsh */ /* init finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device("uart0"); finsh_set_device("uart0");
#endif #endif
#endif #endif

View File

@ -23,7 +23,7 @@ void rt_init_thread_entry(void *parameter)
#ifdef RT_USING_FINSH #ifdef RT_USING_FINSH
/* initialize finsh */ /* initialize finsh */
finsh_system_init(); finsh_system_init();
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
finsh_set_device(RT_CONSOLE_DEVICE_NAME); finsh_set_device(RT_CONSOLE_DEVICE_NAME);
#endif #endif
#endif #endif

View File

@ -10,7 +10,7 @@ if RT_USING_CPLUSPLUS
bool "Enable c++11 threading feature support" bool "Enable c++11 threading feature support"
default n default n
select RT_USING_POSIX_FS select RT_USING_POSIX_FS
select RT_USING_POSIX_DEVIO select RT_USING_POSIX_STDIO
select RT_USING_PTHREADS select RT_USING_PTHREADS
select RT_USING_RTC select RT_USING_RTC

View File

@ -18,9 +18,9 @@
#include <lwp.h> #include <lwp.h>
#endif #endif
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include <libc.h> #include <libc.h>
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
/* Global variables */ /* Global variables */
const struct dfs_filesystem_ops *filesystem_operation_table[DFS_FILESYSTEM_TYPES_MAX]; 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_fd *d;
struct dfs_fdtable *fdt; struct dfs_fdtable *fdt;
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
if ((0 <= fd) && (fd <= 2)) if ((0 <= fd) && (fd <= 2))
fd = libc_stdio_get_console(); fd = libc_stdio_get_console();
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
fdt = dfs_fdtable_get(); fdt = dfs_fdtable_get();
fd = fd - DFS_FD_OFFSET; fd = fd - DFS_FD_OFFSET;

View File

@ -36,7 +36,7 @@
#define DBG_LVL DBG_INFO #define DBG_LVL DBG_INFO
#include <rtdbg.h> #include <rtdbg.h>
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include <dfs_posix.h> #include <dfs_posix.h>
#include <poll.h> #include <poll.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -203,7 +203,7 @@ const static struct dfs_file_ops _serial_fops =
RT_NULL, /* getdents */ RT_NULL, /* getdents */
serial_fops_poll, serial_fops_poll,
}; };
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
/* /*
* Serial poll routines * Serial poll routines
@ -362,7 +362,7 @@ static void _serial_check_buffer_size(void)
} }
} }
#if defined(RT_USING_POSIX_DEVIO) || defined(RT_SERIAL_USING_DMA) #if defined(RT_USING_POSIX_STDIO) || defined(RT_SERIAL_USING_DMA)
static rt_size_t _serial_fifo_calc_recved_len(struct rt_serial_device *serial) static rt_size_t _serial_fifo_calc_recved_len(struct rt_serial_device *serial)
{ {
struct rt_serial_rx_fifo *rx_fifo = (struct rt_serial_rx_fifo *) serial->serial_rx; struct rt_serial_rx_fifo *rx_fifo = (struct rt_serial_rx_fifo *) serial->serial_rx;
@ -385,7 +385,7 @@ static rt_size_t _serial_fifo_calc_recved_len(struct rt_serial_device *serial)
} }
} }
} }
#endif /* RT_USING_POSIX_DEVIO || RT_SERIAL_USING_DMA */ #endif /* RT_USING_POSIX_STDIO || RT_SERIAL_USING_DMA */
#ifdef RT_SERIAL_USING_DMA #ifdef RT_SERIAL_USING_DMA
/** /**
@ -1019,7 +1019,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
} }
break; break;
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#ifdef RT_USING_POSIX_TERMIOS #ifdef RT_USING_POSIX_TERMIOS
case TCGETA: case TCGETA:
{ {
@ -1215,7 +1215,7 @@ static rt_err_t rt_serial_control(struct rt_device *dev,
*(rt_size_t *)args = recved; *(rt_size_t *)args = recved;
} }
break; break;
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
default : default :
/* control device */ /* control device */
ret = serial->ops->control(serial, cmd, args); ret = serial->ops->control(serial, cmd, args);
@ -1270,7 +1270,7 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
/* register a character device */ /* register a character device */
ret = rt_device_register(device, name, flag); ret = rt_device_register(device, name, flag);
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
/* set fops */ /* set fops */
device->fops = &_serial_fops; device->fops = &_serial_fops;
#endif #endif

View File

@ -16,7 +16,7 @@
#define DBG_LVL DBG_INFO #define DBG_LVL DBG_INFO
#include <rtdbg.h> #include <rtdbg.h>
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include <dfs_posix.h> #include <dfs_posix.h>
#include <poll.h> #include <poll.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -179,7 +179,7 @@ const static struct dfs_file_ops _serial_fops =
RT_NULL, /* getdents */ RT_NULL, /* getdents */
serial_fops_poll, serial_fops_poll,
}; };
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
static rt_size_t rt_serial_get_linear_buffer(struct rt_ringbuffer *rb, static rt_size_t rt_serial_get_linear_buffer(struct rt_ringbuffer *rb,
rt_uint8_t **ptr) rt_uint8_t **ptr)
@ -1135,7 +1135,7 @@ rt_err_t rt_hw_serial_register(struct rt_serial_device *serial,
/* register a character device */ /* register a character device */
ret = rt_device_register(device, name, flag); ret = rt_device_register(device, name, flag);
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
/* set fops */ /* set fops */
device->fops = &_serial_fops; device->fops = &_serial_fops;
#endif #endif

View File

@ -168,7 +168,7 @@ extern struct finsh_syscall *_syscall_table_begin, *_syscall_table_end;
/* find out system call, which should be implemented in user program */ /* find out system call, which should be implemented in user program */
struct finsh_syscall *finsh_syscall_lookup(const char *name); struct finsh_syscall *finsh_syscall_lookup(const char *name);
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
void finsh_set_device(const char *device_name); void finsh_set_device(const char *device_name);
#endif #endif

View File

@ -146,7 +146,7 @@ int finsh_getchar(void)
{ {
#ifdef RT_USING_DEVICE #ifdef RT_USING_DEVICE
char ch = 0; char ch = 0;
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
if(read(STDIN_FILENO, &ch, 1) > 0) if(read(STDIN_FILENO, &ch, 1) > 0)
{ {
return ch; return ch;
@ -170,14 +170,14 @@ int finsh_getchar(void)
rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER); rt_sem_take(&shell->rx_sem, RT_WAITING_FOREVER);
return ch; return ch;
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
#else #else
extern char rt_hw_console_getchar(void); extern char rt_hw_console_getchar(void);
return rt_hw_console_getchar(); return rt_hw_console_getchar();
#endif /* RT_USING_DEVICE */ #endif /* RT_USING_DEVICE */
} }
#if !defined(RT_USING_POSIX_DEVIO) && 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) static rt_err_t finsh_rx_ind(rt_device_t dev, rt_size_t size)
{ {
RT_ASSERT(shell != RT_NULL); RT_ASSERT(shell != RT_NULL);
@ -241,7 +241,7 @@ const char *finsh_get_device()
RT_ASSERT(shell != RT_NULL); RT_ASSERT(shell != RT_NULL);
return shell->device->parent.name; return shell->device->parent.name;
} }
#endif /* !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) */ #endif /* !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE) */
/** /**
* @ingroup finsh * @ingroup finsh
@ -443,7 +443,7 @@ void finsh_thread_entry(void *parameter)
shell->echo_mode = 0; shell->echo_mode = 0;
#endif #endif
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
/* set console device as shell device */ /* set console device as shell device */
if (shell->device == RT_NULL) if (shell->device == RT_NULL)
{ {
@ -453,7 +453,7 @@ void finsh_thread_entry(void *parameter)
finsh_set_device(console->parent.name); finsh_set_device(console->parent.name);
} }
} }
#endif /* !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) */ #endif /* !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE) */
#ifdef FINSH_USING_AUTH #ifdef FINSH_USING_AUTH
/* set the default password when the password isn't setting */ /* set the default password when the password isn't setting */

View File

@ -78,7 +78,7 @@ struct finsh_shell
rt_uint16_t line_position; rt_uint16_t line_position;
rt_uint16_t line_curpos; rt_uint16_t line_curpos;
#if !defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_DEVICE) #if !defined(RT_USING_POSIX_STDIO) && defined(RT_USING_DEVICE)
rt_device_t device; rt_device_t device;
#endif #endif

View File

@ -22,9 +22,9 @@
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <compiler_private.h> #include <compiler_private.h>
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include "libc.h" #include "libc.h"
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
#define DBG_TAG "armlibc.syscalls" #define DBG_TAG "armlibc.syscalls"
#define DBG_LVL DBG_INFO #define DBG_LVL DBG_INFO
@ -152,7 +152,7 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
if (fh == STDIN) if (fh == STDIN)
{ {
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
if (libc_stdio_get_console() < 0) if (libc_stdio_get_console() < 0)
{ {
LOG_W("Do not invoke standard output before initializing Compiler"); LOG_W("Do not invoke standard output before initializing Compiler");
@ -161,9 +161,9 @@ int _sys_read(FILEHANDLE fh, unsigned char *buf, unsigned len, int mode)
size = read(STDIN_FILENO, buf, len); size = read(STDIN_FILENO, buf, len);
return len - size; /* success */ return len - size; /* success */
#else #else
LOG_W("%s: %s", __func__, _WARNING_WITHOUT_DEVIO); LOG_W("%s: %s", __func__, _WARNING_WITHOUT_STDIO);
return 0; /* error */ return 0; /* error */
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
} }
else if (fh == STDOUT || fh == STDERR) else if (fh == STDOUT || fh == STDERR)
{ {
@ -349,7 +349,7 @@ int fputc(int c, FILE *f)
int fgetc(FILE *f) int fgetc(FILE *f)
{ {
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
char ch; char ch;
if (libc_stdio_get_console() < 0) if (libc_stdio_get_console() < 0)
@ -360,8 +360,8 @@ int fgetc(FILE *f)
if(read(STDIN_FILENO, &ch, 1) == 1) if(read(STDIN_FILENO, &ch, 1) == 1)
return ch; return ch;
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
LOG_W("%s: %s", __func__, _WARNING_WITHOUT_DEVIO); LOG_W("%s: %s", __func__, _WARNING_WITHOUT_STDIO);
return 0; /* error */ return 0; /* error */
} }

View File

@ -13,6 +13,6 @@
#include <rtconfig.h> #include <rtconfig.h>
#define _WARNING_WITHOUT_FS "Please enable RT_USING_POSIX_FS" #define _WARNING_WITHOUT_FS "Please enable RT_USING_POSIX_FS"
#define _WARNING_WITHOUT_DEVIO "Please enable RT_USING_POSIX_FS and RT_USING_POSIX_DEVIO" #define _WARNING_WITHOUT_STDIO "Please enable RT_USING_POSIX_FS and RT_USING_POSIX_STDIO"
#endif /* __COMPILER_PRIVATE_H__ */ #endif /* __COMPILER_PRIVATE_H__ */

View File

@ -11,9 +11,9 @@
#include <rtthread.h> #include <rtthread.h>
#include <LowLevelIOInterface.h> #include <LowLevelIOInterface.h>
#include <unistd.h> #include <unistd.h>
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include "libc.h" #include "libc.h"
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
#include <compiler_private.h> #include <compiler_private.h>
#define DBG_TAG "dlib.syscall.read" #define DBG_TAG "dlib.syscall.read"
#define DBG_LVL DBG_INFO #define DBG_LVL DBG_INFO
@ -39,7 +39,7 @@ size_t __read(int handle, unsigned char *buf, size_t len)
if (handle == _LLIO_STDIN) if (handle == _LLIO_STDIN)
{ {
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
if (libc_stdio_get_console() < 0) if (libc_stdio_get_console() < 0)
{ {
LOG_W("Do not invoke standard input before initializing Compiler"); LOG_W("Do not invoke standard input before initializing Compiler");
@ -47,9 +47,9 @@ size_t __read(int handle, unsigned char *buf, size_t len)
} }
return read(STDIN_FILENO, buf, len); /* return the length of the data read */ return read(STDIN_FILENO, buf, len); /* return the length of the data read */
#else #else
LOG_W(_WARNING_WITHOUT_DEVIO); LOG_W(_WARNING_WITHOUT_STDIO);
return _LLIO_ERROR; return _LLIO_ERROR;
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
} }
else if ((handle == _LLIO_STDOUT) || (handle == _LLIO_STDERR)) else if ((handle == _LLIO_STDOUT) || (handle == _LLIO_STDERR))
{ {

View File

@ -20,9 +20,9 @@
#include <unistd.h> #include <unistd.h>
#include <sys/errno.h> #include <sys/errno.h>
#include <sys/stat.h> #include <sys/stat.h>
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
#include "libc.h" #include "libc.h"
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
#ifdef RT_USING_MODULE #ifdef RT_USING_MODULE
#include <dlmodule.h> #include <dlmodule.h>
#endif /* RT_USING_MODULE */ #endif /* RT_USING_MODULE */
@ -225,17 +225,17 @@ _ssize_t _read_r(struct _reent *ptr, int fd, void *buf, size_t nbytes)
_ssize_t rc; _ssize_t rc;
if (fd == STDIN_FILENO) if (fd == STDIN_FILENO)
{ {
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
if (libc_stdio_get_console() < 0) if (libc_stdio_get_console() < 0)
{ {
LOG_W("Do not invoke standard input before initializing Compiler"); LOG_W("Do not invoke standard input before initializing Compiler");
return 0; return 0;
} }
#else #else
LOG_W("%s: %s", __func__, _WARNING_WITHOUT_DEVIO); LOG_W("%s: %s", __func__, _WARNING_WITHOUT_STDIO);
ptr->_errno = ENOTSUP; ptr->_errno = ENOTSUP;
return -1; return -1;
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
} }
else if (fd == STDOUT_FILENO || fd == STDERR_FILENO) else if (fd == STDOUT_FILENO || fd == STDERR_FILENO)
{ {

View File

@ -12,6 +12,11 @@ if RT_USING_POSIX_FS
select RT_USING_DFS_DEVFS select RT_USING_DFS_DEVFS
default n default n
config RT_USING_POSIX_STDIO
bool "Enable standard I/O devices, e.g. STDOUT_FILENO"
select RT_USING_POSIX_DEVIO
default n
config RT_USING_POSIX_POLL config RT_USING_POSIX_POLL
bool "Enable I/O Multiplexing poll() <poll.h>" bool "Enable I/O Multiplexing poll() <poll.h>"
default n default n
@ -23,7 +28,7 @@ if RT_USING_POSIX_FS
config RT_USING_POSIX_TERMIOS config RT_USING_POSIX_TERMIOS
bool "Enable Terminal I/O <termios.h>" bool "Enable Terminal I/O <termios.h>"
select RT_USING_POSIX_DEVIO select RT_USING_POSIX_STDIO
default n default n
config RT_USING_POSIX_AIO config RT_USING_POSIX_AIO

View File

@ -10,7 +10,7 @@ group = []
flag = False flag = False
if GetDepend('RT_USING_POSIX_DEVIO'): if GetDepend('RT_USING_POSIX_STDIO'):
src += ['libc.c'] src += ['libc.c']
flag = True flag = True

View File

@ -20,7 +20,7 @@
int libc_system_init(void) int libc_system_init(void)
{ {
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
rt_device_t dev_console; rt_device_t dev_console;
dev_console = rt_console_get_device(); dev_console = rt_console_get_device();
@ -28,12 +28,12 @@ int libc_system_init(void)
{ {
libc_stdio_set_console(dev_console->parent.name, O_RDWR); libc_stdio_set_console(dev_console->parent.name, O_RDWR);
} }
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
return 0; return 0;
} }
INIT_COMPONENT_EXPORT(libc_system_init); INIT_COMPONENT_EXPORT(libc_system_init);
#if defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_NEWLIB) #if defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB)
#define STDIO_DEVICE_NAME_MAX 32 #define STDIO_DEVICE_NAME_MAX 32
static FILE* std_console = NULL; static FILE* std_console = NULL;
int libc_stdio_set_console(const char* device_name, int mode) int libc_stdio_set_console(const char* device_name, int mode)
@ -134,4 +134,4 @@ int libc_stdio_set_console(const char* device_name, int mode)
int libc_stdio_get_console(void) { int libc_stdio_get_console(void) {
return std_fd; return std_fd;
} }
#endif /* defined(RT_USING_POSIX_DEVIO) && defined(RT_USING_NEWLIB) */ #endif /* defined(RT_USING_POSIX_STDIO) && defined(RT_USING_NEWLIB) */

View File

@ -17,10 +17,10 @@ extern "C" {
#endif #endif
int libc_system_init(void); int libc_system_init(void);
#ifdef RT_USING_POSIX_DEVIO #ifdef RT_USING_POSIX_STDIO
int libc_stdio_get_console(void); int libc_stdio_get_console(void);
int libc_stdio_set_console(const char* device_name, int mode); int libc_stdio_set_console(const char* device_name, int mode);
#endif /* RT_USING_POSIX_DEVIO */ #endif /* RT_USING_POSIX_STDIO */
#ifdef __cplusplus #ifdef __cplusplus
} }