From 31c0617942a32eccda1b93a51f7c5c1870b7982d Mon Sep 17 00:00:00 2001 From: lida Date: Wed, 19 Sep 2018 11:30:09 +0800 Subject: [PATCH] [bsp][stm32f40x] add file .config rtconfig.h --- bsp/stm32f40x/.config | 98 ++++++++++++++-------------------------- bsp/stm32f40x/rtconfig.h | 57 ++++++----------------- 2 files changed, 48 insertions(+), 107 deletions(-) diff --git a/bsp/stm32f40x/.config b/bsp/stm32f40x/.config index f900be8d0c..b7945e1820 100644 --- a/bsp/stm32f40x/.config +++ b/bsp/stm32f40x/.config @@ -44,10 +44,11 @@ CONFIG_RT_USING_MESSAGEQUEUE=y # Memory Management # CONFIG_RT_USING_MEMPOOL=y -# CONFIG_RT_USING_MEMHEAP is not set +CONFIG_RT_USING_MEMHEAP=y # CONFIG_RT_USING_NOHEAP is not set CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set # CONFIG_RT_USING_MEMTRACE is not set CONFIG_RT_USING_HEAP=y @@ -60,7 +61,6 @@ CONFIG_RT_USING_DEVICE=y CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 CONFIG_RT_CONSOLE_DEVICE_NAME="uart2" -# CONFIG_RT_USING_MODULE is not set CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM_CORTEX_M=y CONFIG_ARCH_ARM_CORTEX_M4=y @@ -69,7 +69,9 @@ CONFIG_ARCH_ARM_CORTEX_M4=y # RT-Thread Components # CONFIG_RT_USING_COMPONENTS_INIT=y -# CONFIG_RT_USING_USER_MAIN is not set +CONFIG_RT_USING_USER_MAIN=y +CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048 +CONFIG_RT_MAIN_THREAD_PRIORITY=10 # # C++ features @@ -103,6 +105,7 @@ CONFIG_DFS_USING_WORKDIR=y CONFIG_DFS_FILESYSTEMS_MAX=2 CONFIG_DFS_FILESYSTEM_TYPES_MAX=2 CONFIG_DFS_FD_MAX=16 +# CONFIG_RT_USING_DFS_MNTTABLE is not set CONFIG_RT_USING_DFS_ELMFAT=y # @@ -125,7 +128,6 @@ CONFIG_RT_USING_DFS_DEVFS=y # CONFIG_RT_USING_DFS_RAMFS is not set # CONFIG_RT_USING_DFS_UFFS is not set # CONFIG_RT_USING_DFS_JFFS2 is not set -# CONFIG_RT_USING_DFS_NFS is not set # # Device Drivers @@ -163,7 +165,7 @@ CONFIG_RT_USING_POSIX=y # CONFIG_RT_USING_POSIX_MMAP is not set # CONFIG_RT_USING_POSIX_TERMIOS is not set # CONFIG_RT_USING_POSIX_AIO is not set -# CONFIG_RT_USING_LWP is not set +# CONFIG_RT_USING_MODULE is not set # # Network @@ -172,70 +174,22 @@ CONFIG_RT_USING_POSIX=y # # Socket abstraction layer # -CONFIG_RT_USING_SAL=y - -# -# protocol stack implement -# -CONFIG_SAL_USING_LWIP=y -CONFIG_SAL_USING_POSIX=y -CONFIG_SAL_PROTO_FAMILIES_NUM=4 +# CONFIG_RT_USING_SAL is not set # # light weight TCP/IP stack # -CONFIG_RT_USING_LWIP=y -# CONFIG_RT_USING_LWIP141 is not set -CONFIG_RT_USING_LWIP202=y -# CONFIG_RT_USING_LWIP_IPV6 is not set -CONFIG_RT_LWIP_IGMP=y -CONFIG_RT_LWIP_ICMP=y -# CONFIG_RT_LWIP_SNMP is not set -CONFIG_RT_LWIP_DNS=y -CONFIG_RT_LWIP_DHCP=y -CONFIG_IP_SOF_BROADCAST=1 -CONFIG_IP_SOF_BROADCAST_RECV=1 - -# -# Static IPv4 Address -# -CONFIG_RT_LWIP_IPADDR="192.168.1.30" -CONFIG_RT_LWIP_GWADDR="192.168.1.1" -CONFIG_RT_LWIP_MSKADDR="255.255.255.0" -CONFIG_RT_LWIP_UDP=y -CONFIG_RT_LWIP_TCP=y -# CONFIG_RT_LWIP_RAW is not set -# CONFIG_RT_LWIP_PPP is not set -CONFIG_RT_MEMP_NUM_NETCONN=8 -CONFIG_RT_LWIP_PBUF_NUM=16 -CONFIG_RT_LWIP_RAW_PCB_NUM=4 -CONFIG_RT_LWIP_UDP_PCB_NUM=4 -CONFIG_RT_LWIP_TCP_PCB_NUM=5 -CONFIG_RT_LWIP_TCP_SEG_NUM=40 -CONFIG_RT_LWIP_TCP_SND_BUF=8192 -CONFIG_RT_LWIP_TCP_WND=8192 -CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=12 -CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=4 -CONFIG_RT_LWIP_TCPTHREAD_STACKSIZE=1024 -# CONFIG_LWIP_NO_RX_THREAD is not set -# CONFIG_LWIP_NO_TX_THREAD is not set -CONFIG_RT_LWIP_ETHTHREAD_PRIORITY=15 -CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=512 -CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=4 -# CONFIG_RT_LWIP_REASSEMBLY_FRAG is not set -CONFIG_LWIP_NETIF_STATUS_CALLBACK=1 -CONFIG_SO_REUSE=1 -CONFIG_LWIP_SO_RCVTIMEO=1 -CONFIG_LWIP_SO_SNDTIMEO=1 -CONFIG_LWIP_SO_RCVBUF=1 -# CONFIG_RT_LWIP_NETIF_LOOPBACK is not set -CONFIG_LWIP_NETIF_LOOPBACK=0 +# CONFIG_RT_USING_LWIP is not set # # Modbus master and slave stack # # CONFIG_RT_USING_MODBUS is not set -# CONFIG_LWIP_USING_DHCPD is not set + +# +# AT commands +# +# CONFIG_RT_USING_AT is not set # # VBUS(Virtual Software BUS) @@ -270,7 +224,6 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_PKG_USING_LJSON is not set # CONFIG_PKG_USING_EZXML is not set # CONFIG_PKG_USING_NANOPB is not set -# CONFIG_PKG_USING_GAGENT_CLOUD is not set # # Wi-Fi @@ -288,9 +241,16 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set -# CONFIG_PKG_USING_ONENET is not set # CONFIG_PKG_USING_AT_DEVICE is not set +# +# IoT Cloud +# +# CONFIG_PKG_USING_ONENET is not set +# CONFIG_PKG_USING_GAGENT_CLOUD is not set +# CONFIG_PKG_USING_ALI_IOTKIT is not set +# CONFIG_PKG_USING_AZURE is not set + # # security packages # @@ -339,10 +299,15 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_PKG_USING_STM32F4_HAL is not set # CONFIG_PKG_USING_STM32F4_DRIVERS is not set # CONFIG_PKG_USING_REALTEK_AMEBA is not set +# CONFIG_PKG_USING_SHT2X is not set +# CONFIG_PKG_USING_AHT10 is not set +# CONFIG_PKG_USING_AP3216C is not set +# CONFIG_PKG_USING_STM32_SDIO is not set # # miscellaneous packages # +# CONFIG_PKG_USING_LIBCSV is not set # CONFIG_PKG_USING_OPTPARSE is not set # CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_MINILZO is not set @@ -355,7 +320,14 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # # sample package # -# CONFIG_PKG_USING_SAMPLES is not set + +# +# samples: kernel and components samples +# +# CONFIG_PKG_USING_KERNEL_SAMPLES is not set +# CONFIG_PKG_USING_FILESYSTEM_SAMPLES is not set +# CONFIG_PKG_USING_NETWORK_SAMPLES is not set +# CONFIG_PKG_USING_PERIPHERAL_SAMPLES is not set # # example package: hello diff --git a/bsp/stm32f40x/rtconfig.h b/bsp/stm32f40x/rtconfig.h index 92b95c9317..9482d19aa3 100644 --- a/bsp/stm32f40x/rtconfig.h +++ b/bsp/stm32f40x/rtconfig.h @@ -28,6 +28,7 @@ /* Memory Management */ #define RT_USING_MEMPOOL +#define RT_USING_MEMHEAP #define RT_USING_SMALL_MEM #define RT_USING_HEAP @@ -36,7 +37,7 @@ #define RT_USING_DEVICE #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 -#define RT_CONSOLE_DEVICE_NAME "uart2" +#define RT_CONSOLE_DEVICE_NAME "uart1" #define ARCH_ARM #define ARCH_ARM_CORTEX_M #define ARCH_ARM_CORTEX_M4 @@ -44,6 +45,9 @@ /* RT-Thread Components */ #define RT_USING_COMPONENTS_INIT +#define RT_USING_USER_MAIN +#define RT_MAIN_THREAD_STACK_SIZE 2048 +#define RT_MAIN_THREAD_PRIORITY 10 /* C++ features */ @@ -104,56 +108,16 @@ /* Socket abstraction layer */ -#define RT_USING_SAL - -/* protocol stack implement */ - -#define SAL_USING_LWIP -#define SAL_USING_POSIX -#define SAL_PROTO_FAMILIES_NUM 4 /* light weight TCP/IP stack */ -#define RT_USING_LWIP -#define RT_USING_LWIP202 -#define RT_LWIP_IGMP -#define RT_LWIP_ICMP -#define RT_LWIP_DNS -#define RT_LWIP_DHCP -#define IP_SOF_BROADCAST 1 -#define IP_SOF_BROADCAST_RECV 1 - -/* Static IPv4 Address */ - -#define RT_LWIP_IPADDR "192.168.1.30" -#define RT_LWIP_GWADDR "192.168.1.1" -#define RT_LWIP_MSKADDR "255.255.255.0" -#define RT_LWIP_UDP -#define RT_LWIP_TCP -#define RT_MEMP_NUM_NETCONN 8 -#define RT_LWIP_PBUF_NUM 16 -#define RT_LWIP_RAW_PCB_NUM 4 -#define RT_LWIP_UDP_PCB_NUM 4 -#define RT_LWIP_TCP_PCB_NUM 5 -#define RT_LWIP_TCP_SEG_NUM 40 -#define RT_LWIP_TCP_SND_BUF 8192 -#define RT_LWIP_TCP_WND 8192 -#define RT_LWIP_TCPTHREAD_PRIORITY 12 -#define RT_LWIP_TCPTHREAD_MBOX_SIZE 4 -#define RT_LWIP_TCPTHREAD_STACKSIZE 1024 -#define RT_LWIP_ETHTHREAD_PRIORITY 15 -#define RT_LWIP_ETHTHREAD_STACKSIZE 512 -#define RT_LWIP_ETHTHREAD_MBOX_SIZE 4 -#define LWIP_NETIF_STATUS_CALLBACK 1 -#define SO_REUSE 1 -#define LWIP_SO_RCVTIMEO 1 -#define LWIP_SO_SNDTIMEO 1 -#define LWIP_SO_RCVBUF 1 -#define LWIP_NETIF_LOOPBACK 0 /* Modbus master and slave stack */ +/* AT commands */ + + /* VBUS(Virtual Software BUS) */ @@ -176,6 +140,9 @@ /* Wiced WiFi */ +/* IoT Cloud */ + + /* security packages */ @@ -199,6 +166,8 @@ /* sample package */ +/* samples: kernel and components samples */ + /* example package: hello */