Merge pull request #2084 from whj4674672/master
Change the user interface to main
This commit is contained in:
commit
9079572527
|
@ -7,6 +7,7 @@
|
||||||
# RT-Thread Kernel
|
# RT-Thread Kernel
|
||||||
#
|
#
|
||||||
CONFIG_RT_NAME_MAX=8
|
CONFIG_RT_NAME_MAX=8
|
||||||
|
# CONFIG_RT_USING_SMP is not set
|
||||||
CONFIG_RT_ALIGN_SIZE=4
|
CONFIG_RT_ALIGN_SIZE=4
|
||||||
# CONFIG_RT_THREAD_PRIORITY_8 is not set
|
# CONFIG_RT_THREAD_PRIORITY_8 is not set
|
||||||
CONFIG_RT_THREAD_PRIORITY_32=y
|
CONFIG_RT_THREAD_PRIORITY_32=y
|
||||||
|
@ -15,6 +16,7 @@ CONFIG_RT_THREAD_PRIORITY_MAX=32
|
||||||
CONFIG_RT_TICK_PER_SECOND=1000
|
CONFIG_RT_TICK_PER_SECOND=1000
|
||||||
CONFIG_RT_USING_OVERFLOW_CHECK=y
|
CONFIG_RT_USING_OVERFLOW_CHECK=y
|
||||||
CONFIG_RT_USING_HOOK=y
|
CONFIG_RT_USING_HOOK=y
|
||||||
|
CONFIG_RT_USING_IDLE_HOOK=y
|
||||||
CONFIG_RT_IDEL_HOOK_LIST_SIZE=4
|
CONFIG_RT_IDEL_HOOK_LIST_SIZE=4
|
||||||
CONFIG_IDLE_THREAD_STACK_SIZE=256
|
CONFIG_IDLE_THREAD_STACK_SIZE=256
|
||||||
# CONFIG_RT_USING_TIMER_SOFT is not set
|
# CONFIG_RT_USING_TIMER_SOFT is not set
|
||||||
|
@ -61,16 +63,19 @@ CONFIG_RT_USING_DEVICE=y
|
||||||
CONFIG_RT_USING_CONSOLE=y
|
CONFIG_RT_USING_CONSOLE=y
|
||||||
CONFIG_RT_CONSOLEBUF_SIZE=128
|
CONFIG_RT_CONSOLEBUF_SIZE=128
|
||||||
CONFIG_RT_CONSOLE_DEVICE_NAME="uart2"
|
CONFIG_RT_CONSOLE_DEVICE_NAME="uart2"
|
||||||
# CONFIG_RT_USING_MODULE is not set
|
CONFIG_RT_VER_NUM=0x40000
|
||||||
CONFIG_ARCH_ARM=y
|
CONFIG_ARCH_ARM=y
|
||||||
CONFIG_ARCH_ARM_CORTEX_M=y
|
CONFIG_ARCH_ARM_CORTEX_M=y
|
||||||
CONFIG_ARCH_ARM_CORTEX_M3=y
|
CONFIG_ARCH_ARM_CORTEX_M3=y
|
||||||
|
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# RT-Thread Components
|
# RT-Thread Components
|
||||||
#
|
#
|
||||||
CONFIG_RT_USING_COMPONENTS_INIT=y
|
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
|
# C++ features
|
||||||
|
@ -99,35 +104,7 @@ CONFIG_FINSH_ARG_MAX=10
|
||||||
#
|
#
|
||||||
# Device virtual file system
|
# Device virtual file system
|
||||||
#
|
#
|
||||||
CONFIG_RT_USING_DFS=y
|
# CONFIG_RT_USING_DFS is not set
|
||||||
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
|
|
||||||
|
|
||||||
#
|
|
||||||
# elm-chan's FatFs, Generic FAT Filesystem Module
|
|
||||||
#
|
|
||||||
CONFIG_RT_DFS_ELM_CODE_PAGE=437
|
|
||||||
CONFIG_RT_DFS_ELM_WORD_ACCESS=y
|
|
||||||
# CONFIG_RT_DFS_ELM_USE_LFN_0 is not set
|
|
||||||
# CONFIG_RT_DFS_ELM_USE_LFN_1 is not set
|
|
||||||
# CONFIG_RT_DFS_ELM_USE_LFN_2 is not set
|
|
||||||
CONFIG_RT_DFS_ELM_USE_LFN_3=y
|
|
||||||
CONFIG_RT_DFS_ELM_USE_LFN=3
|
|
||||||
CONFIG_RT_DFS_ELM_MAX_LFN=255
|
|
||||||
CONFIG_RT_DFS_ELM_DRIVES=2
|
|
||||||
CONFIG_RT_DFS_ELM_MAX_SECTOR_SIZE=512
|
|
||||||
# CONFIG_RT_DFS_ELM_USE_ERASE is not set
|
|
||||||
CONFIG_RT_DFS_ELM_REENTRANT=y
|
|
||||||
CONFIG_RT_USING_DFS_DEVFS=y
|
|
||||||
# CONFIG_RT_USING_DFS_ROMFS is not set
|
|
||||||
# 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
|
# Device Drivers
|
||||||
|
@ -135,21 +112,29 @@ CONFIG_RT_USING_DFS_DEVFS=y
|
||||||
CONFIG_RT_USING_DEVICE_IPC=y
|
CONFIG_RT_USING_DEVICE_IPC=y
|
||||||
CONFIG_RT_PIPE_BUFSZ=512
|
CONFIG_RT_PIPE_BUFSZ=512
|
||||||
CONFIG_RT_USING_SERIAL=y
|
CONFIG_RT_USING_SERIAL=y
|
||||||
|
CONFIG_RT_SERIAL_USING_DMA=y
|
||||||
# CONFIG_RT_USING_CAN is not set
|
# CONFIG_RT_USING_CAN is not set
|
||||||
# CONFIG_RT_USING_HWTIMER is not set
|
# CONFIG_RT_USING_HWTIMER is not set
|
||||||
# CONFIG_RT_USING_CPUTIME is not set
|
# CONFIG_RT_USING_CPUTIME is not set
|
||||||
# CONFIG_RT_USING_I2C is not set
|
# CONFIG_RT_USING_I2C is not set
|
||||||
CONFIG_RT_USING_PIN=y
|
CONFIG_RT_USING_PIN=y
|
||||||
|
# CONFIG_RT_USING_ADC is not set
|
||||||
# CONFIG_RT_USING_PWM is not set
|
# CONFIG_RT_USING_PWM is not set
|
||||||
# CONFIG_RT_USING_MTD_NOR is not set
|
# CONFIG_RT_USING_MTD_NOR is not set
|
||||||
# CONFIG_RT_USING_MTD_NAND is not set
|
# CONFIG_RT_USING_MTD_NAND is not set
|
||||||
|
# CONFIG_RT_USING_MTD is not set
|
||||||
|
# CONFIG_RT_USING_PM is not set
|
||||||
# CONFIG_RT_USING_RTC is not set
|
# CONFIG_RT_USING_RTC is not set
|
||||||
# CONFIG_RT_USING_SDIO is not set
|
# CONFIG_RT_USING_SDIO is not set
|
||||||
# CONFIG_RT_USING_SPI is not set
|
# CONFIG_RT_USING_SPI is not set
|
||||||
# CONFIG_RT_USING_WDT is not set
|
# CONFIG_RT_USING_WDT is not set
|
||||||
# CONFIG_RT_USING_WIFI is not set
|
|
||||||
# CONFIG_RT_USING_AUDIO is not set
|
# CONFIG_RT_USING_AUDIO is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Using WiFi
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_WIFI is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# Using USB
|
# Using USB
|
||||||
#
|
#
|
||||||
|
@ -161,8 +146,6 @@ CONFIG_RT_USING_PIN=y
|
||||||
#
|
#
|
||||||
CONFIG_RT_USING_LIBC=y
|
CONFIG_RT_USING_LIBC=y
|
||||||
# CONFIG_RT_USING_PTHREADS is not set
|
# CONFIG_RT_USING_PTHREADS is not set
|
||||||
# CONFIG_RT_USING_POSIX is not set
|
|
||||||
# CONFIG_RT_USING_LWP is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Network
|
# Network
|
||||||
|
@ -176,54 +159,7 @@ CONFIG_RT_USING_LIBC=y
|
||||||
#
|
#
|
||||||
# light weight TCP/IP stack
|
# light weight TCP/IP stack
|
||||||
#
|
#
|
||||||
CONFIG_RT_USING_LWIP=y
|
# CONFIG_RT_USING_LWIP is not set
|
||||||
# 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=4
|
|
||||||
CONFIG_RT_LWIP_TCP_SEG_NUM=40
|
|
||||||
CONFIG_RT_LWIP_TCP_SND_BUF=8196
|
|
||||||
CONFIG_RT_LWIP_TCP_WND=8196
|
|
||||||
CONFIG_RT_LWIP_TCPTHREAD_PRIORITY=10
|
|
||||||
CONFIG_RT_LWIP_TCPTHREAD_MBOX_SIZE=8
|
|
||||||
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=12
|
|
||||||
CONFIG_RT_LWIP_ETHTHREAD_STACKSIZE=1024
|
|
||||||
CONFIG_RT_LWIP_ETHTHREAD_MBOX_SIZE=8
|
|
||||||
# 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_LWIP_STATS is not set
|
|
||||||
# CONFIG_RT_LWIP_DEBUG is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Modbus master and slave stack
|
# Modbus master and slave stack
|
||||||
|
@ -234,7 +170,6 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
|
||||||
# AT commands
|
# AT commands
|
||||||
#
|
#
|
||||||
# CONFIG_RT_USING_AT is not set
|
# CONFIG_RT_USING_AT is not set
|
||||||
# CONFIG_LWIP_USING_DHCPD is not set
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# VBUS(Virtual Software BUS)
|
# VBUS(Virtual Software BUS)
|
||||||
|
@ -246,12 +181,15 @@ CONFIG_LWIP_NETIF_LOOPBACK=0
|
||||||
#
|
#
|
||||||
# CONFIG_RT_USING_LOGTRACE is not set
|
# CONFIG_RT_USING_LOGTRACE is not set
|
||||||
# CONFIG_RT_USING_RYM is not set
|
# CONFIG_RT_USING_RYM is not set
|
||||||
|
# CONFIG_RT_USING_ULOG is not set
|
||||||
|
# CONFIG_RT_USING_UTEST is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# ARM CMSIS
|
# ARM CMSIS
|
||||||
#
|
#
|
||||||
# CONFIG_RT_USING_CMSIS_OS is not set
|
# CONFIG_RT_USING_CMSIS_OS is not set
|
||||||
CONFIG_RT_USING_RTT_CMSIS=y
|
CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
|
# CONFIG_RT_USING_LWP is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# RT-Thread online packages
|
# RT-Thread online packages
|
||||||
|
@ -262,6 +200,7 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
#
|
#
|
||||||
# CONFIG_PKG_USING_PAHOMQTT is not set
|
# CONFIG_PKG_USING_PAHOMQTT is not set
|
||||||
# CONFIG_PKG_USING_WEBCLIENT is not set
|
# CONFIG_PKG_USING_WEBCLIENT is not set
|
||||||
|
# CONFIG_PKG_USING_WEBNET is not set
|
||||||
# CONFIG_PKG_USING_MONGOOSE is not set
|
# CONFIG_PKG_USING_MONGOOSE is not set
|
||||||
# CONFIG_PKG_USING_WEBTERMINAL is not set
|
# CONFIG_PKG_USING_WEBTERMINAL is not set
|
||||||
# CONFIG_PKG_USING_CJSON is not set
|
# CONFIG_PKG_USING_CJSON is not set
|
||||||
|
@ -287,6 +226,7 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
# 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
|
||||||
# CONFIG_PKG_USING_AT_DEVICE is not set
|
# CONFIG_PKG_USING_AT_DEVICE is not set
|
||||||
|
# CONFIG_PKG_USING_WIZNET is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# IoT Cloud
|
# IoT Cloud
|
||||||
|
@ -294,6 +234,8 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
# CONFIG_PKG_USING_ONENET is not set
|
# CONFIG_PKG_USING_ONENET is not set
|
||||||
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
|
# CONFIG_PKG_USING_GAGENT_CLOUD is not set
|
||||||
# CONFIG_PKG_USING_ALI_IOTKIT is not set
|
# CONFIG_PKG_USING_ALI_IOTKIT is not set
|
||||||
|
# CONFIG_PKG_USING_AZURE is not set
|
||||||
|
# CONFIG_PKG_USING_TENCENT_IOTKIT is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# security packages
|
# security packages
|
||||||
|
@ -322,6 +264,9 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
# CONFIG_PKG_USING_EASYFLASH is not set
|
# CONFIG_PKG_USING_EASYFLASH is not set
|
||||||
# CONFIG_PKG_USING_EASYLOGGER is not set
|
# CONFIG_PKG_USING_EASYLOGGER is not set
|
||||||
# CONFIG_PKG_USING_SYSTEMVIEW is not set
|
# CONFIG_PKG_USING_SYSTEMVIEW is not set
|
||||||
|
# CONFIG_PKG_USING_RDB is not set
|
||||||
|
# CONFIG_PKG_USING_QRCODE is not set
|
||||||
|
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# system packages
|
# system packages
|
||||||
|
@ -335,14 +280,24 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
# CONFIG_PKG_USING_SQLITE is not set
|
# CONFIG_PKG_USING_SQLITE is not set
|
||||||
# CONFIG_PKG_USING_RTI is not set
|
# CONFIG_PKG_USING_RTI is not set
|
||||||
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
|
# CONFIG_PKG_USING_LITTLEVGL2RTT 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
|
||||||
|
|
||||||
#
|
#
|
||||||
# peripheral libraries and drivers
|
# peripheral libraries and drivers
|
||||||
#
|
#
|
||||||
# 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_REALTEK_AMEBA is not set
|
||||||
# CONFIG_PKG_USING_SHT2X 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
|
||||||
|
# CONFIG_PKG_USING_ICM20608 is not set
|
||||||
|
# CONFIG_PKG_USING_U8G2 is not set
|
||||||
|
# CONFIG_PKG_USING_BUTTON is not set
|
||||||
|
# CONFIG_PKG_USING_MPU6XXX is not set
|
||||||
|
# CONFIG_PKG_USING_PCF8574 is not set
|
||||||
|
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# miscellaneous packages
|
# miscellaneous packages
|
||||||
|
@ -356,17 +311,19 @@ CONFIG_RT_USING_RTT_CMSIS=y
|
||||||
# CONFIG_PKG_USING_CANFESTIVAL is not set
|
# CONFIG_PKG_USING_CANFESTIVAL is not set
|
||||||
# CONFIG_PKG_USING_ZLIB is not set
|
# CONFIG_PKG_USING_ZLIB is not set
|
||||||
# CONFIG_PKG_USING_DSTR is not set
|
# CONFIG_PKG_USING_DSTR is not set
|
||||||
|
# CONFIG_PKG_USING_TINYFRAME is not set
|
||||||
|
|
||||||
#
|
#
|
||||||
# sample package
|
# samples: kernel and components samples
|
||||||
#
|
|
||||||
# CONFIG_PKG_USING_SAMPLES is not set
|
|
||||||
|
|
||||||
#
|
|
||||||
# example package: hello
|
|
||||||
#
|
#
|
||||||
|
# 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
|
||||||
# CONFIG_PKG_USING_HELLO is not set
|
# CONFIG_PKG_USING_HELLO is not set
|
||||||
CONFIG_SOC_STM32F1=y
|
CONFIG_SOC_STM32F1=y
|
||||||
# CONFIG_RT_USING_UART1 is not set
|
# CONFIG_RT_USING_UART1 is not set
|
||||||
CONFIG_RT_USING_UART2=y
|
CONFIG_RT_USING_UART2=y
|
||||||
# CONFIG_RT_USING_UART3 is not set
|
# CONFIG_RT_USING_UART3 is not set
|
||||||
|
# CONFIG_BSP_USING_RTC is not set
|
||||||
|
CONFIG_BSP_USING_PIN=y
|
||||||
|
|
|
@ -1,91 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*
|
|
||||||
* Change Logs:
|
|
||||||
* Date Author Notes
|
|
||||||
* 2009-01-05 Bernard the first version
|
|
||||||
* 2018-08-17 whj remove finsh_set_device add components
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup STM32
|
|
||||||
*/
|
|
||||||
/*@{*/
|
|
||||||
|
|
||||||
#include <board.h>
|
|
||||||
#include <rtthread.h>
|
|
||||||
|
|
||||||
#ifdef RT_USING_DFS
|
|
||||||
#include <dfs_fs.h>
|
|
||||||
#include <dfs_elm.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
|
||||||
#include <stm32_eth.h>
|
|
||||||
#include <netif/ethernetif.h>
|
|
||||||
extern int lwip_system_init(void);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef RT_USING_FINSH
|
|
||||||
#include <shell.h>
|
|
||||||
#include <finsh.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
void rt_init_thread_entry(void* parameter)
|
|
||||||
{
|
|
||||||
#ifdef RT_USING_COMPONENTS_INIT
|
|
||||||
/* initialization RT-Thread Components */
|
|
||||||
rt_components_init();
|
|
||||||
#endif
|
|
||||||
|
|
||||||
{
|
|
||||||
extern void rt_platform_init(void);
|
|
||||||
rt_platform_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Filesystem Initialization */
|
|
||||||
#if defined(RT_USING_DFS) && defined(RT_USING_DFS_ELMFAT)
|
|
||||||
/* initialize the device file system */
|
|
||||||
dfs_init();
|
|
||||||
|
|
||||||
/* initialize the elm chan FatFS file system*/
|
|
||||||
elm_init();
|
|
||||||
|
|
||||||
/* mount sd card fat partition 1 as root directory */
|
|
||||||
if (dfs_mount("sd0", "/", "elm", 0, 0) == 0)
|
|
||||||
{
|
|
||||||
rt_kprintf("File System initialized!\n");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
rt_kprintf("File System initialzation failed!\n");
|
|
||||||
}
|
|
||||||
#endif /* RT_USING_DFS && RT_USING_DFS_ELMFAT */
|
|
||||||
|
|
||||||
#ifdef RT_USING_LWIP
|
|
||||||
/* initialize lwip stack */
|
|
||||||
/* register ethernetif device */
|
|
||||||
eth_system_device_init();
|
|
||||||
|
|
||||||
/* initialize lwip system */
|
|
||||||
lwip_system_init();
|
|
||||||
rt_kprintf("TCP/IP initialized!\n");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int rt_application_init(void)
|
|
||||||
{
|
|
||||||
rt_thread_t tid;
|
|
||||||
|
|
||||||
tid = rt_thread_create("init",
|
|
||||||
rt_init_thread_entry, RT_NULL,
|
|
||||||
2048, RT_THREAD_PRIORITY_MAX/3, 20);
|
|
||||||
if (tid != RT_NULL) rt_thread_startup(tid);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@}*/
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2018, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2009-01-05 Bernard the first version
|
||||||
|
* 2018-08-17 whj remove finsh_set_device add components
|
||||||
|
* 2018-12-17 whj Change the user interface to main
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @addtogroup STM32
|
||||||
|
*/
|
||||||
|
/*@{*/
|
||||||
|
|
||||||
|
#include <rtthread.h>
|
||||||
|
#include <rtdevice.h>
|
||||||
|
#include <board.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
/* user app entry */
|
||||||
|
return RT_EOK;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*@}*/
|
|
@ -1,107 +0,0 @@
|
||||||
/*
|
|
||||||
* Copyright (c) 2006-2018, RT-Thread Development Team
|
|
||||||
*
|
|
||||||
* SPDX-License-Identifier: Apache-2.0
|
|
||||||
*
|
|
||||||
* Change Logs:
|
|
||||||
* Date Author Notes
|
|
||||||
* 2006-08-31 Bernard first implementation
|
|
||||||
* 2011-06-05 Bernard modify for STM32F107 version
|
|
||||||
*/
|
|
||||||
|
|
||||||
#include <rthw.h>
|
|
||||||
#include <rtthread.h>
|
|
||||||
#include "board.h"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @addtogroup STM32
|
|
||||||
*/
|
|
||||||
|
|
||||||
/*@{*/
|
|
||||||
|
|
||||||
extern int rt_application_init(void);
|
|
||||||
|
|
||||||
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
|
||||||
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
|
||||||
#define STM32_SRAM_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
|
|
||||||
#elif __ICCARM__
|
|
||||||
#pragma section="HEAP"
|
|
||||||
#define STM32_SRAM_BEGIN (__segment_end("HEAP"))
|
|
||||||
#else
|
|
||||||
extern int __bss_end;
|
|
||||||
#define STM32_SRAM_BEGIN (&__bss_end)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*******************************************************************************
|
|
||||||
* Function Name : assert_failed
|
|
||||||
* Description : Reports the name of the source file and the source line number
|
|
||||||
* where the assert error has occurred.
|
|
||||||
* Input : - file: pointer to the source file name
|
|
||||||
* - line: assert error line source number
|
|
||||||
* Output : None
|
|
||||||
* Return : None
|
|
||||||
*******************************************************************************/
|
|
||||||
void assert_failed(u8* file, u32 line)
|
|
||||||
{
|
|
||||||
rt_kprintf("\n\r Wrong parameter value detected on\r\n");
|
|
||||||
rt_kprintf(" file %s\r\n", file);
|
|
||||||
rt_kprintf(" line %d\r\n", line);
|
|
||||||
|
|
||||||
while (1) ;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function will startup RT-Thread RTOS.
|
|
||||||
*/
|
|
||||||
void rtthread_startup(void)
|
|
||||||
{
|
|
||||||
/* init board */
|
|
||||||
rt_hw_board_init();
|
|
||||||
|
|
||||||
/* show version */
|
|
||||||
rt_show_version();
|
|
||||||
|
|
||||||
/* init tick */
|
|
||||||
rt_system_tick_init();
|
|
||||||
|
|
||||||
/* init kernel object */
|
|
||||||
rt_system_object_init();
|
|
||||||
|
|
||||||
/* init timer system */
|
|
||||||
rt_system_timer_init();
|
|
||||||
|
|
||||||
#ifdef RT_USING_HEAP
|
|
||||||
rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* init scheduler system */
|
|
||||||
rt_system_scheduler_init();
|
|
||||||
|
|
||||||
/* init application */
|
|
||||||
rt_application_init();
|
|
||||||
|
|
||||||
/* init timer thread */
|
|
||||||
rt_system_timer_thread_init();
|
|
||||||
|
|
||||||
/* init idle thread */
|
|
||||||
rt_thread_idle_init();
|
|
||||||
|
|
||||||
/* start scheduler */
|
|
||||||
rt_system_scheduler_start();
|
|
||||||
|
|
||||||
/* never reach here */
|
|
||||||
return ;
|
|
||||||
}
|
|
||||||
|
|
||||||
int main(void)
|
|
||||||
{
|
|
||||||
/* disable interrupt first */
|
|
||||||
rt_hw_interrupt_disable();
|
|
||||||
|
|
||||||
/* startup RT-Thread RTOS */
|
|
||||||
rtthread_startup();
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*@}*/
|
|
|
@ -6,7 +6,7 @@
|
||||||
* Change Logs:
|
* Change Logs:
|
||||||
* Date Author Notes
|
* Date Author Notes
|
||||||
* 2009-01-05 Bernard first implementation
|
* 2009-01-05 Bernard first implementation
|
||||||
* 2018-08-17 whj add to new rt_console_set_device
|
* 2018-08-17 whj add to new rt_console_set_device
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <rthw.h>
|
#include <rthw.h>
|
||||||
|
@ -44,13 +44,13 @@ void NVIC_Configuration(void)
|
||||||
*/
|
*/
|
||||||
void SysTick_Handler(void)
|
void SysTick_Handler(void)
|
||||||
{
|
{
|
||||||
/* enter interrupt */
|
/* enter interrupt */
|
||||||
rt_interrupt_enter();
|
rt_interrupt_enter();
|
||||||
|
|
||||||
rt_tick_increase();
|
rt_tick_increase();
|
||||||
|
|
||||||
/* leave interrupt */
|
/* leave interrupt */
|
||||||
rt_interrupt_leave();
|
rt_interrupt_leave();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -64,14 +64,18 @@ void rt_hw_board_init(void)
|
||||||
/* Configure the SysTick */
|
/* Configure the SysTick */
|
||||||
SysTick_Config( SystemCoreClock / RT_TICK_PER_SECOND );
|
SysTick_Config( SystemCoreClock / RT_TICK_PER_SECOND );
|
||||||
|
|
||||||
rt_components_board_init();
|
#ifdef RT_USING_HEAP
|
||||||
|
rt_system_heap_init((void*)STM32_SRAM_BEGIN, (void*)STM32_SRAM_END);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
rt_components_board_init();
|
||||||
|
|
||||||
rt_hw_usart_init();
|
rt_hw_usart_init();
|
||||||
|
|
||||||
#ifdef RT_USING_CONSOLE
|
#ifdef RT_USING_CONSOLE
|
||||||
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*@}*/
|
/*@}*/
|
||||||
|
|
|
@ -36,7 +36,17 @@
|
||||||
#define STM32_SRAM_SIZE 64
|
#define STM32_SRAM_SIZE 64
|
||||||
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
|
#define STM32_SRAM_END (0x20000000 + STM32_SRAM_SIZE * 1024)
|
||||||
|
|
||||||
#define RT_USING_UART1
|
#if defined(__CC_ARM) || defined(__CLANG_ARM)
|
||||||
|
extern int Image$$RW_IRAM1$$ZI$$Limit;
|
||||||
|
#define STM32_SRAM_BEGIN (&Image$$RW_IRAM1$$ZI$$Limit)
|
||||||
|
#elif __ICCARM__
|
||||||
|
#pragma section="HEAP"
|
||||||
|
#define STM32_SRAM_BEGIN (__segment_end("HEAP"))
|
||||||
|
#else
|
||||||
|
extern int __bss_end;
|
||||||
|
#define STM32_SRAM_BEGIN (&__bss_end)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define RT_USING_SPI1
|
#define RT_USING_SPI1
|
||||||
|
|
||||||
void rt_hw_board_init(void);
|
void rt_hw_board_init(void);
|
||||||
|
|
|
@ -51,7 +51,7 @@
|
||||||
/* Exported constants --------------------------------------------------------*/
|
/* Exported constants --------------------------------------------------------*/
|
||||||
/* Uncomment the line below to expanse the "assert_param" macro in the
|
/* Uncomment the line below to expanse the "assert_param" macro in the
|
||||||
Standard Peripheral Library drivers code */
|
Standard Peripheral Library drivers code */
|
||||||
#define USE_FULL_ASSERT 1
|
/*#define USE_FULL_ASSERT 1*/
|
||||||
|
|
||||||
/* Exported macro ------------------------------------------------------------*/
|
/* Exported macro ------------------------------------------------------------*/
|
||||||
#ifdef USE_FULL_ASSERT
|
#ifdef USE_FULL_ASSERT
|
||||||
|
|
|
@ -346,7 +346,7 @@
|
||||||
<MiscControls />
|
<MiscControls />
|
||||||
<Define>STM32F10X_CL, RT_USING_ARM_LIBC, USE_STDPERIPH_DRIVER</Define>
|
<Define>STM32F10X_CL, RT_USING_ARM_LIBC, USE_STDPERIPH_DRIVER</Define>
|
||||||
<Undefine />
|
<Undefine />
|
||||||
<IncludePath>applications;.;drivers;Libraries\STM32F10x_StdPeriph_Driver\inc;Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x;..\..\components\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m3;..\..\libcpu\arm\common;..\..\components\dfs\include;..\..\components\dfs\filesystems\devfs;..\..\components\dfs\filesystems\elmfat;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\net\lwip-2.0.2\src;..\..\components\net\lwip-2.0.2\src\include;..\..\components\net\lwip-2.0.2\src\include\ipv4;..\..\components\net\lwip-2.0.2\src\arch\include;..\..\components\net\lwip-2.0.2\src\include\netif;..\..\components\net\lwip-2.0.2\src\include\posix</IncludePath>
|
<IncludePath>applications;.;drivers;Libraries\STM32F10x_StdPeriph_Driver\inc;Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x;..\..\components\CMSIS\Include;..\..\include;..\..\libcpu\arm\cortex-m3;..\..\libcpu\arm\common;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\drivers\include;..\..\components\finsh;..\..\components\libc\compilers\armlibc;..\..\components\libc\compilers\common</IncludePath>
|
||||||
</VariousControls>
|
</VariousControls>
|
||||||
</Cads>
|
</Cads>
|
||||||
<Aads>
|
<Aads>
|
||||||
|
@ -387,16 +387,9 @@
|
||||||
<GroupName>Applications</GroupName>
|
<GroupName>Applications</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>application.c</FileName>
|
<FileName>main.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>applications\application.c</FilePath>
|
<FilePath>applications\main.c</FilePath>
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>startup.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>applications\startup.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
@ -430,13 +423,6 @@
|
||||||
<FilePath>drivers\platform.c</FilePath>
|
<FilePath>drivers\platform.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>stm32_eth.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>drivers\stm32_eth.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>gpio.c</FileName>
|
<FileName>gpio.c</FileName>
|
||||||
|
@ -639,6 +625,13 @@
|
||||||
<FilePath>..\..\src\components.c</FilePath>
|
<FilePath>..\..\src\components.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>cpu.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\src\cpu.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>device.c</FileName>
|
<FileName>device.c</FileName>
|
||||||
|
@ -769,65 +762,6 @@
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
<Group>
|
|
||||||
<GroupName>Filesystem</GroupName>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dfs.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\src\dfs.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dfs_file.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\src\dfs_file.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dfs_fs.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\src\dfs_fs.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dfs_posix.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\src\dfs_posix.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>devfs.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\filesystems\devfs\devfs.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dfs_elm.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\filesystems\elmfat\dfs_elm.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ff.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\filesystems\elmfat\ff.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ccsbcs.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\dfs\filesystems\elmfat\option\ccsbcs.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
</Group>
|
|
||||||
<Group>
|
<Group>
|
||||||
<GroupName>DeviceDrivers</GroupName>
|
<GroupName>DeviceDrivers</GroupName>
|
||||||
<Files>
|
<Files>
|
||||||
|
@ -865,6 +799,13 @@
|
||||||
<FilePath>..\..\components\drivers\src\pipe.c</FilePath>
|
<FilePath>..\..\components\drivers\src\pipe.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
|
<Files>
|
||||||
|
<File>
|
||||||
|
<FileName>ringblk_buf.c</FileName>
|
||||||
|
<FileType>1</FileType>
|
||||||
|
<FilePath>..\..\components\drivers\src\ringblk_buf.c</FilePath>
|
||||||
|
</File>
|
||||||
|
</Files>
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>ringbuffer.c</FileName>
|
<FileName>ringbuffer.c</FileName>
|
||||||
|
@ -1018,13 +959,6 @@
|
||||||
<FilePath>..\..\components\libc\compilers\armlibc\mem_std.c</FilePath>
|
<FilePath>..\..\components\libc\compilers\armlibc\mem_std.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>stdio.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\libc\compilers\armlibc\stdio.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>stubs.c</FileName>
|
<FileName>stubs.c</FileName>
|
||||||
|
@ -1039,259 +973,11 @@
|
||||||
<FilePath>..\..\components\libc\compilers\armlibc\time.c</FilePath>
|
<FilePath>..\..\components\libc\compilers\armlibc\time.c</FilePath>
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
|
||||||
<Group>
|
|
||||||
<GroupName>lwIP</GroupName>
|
|
||||||
<Files>
|
<Files>
|
||||||
<File>
|
<File>
|
||||||
<FileName>sys_arch.c</FileName>
|
<FileName>gmtime_r.c</FileName>
|
||||||
<FileType>1</FileType>
|
<FileType>1</FileType>
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\arch\sys_arch.c</FilePath>
|
<FilePath>..\..\components\libc\compilers\common\gmtime_r.c</FilePath>
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>api_lib.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\api_lib.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>api_msg.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\api_msg.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>err.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\err.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>netbuf.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\netbuf.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>netdb.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\netdb.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>netifapi.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\netifapi.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>sockets.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\sockets.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>tcpip.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\api\tcpip.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>def.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\def.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dns.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\dns.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>inet_chksum.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\inet_chksum.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>init.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\init.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ip.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ip.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>memp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\memp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>netif.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\netif.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>pbuf.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\pbuf.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>raw.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\raw.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>stats.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\stats.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>sys.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\sys.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>tcp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\tcp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>tcp_in.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\tcp_in.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>tcp_out.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\tcp_out.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>timeouts.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\timeouts.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>udp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\udp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ethernet.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\netif\ethernet.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ethernetif.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\netif\ethernetif.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>lowpan6.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\netif\lowpan6.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>autoip.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\autoip.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>dhcp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\dhcp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>etharp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\etharp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>icmp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\icmp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>igmp.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\igmp.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ip4.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ip4_addr.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_addr.c</FilePath>
|
|
||||||
</File>
|
|
||||||
</Files>
|
|
||||||
<Files>
|
|
||||||
<File>
|
|
||||||
<FileName>ip4_frag.c</FileName>
|
|
||||||
<FileType>1</FileType>
|
|
||||||
<FilePath>..\..\components\net\lwip-2.0.2\src\core\ipv4\ip4_frag.c</FilePath>
|
|
||||||
</File>
|
</File>
|
||||||
</Files>
|
</Files>
|
||||||
</Group>
|
</Group>
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define RT_TICK_PER_SECOND 1000
|
#define RT_TICK_PER_SECOND 1000
|
||||||
#define RT_USING_OVERFLOW_CHECK
|
#define RT_USING_OVERFLOW_CHECK
|
||||||
#define RT_USING_HOOK
|
#define RT_USING_HOOK
|
||||||
|
#define RT_USING_IDLE_HOOK
|
||||||
#define RT_IDEL_HOOK_LIST_SIZE 4
|
#define RT_IDEL_HOOK_LIST_SIZE 4
|
||||||
#define IDLE_THREAD_STACK_SIZE 256
|
#define IDLE_THREAD_STACK_SIZE 256
|
||||||
#define RT_DEBUG
|
#define RT_DEBUG
|
||||||
|
@ -38,6 +39,7 @@
|
||||||
#define RT_USING_CONSOLE
|
#define RT_USING_CONSOLE
|
||||||
#define RT_CONSOLEBUF_SIZE 128
|
#define RT_CONSOLEBUF_SIZE 128
|
||||||
#define RT_CONSOLE_DEVICE_NAME "uart2"
|
#define RT_CONSOLE_DEVICE_NAME "uart2"
|
||||||
|
#define RT_VER_NUM 0x40000
|
||||||
#define ARCH_ARM
|
#define ARCH_ARM
|
||||||
#define ARCH_ARM_CORTEX_M
|
#define ARCH_ARM_CORTEX_M
|
||||||
#define ARCH_ARM_CORTEX_M3
|
#define ARCH_ARM_CORTEX_M3
|
||||||
|
@ -45,6 +47,9 @@
|
||||||
/* RT-Thread Components */
|
/* RT-Thread Components */
|
||||||
|
|
||||||
#define RT_USING_COMPONENTS_INIT
|
#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 */
|
/* C++ features */
|
||||||
|
|
||||||
|
@ -66,32 +71,18 @@
|
||||||
|
|
||||||
/* Device virtual file system */
|
/* Device virtual file system */
|
||||||
|
|
||||||
#define RT_USING_DFS
|
|
||||||
#define DFS_USING_WORKDIR
|
|
||||||
#define DFS_FILESYSTEMS_MAX 2
|
|
||||||
#define DFS_FILESYSTEM_TYPES_MAX 2
|
|
||||||
#define DFS_FD_MAX 16
|
|
||||||
#define RT_USING_DFS_ELMFAT
|
|
||||||
|
|
||||||
/* elm-chan's FatFs, Generic FAT Filesystem Module */
|
|
||||||
|
|
||||||
#define RT_DFS_ELM_CODE_PAGE 437
|
|
||||||
#define RT_DFS_ELM_WORD_ACCESS
|
|
||||||
#define RT_DFS_ELM_USE_LFN_3
|
|
||||||
#define RT_DFS_ELM_USE_LFN 3
|
|
||||||
#define RT_DFS_ELM_MAX_LFN 255
|
|
||||||
#define RT_DFS_ELM_DRIVES 2
|
|
||||||
#define RT_DFS_ELM_MAX_SECTOR_SIZE 512
|
|
||||||
#define RT_DFS_ELM_REENTRANT
|
|
||||||
#define RT_USING_DFS_DEVFS
|
|
||||||
|
|
||||||
/* Device Drivers */
|
/* Device Drivers */
|
||||||
|
|
||||||
#define RT_USING_DEVICE_IPC
|
#define RT_USING_DEVICE_IPC
|
||||||
#define RT_PIPE_BUFSZ 512
|
#define RT_PIPE_BUFSZ 512
|
||||||
#define RT_USING_SERIAL
|
#define RT_USING_SERIAL
|
||||||
|
#define RT_SERIAL_USING_DMA
|
||||||
#define RT_USING_PIN
|
#define RT_USING_PIN
|
||||||
|
|
||||||
|
/* Using WiFi */
|
||||||
|
|
||||||
|
|
||||||
/* Using USB */
|
/* Using USB */
|
||||||
|
|
||||||
|
|
||||||
|
@ -106,42 +97,6 @@
|
||||||
|
|
||||||
/* light weight TCP/IP stack */
|
/* 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 4
|
|
||||||
#define RT_LWIP_TCP_SEG_NUM 40
|
|
||||||
#define RT_LWIP_TCP_SND_BUF 8196
|
|
||||||
#define RT_LWIP_TCP_WND 8196
|
|
||||||
#define RT_LWIP_TCPTHREAD_PRIORITY 10
|
|
||||||
#define RT_LWIP_TCPTHREAD_MBOX_SIZE 8
|
|
||||||
#define RT_LWIP_TCPTHREAD_STACKSIZE 1024
|
|
||||||
#define RT_LWIP_ETHTHREAD_PRIORITY 12
|
|
||||||
#define RT_LWIP_ETHTHREAD_STACKSIZE 1024
|
|
||||||
#define RT_LWIP_ETHTHREAD_MBOX_SIZE 8
|
|
||||||
#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 */
|
/* Modbus master and slave stack */
|
||||||
|
|
||||||
|
@ -196,12 +151,10 @@
|
||||||
/* miscellaneous packages */
|
/* miscellaneous packages */
|
||||||
|
|
||||||
|
|
||||||
/* sample package */
|
/* samples: kernel and components samples */
|
||||||
|
|
||||||
|
|
||||||
/* example package: hello */
|
|
||||||
|
|
||||||
#define SOC_STM32F1
|
#define SOC_STM32F1
|
||||||
#define RT_USING_UART2
|
#define RT_USING_UART2
|
||||||
|
#define BSP_USING_PIN
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue