Merge pull request #1258 from RT-Thread/feature_kconfig

[BSP] Add Kconfig for lpc408x/stm32f10x/stm32f20x/stm32f40x etc
This commit is contained in:
Bernard Xiong authored and GitHub committed 2018-03-05 22:16:27 +08:00
commit 8f2588d609
33 files changed
+3348 -898

No files matched your search

+273
View File
File diff suppressed because it is too large. Load diff
+26
View File
@@ -0,0 +1,26 @@
mainmenu "RT-Thread Project Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config SOC_LPC4088
bool
select ARCH_ARM_CORTEX_M4
default y
source "$BSP_DIR/drivers/Kconfig"
+21
View File
@@ -0,0 +1,21 @@
config RT_USING_UART0
bool "Enable UART0"
default y
config RT_USING_UART2
bool "Enable UART2"
default n
config RT_USING_UART4
bool "Enable UART4"
default n
config BSP_DRV_CLCD
bool "CLCD driver"
depends on PKG_USING_GUIENGINE
default y
config BSP_DRV_EMAC
bool "EMAC driver"
depends on RT_USING_LWIP
default y
+212 -202
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+26
View File
@@ -0,0 +1,26 @@
mainmenu "RT-Thread Project Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config SOC_STM32F1
bool
select ARCH_ARM_CORTEX_M3
default y
source "$BSP_DIR/drivers/Kconfig"
+15
View File
@@ -0,0 +1,15 @@
config RT_USING_UART1
bool "Enable UART1 (PA9/10)"
default y
config RT_USING_UART2
bool "Enable UART2 (PA2/3)"
default y
config RT_USING_UART3
bool "Enable UART3 (PB10/11)"
default y
config RT_USING_UART4
bool "Enable UART4 (PC10/11)"
default n
+1 -2
View File
@@ -32,7 +32,7 @@ if GetDepend('RT_USING_RTC'):
src += ['rtc.c']
# add Ethernet drivers.
if GetDepend('RT_USING_RTGUI'):
if GetDepend('PKG_USING_GUIENGINE'):
src += ['touch.c']
if rtconfig.RT_USING_LCD_TYPE == 'ILI932X':
src += ['ili_lcd_general.c']
@@ -43,7 +43,6 @@ if GetDepend('RT_USING_RTGUI'):
if GetDepend('RT_USING_WDT'):
src += ['stm32f1_wdg.c']
CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
+1 -1
View File
@@ -35,7 +35,7 @@
/* Private typedef -----------------------------------------------------------*/
/* Private define ------------------------------------------------------------*/
#define NULL 0
// #define NULL 0
#define SDIO_STATIC_FLAGS ((uint32_t)0x000005FF)
#define SDIO_CMD0TIMEOUT ((uint32_t)0x00002710)
#define SDIO_FIFO_Address ((uint32_t)0x40018080)
+195 -150
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+7
View File
@@ -0,0 +1,7 @@
config RT_USING_UART1
bool "Enable UART1 (PA9/10)"
default y
config RT_USING_UART6
bool "Enable UART6 (PC6/7)"
default n
+1 -6
View File
@@ -1,8 +1,6 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'Drivers')
cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]
@@ -16,9 +14,6 @@ if GetDepend('RT_USING_DFS') == False:
#SrcRemove(src, 'FM25Lx.c')
#SrcRemove(src, '24LCxx.c')
#MDK platform retarget. Not yet tested
SrcRemove(src, 'stdio_Retarget.c')
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
+26
View File
@@ -0,0 +1,26 @@
mainmenu "RT-Thread Project Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config SOC_STM32F2
bool
select ARCH_ARM_CORTEX_M3
default y
source "$BSP_DIR/Drivers/Kconfig"
+39 -40
View File
@@ -41,74 +41,73 @@
#include "stm32f2x7_eth.h"
#endif
void rt_init_thread_entry(void* parameter)
void rt_init_thread_entry(void *parameter)
{
/* Filesystem Initialization */
/* Filesystem Initialization */
#ifdef RT_USING_DFS
{
/* init sdcard driver */
{
/* init sdcard driver */
#if STM32_USE_SDIO
rt_hw_sdcard_init();
rt_hw_sdcard_init();
#else
rt_hw_msd_init();
rt_hw_msd_init();
#endif
/* init the device filesystem */
dfs_init();
/* init the device filesystem */
dfs_init();
#ifdef RT_USING_DFS_ELMFAT
/* init the elm chan FatFs filesystam*/
elm_init();
/* init the elm chan FatFs filesystam*/
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");
/* 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
}
}
#endif
/* LwIP Initialization */
/* LwIP Initialization */
#ifdef RT_USING_LWIP
{
extern void lwip_sys_init(void);
{
extern void lwip_sys_init(void);
/* register ethernetif device */
eth_system_device_init();
/* register ethernetif device */
eth_system_device_init();
/* initialize eth interface */
rt_hw_stm32_eth_init();
/* initialize eth interface */
rt_hw_stm32_eth_init();
/* init lwip system */
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n");
}
/* init lwip system */
lwip_sys_init();
rt_kprintf("TCP/IP initialized!\n");
}
#endif
rt_hw_rtc_init();
rt_hw_rtc_init();
#ifdef RT_USING_FINSH
/* init finsh */
finsh_system_init();
/* init finsh */
finsh_system_init();
#endif
}
int rt_application_init()
{
rt_thread_t tid;
rt_thread_t tid;
tid = rt_thread_create("init",
rt_init_thread_entry, RT_NULL,
2048, RT_THREAD_PRIORITY_MAX/3, 20);
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);
if (tid != RT_NULL)
rt_thread_startup(tid);
return 0;
return 0;
}
/*@}*/
+200 -100
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+26
View File
@@ -0,0 +1,26 @@
mainmenu "RT-Thread Project Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
config SOC_STM32F4
bool
select ARCH_ARM_CORTEX_M4
default y
source "$BSP_DIR/drivers/Kconfig"
+19
View File
@@ -0,0 +1,19 @@
config RT_USING_UART1
bool "Enable UART1 (PB6/7)"
default y
config RT_USING_UART2
bool "Enable UART2 (PA2/3)"
default y
config RT_USING_UART3
bool "Enable UART3 (PD8/9)"
default y
config RT_USING_UART4
bool "Enable UART4 (PC10/11)"
default n
config RT_USING_UART5
bool "Enable UART5 (PC12/PD2)"
default n
+1 -4
View File
@@ -1,8 +1,6 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'drivers')
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
@@ -24,4 +22,3 @@ CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
+258 -134
View File
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+26
View File
@@ -0,0 +1,26 @@
mainmenu "RT-Thread Configuration"
config $BSP_DIR
string
option env="BSP_ROOT"
default "."
config $RTT_DIR
string
option env="RTT_ROOT"
default "../.."
config $PKGS_DIR
string
option env="PKGS_ROOT"
default "packages"
config SOC_STM32F4
bool
select ARCH_ARM_CORTEX_M4
default y
source "$RTT_DIR/Kconfig"
source "$PKGS_DIR/Kconfig"
source "$BSP_DIR/drivers/Kconfig"
+43
View File
@@ -0,0 +1,43 @@
config RT_USING_EXT_SDRAM
bool "Enable SDRAM on the board"
default y
config RT_USING_UART1
bool "Enable UART1"
default y
config RT_USING_UART2
bool "Enable UART2"
default y
config RT_USING_UART3
bool "Enable UART3"
default y
config RT_USING_SPI1
bool "Enable SPI1"
default y
config RT_USING_SPI2
bool "Enable SPI2"
default y
config RT_USING_SPI3
bool "Enable SPI3"
default y
config RT_USING_SPI4
bool "Enable SPI4"
default y
config RT_USING_SPI5
bool "Enable SPI5"
default y
config RT_USING_SPI6
bool "Enable SPI6"
default y
config RT_RTC_NAME
string "The name of RTC device"
default rtc
+13 -18
View File
@@ -1,25 +1,20 @@
Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'drivers')
# add the general drivers.
src = Split("""
board.c
usart.c
drv_sdram.c
drv_eth.c
drv_lcd.c
drv_i2c.c
drv_ft5x06.c
drv_spi.c
drv_spi_flash.c
drv_sdio_sd.c
""")
cwd = GetCurrentDir()
src = Glob('*.c')
CPPPATH = [cwd]
if not GetDepend('RT_USING_LWIP'):
SrcRemove(src, 'drv_eth.c')
if not GetDepend('RT_USING_DFS'):
SrcRemove(src, 'drv_sdio_sd.c')
SrcRemove(src, 'drv_spi_flash.c')
if not GetDepend('PKG_USING_GUIENGINE'):
SrcRemove(src, 'drv_lcd.c')
SrcRemove(src, 'drv_ft5x06.c')
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
Return('group')
+1 -1
View File
@@ -452,7 +452,7 @@ static rt_size_t rt_stm32_eth_write (rt_device_t dev, rt_off_t pos, const void*
return 0;
}
static rt_err_t rt_stm32_eth_control(rt_device_t dev, rt_uint8_t cmd, void *args)
static rt_err_t rt_stm32_eth_control(rt_device_t dev, int cmd, void *args)
{
STM32_ETH_PRINTF("rt_stm32_eth_control...\n");
switch(cmd)
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1 -9
View File
@@ -2,7 +2,7 @@ Import('RTT_ROOT')
Import('rtconfig')
from building import *
cwd = os.path.join(str(Dir('#')), 'drivers')
cwd = GetCurrentDir()
# add the general drivers.
src = Split("""
@@ -12,14 +12,6 @@ usart.c
drv_sdram.c
""")
# add Ethernet drivers.
if GetDepend('RT_USING_LWIP'):
src += ['stm32f4xx_eth.c']
# add gpio drivers.
if GetDepend('RT_USING_PIN'):
src += ['gpio.c']
CPPPATH = [cwd]
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = CPPPATH)
+63 -8
View File
@@ -8,12 +8,15 @@
#define RT_NAME_MAX 8
#define RT_ALIGN_SIZE 4
/* RT_THREAD_PRIORITY_8 is not set */
#define RT_THREAD_PRIORITY_32
/* RT_THREAD_PRIORITY_256 is not set */
#define RT_THREAD_PRIORITY_MAX 32
#define RT_TICK_PER_SECOND 100
#define RT_DEBUG
#define RT_USING_OVERFLOW_CHECK
#define RT_DEBUG_INIT 1
/* RT_DEBUG_THREAD is not set */
#define RT_DEBUG_THREAD 0
#define RT_USING_HOOK
#define IDLE_THREAD_STACK_SIZE 1024
/* RT_USING_TIMER_SOFT is not set */
@@ -31,13 +34,17 @@
#define RT_USING_MEMPOOL
#define RT_USING_MEMHEAP
#define RT_USING_HEAP
/* RT_USING_NOHEAP is not set */
#define RT_USING_SMALL_MEM
/* RT_USING_SLAB is not set */
/* RT_USING_MEMHEAP_AS_HEAP is not set */
/* RT_USING_MEMTRACE is not set */
#define RT_USING_HEAP
/* Kernel Device Object */
#define RT_USING_DEVICE
/* RT_USING_INTERRUPT_INFO is not set */
#define RT_USING_CONSOLE
#define RT_CONSOLEBUF_SIZE 128
#define RT_CONSOLE_DEVICE_NAME "uart1"
@@ -55,7 +62,9 @@
/* Command shell */
#define RT_USING_FINSH
#define FINSH_THREAD_NAME "tshell"
#define FINSH_USING_HISTORY
#define FINSH_HISTORY_LINES 5
#define FINSH_USING_SYMTAB
#define FINSH_USING_DESCRIPTION
#define FINSH_THREAD_PRIORITY 20
@@ -69,6 +78,10 @@
/* Device virtual file system */
/* RT_USING_DFS is not set */
/* RT_DFS_ELM_USE_LFN_0 is not set */
/* RT_DFS_ELM_USE_LFN_1 is not set */
/* RT_DFS_ELM_USE_LFN_2 is not set */
/* RT_DFS_ELM_USE_LFN_3 is not set */
/* Device Drivers */
@@ -76,21 +89,27 @@
#define RT_USING_SERIAL
/* RT_USING_CAN is not set */
/* RT_USING_HWTIMER is not set */
/* RT_USING_CPUTIME is not set */
/* RT_USING_I2C is not set */
/* RT_USING_PIN is not set */
#define RT_USING_PIN
/* RT_USING_MTD_NOR is not set */
/* RT_USING_MTD_NAND is not set */
/* RT_USING_RTC is not set */
/* RT_USING_SDIO is not set */
/* RT_USING_SPI is not set */
/* RT_USING_WDT is not set */
/* RT_USING_WIFI is not set */
/* Using USB */
/* RT_USING_USB_HOST is not set */
/* RT_USING_USB_DEVICE is not set */
/* POSIX layer and C standard library */
/* RT_USING_LIBC is not set */
/* RT_USING_PTHREADS is not set */
#define RT_USING_LIBC
#define RT_USING_PTHREADS
/* HAVE_SYS_SIGNALS is not set */
/* Network stack */
@@ -102,16 +121,26 @@
/* RT_USING_MODBUS is not set */
/* RT-Thread UI Engine */
/* VBUS(Virtual Software BUS) */
/* PKG_USING_GUIENGINE is not set */
/* RT_USING_VBUS is not set */
/* Utilities */
/* RT_USING_LOGTRACE is not set */
/* RT_USING_RYM is not set */
/* RT-Thread online packages */
/* system packages */
/* RT-Thread GUI Engine */
/* PKG_USING_GUIENGINE is not set */
/* PKG_USING_LWEXT4 is not set */
/* PKG_USING_PARTITION is not set */
/* PKG_USING_SQLITE is not set */
/* PKG_USING_RTI is not set */
/* IoT - internet of things */
@@ -120,30 +149,56 @@
/* PKG_USING_MONGOOSE is not set */
/* PKG_USING_WEBTERMINAL is not set */
/* PKG_USING_CJSON is not set */
/* PKG_USING_LJSON is not set */
/* PKG_USING_EZXML is not set */
/* PKG_USING_NANOPB is not set */
/* PKG_USING_GAGENT_CLOUD is not set */
/* Wi-Fi */
/* Marvell WiFi */
/* PKG_USING_MARVELLWIFI is not set */
/* PKG_USING_WLANMARVELL is not set */
/* Wiced WiFi */
/* PKG_USING_WLAN_WICED is not set */
/* PKG_USING_COAP is not set */
/* PKG_USING_NOPOLL is not set */
/* PKG_USING_NETUTILS is not set */
/* security packages */
/* PKG_USING_MBEDTLS is not set */
/* PKG_USING_libsodium is not set */
/* PKG_USING_TINYCRYPT is not set */
/* language packages */
/* PKG_USING_JERRYSCRIPT is not set */
/* PKG_USING_MICROPYTHON is not set */
/* multimedia packages */
/* PKG_USING_OPENMV is not set */
/* tools packages */
/* PKG_USING_CMBACKTRACE is not set */
/* PKG_USING_EASYLOGGER is not set */
/* PKG_USING_SYSTEMVIEW is not set */
/* PKG_USING_IPERF is not set */
/* miscellaneous packages */
/* PKG_USING_FASTLZ is not set */
/* PKG_USING_MINILZO is not set */
/* PKG_USING_QUICKLZ is not set */
/* example package: hello */
/* PKG_USING_HELLO is not set */
/* PKG_USING_MULTIBUTTON is not set */
#define RT_USING_EXT_SDRAM
#define RT_USING_UART1
/* RT_USING_UART2 is not set */
+6
View File
@@ -14,6 +14,12 @@ config RT_USING_CAN
bool "Using CAN device drivers"
default n
if RT_USING_CAN
config RT_CAN_USING_HDR
bool "Enable CAN hardware filter"
default y
endif
config RT_USING_HWTIMER
bool "Using hardware timer device drivers"
default n