From e1f59e2d96614f16951704d61658ae29d7de605a Mon Sep 17 00:00:00 2001 From: balanceTWK Date: Sat, 12 May 2018 18:58:16 +0800 Subject: [PATCH] =?UTF-8?q?[bsp][stm32f429apollo]=20=E7=A7=BB=E9=99=A4CONS?= =?UTF-8?q?OLE=5FDEVICE=E5=AE=8F=E5=AE=9A=E4=B9=89=E4=BB=A5=E5=8F=8A?= =?UTF-8?q?=E7=9B=B8=E5=85=B3=E7=9A=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/stm32f429-apollo/.config | 12 +++++++++--- bsp/stm32f429-apollo/drivers/board.c | 2 +- bsp/stm32f429-apollo/drivers/board.h | 16 ---------------- bsp/stm32f429-apollo/rtconfig.h | 2 +- 4 files changed, 11 insertions(+), 21 deletions(-) diff --git a/bsp/stm32f429-apollo/.config b/bsp/stm32f429-apollo/.config index 5322a08ffe..68f9b3ad9b 100644 --- a/bsp/stm32f429-apollo/.config +++ b/bsp/stm32f429-apollo/.config @@ -51,7 +51,7 @@ CONFIG_RT_USING_DEVICE=y # CONFIG_RT_USING_INTERRUPT_INFO is not set CONFIG_RT_USING_CONSOLE=y CONFIG_RT_CONSOLEBUF_SIZE=128 -CONFIG_RT_CONSOLE_DEVICE_NAME="uart" +CONFIG_RT_CONSOLE_DEVICE_NAME="uart1" # CONFIG_RT_USING_MODULE is not set CONFIG_ARCH_ARM=y CONFIG_ARCH_ARM_CORTEX_M=y @@ -77,6 +77,7 @@ CONFIG_FINSH_USING_HISTORY=y CONFIG_FINSH_HISTORY_LINES=5 CONFIG_FINSH_USING_SYMTAB=y CONFIG_FINSH_USING_DESCRIPTION=y +# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set CONFIG_FINSH_THREAD_PRIORITY=20 CONFIG_FINSH_THREAD_STACK_SIZE=2048 CONFIG_FINSH_CMD_SIZE=80 @@ -141,7 +142,7 @@ CONFIG_RT_USING_SPI=y CONFIG_RT_USING_SFUD=y CONFIG_RT_SFUD_USING_SFDP=y # CONFIG_RT_SFUD_USING_FLASH_INFO_TABLE is not set -# CONFIG_RT_SFUD_DEBUG is not set +# CONFIG_RT_DEBUG_SFUD is not set # CONFIG_RT_USING_W25QXX is not set # CONFIG_RT_USING_GD is not set # CONFIG_RT_USING_ENC28J60 is not set @@ -288,6 +289,7 @@ 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 # # security packages @@ -301,6 +303,7 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # # CONFIG_PKG_USING_JERRYSCRIPT is not set # CONFIG_PKG_USING_MICROPYTHON is not set +# CONFIG_PKG_USING_LUA2RTT is not set # # multimedia packages @@ -311,6 +314,7 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # tools packages # # CONFIG_PKG_USING_CMBACKTRACE is not set +# CONFIG_PKG_USING_EASYFLASH is not set # CONFIG_PKG_USING_EASYLOGGER is not set # CONFIG_PKG_USING_SYSTEMVIEW is not set # CONFIG_PKG_USING_IPERF is not set @@ -321,12 +325,14 @@ CONFIG_LWIP_NETIF_LOOPBACK=0 # CONFIG_PKG_USING_FASTLZ is not set # CONFIG_PKG_USING_MINILZO is not set # CONFIG_PKG_USING_QUICKLZ is not set +# CONFIG_PKG_USING_MULTIBUTTON is not set +# CONFIG_PKG_USING_SAMPLES is not set +# CONFIG_PKG_USING_CANFESTIVAL is not set # # example package: hello # # CONFIG_PKG_USING_HELLO is not set -# CONFIG_PKG_USING_MULTIBUTTON is not set CONFIG_RT_USING_EXT_SDRAM=y CONFIG_RT_USING_UART1=y CONFIG_RT_USING_UART2=y diff --git a/bsp/stm32f429-apollo/drivers/board.c b/bsp/stm32f429-apollo/drivers/board.c index 9c4ba3f7f5..9788ebc370 100644 --- a/bsp/stm32f429-apollo/drivers/board.c +++ b/bsp/stm32f429-apollo/drivers/board.c @@ -155,7 +155,7 @@ void rt_hw_board_init() SystemClock_Config(); stm32_hw_usart_init(); #ifdef RT_USING_CONSOLE - rt_console_set_device(CONSOLE_DEVICE); + rt_console_set_device(RT_CONSOLE_DEVICE_NAME); #endif #ifdef RT_USING_COMPONENTS_INIT diff --git a/bsp/stm32f429-apollo/drivers/board.h b/bsp/stm32f429-apollo/drivers/board.h index b6dd87b44f..ee15a29582 100644 --- a/bsp/stm32f429-apollo/drivers/board.h +++ b/bsp/stm32f429-apollo/drivers/board.h @@ -59,24 +59,8 @@ extern int __bss_end; #define HEAP_END STM32_SRAM_END -// Console on USART: <0=> no console <1=>USART 1 <2=>USART 2 <3=> USART 3 -// Default: 1 -#define STM32_CONSOLE_USART 1 - void rt_hw_board_init(void); -#if STM32_CONSOLE_USART == 0 -#define CONSOLE_DEVICE "no" -#elif STM32_CONSOLE_USART == 1 -#define CONSOLE_DEVICE "uart1" -#elif STM32_CONSOLE_USART == 2 -#define CONSOLE_DEVICE "uart2" -#elif STM32_CONSOLE_USART == 3 -#define CONSOLE_DEVICE "uart3" -#endif - -#define FINSH_DEVICE_NAME CONSOLE_DEVICE - #define STM32F4xx_PIN_NUMBERS 176 void Error_Handler(void); diff --git a/bsp/stm32f429-apollo/rtconfig.h b/bsp/stm32f429-apollo/rtconfig.h index 80b1a3f0e6..29f804d0dc 100644 --- a/bsp/stm32f429-apollo/rtconfig.h +++ b/bsp/stm32f429-apollo/rtconfig.h @@ -40,7 +40,7 @@ #define RT_USING_DEVICE #define RT_USING_CONSOLE #define RT_CONSOLEBUF_SIZE 128 -#define RT_CONSOLE_DEVICE_NAME "uart" +#define RT_CONSOLE_DEVICE_NAME "uart1" #define ARCH_ARM #define ARCH_ARM_CORTEX_M #define ARCH_ARM_CORTEX_M4