From 140bf7686d7dd5c4139b5b8d0e01d1b7464cbf38 Mon Sep 17 00:00:00 2001 From: zyh Date: Fri, 18 May 2018 20:32:47 +0800 Subject: [PATCH] [BSP][STM32L476-nucleo]fix build error with gcc --- bsp/stm32l476-nucleo/.config | 119 ++++++++++++++++++++++++++++---- bsp/stm32l476-nucleo/rtconfig.h | 7 +- 2 files changed, 108 insertions(+), 18 deletions(-) diff --git a/bsp/stm32l476-nucleo/.config b/bsp/stm32l476-nucleo/.config index 1994854762..7482c2f775 100644 --- a/bsp/stm32l476-nucleo/.config +++ b/bsp/stm32l476-nucleo/.config @@ -39,6 +39,7 @@ CONFIG_RT_USING_MEMPOOL=y # CONFIG_RT_USING_NOHEAP is not set CONFIG_RT_USING_SMALL_MEM=y # CONFIG_RT_USING_SLAB is not set +# CONFIG_RT_USING_MEMTRACE is not set CONFIG_RT_USING_HEAP=y # @@ -55,7 +56,8 @@ CONFIG_RT_CONSOLE_DEVICE_NAME="uart2" # 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 # # C++ features @@ -66,9 +68,12 @@ CONFIG_RT_USING_COMPONENTS_INIT=y # Command shell # CONFIG_RT_USING_FINSH=y +CONFIG_FINSH_THREAD_NAME="tshell" 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=4096 CONFIG_FINSH_CMD_SIZE=80 @@ -89,6 +94,7 @@ CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_USING_SERIAL=y # CONFIG_RT_USING_CAN is not set # CONFIG_RT_USING_HWTIMER is not set +# CONFIG_RT_USING_CPUTIME is not set # CONFIG_RT_USING_I2C is not set CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_MTD_NOR is not set @@ -97,13 +103,18 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_SDIO is not set # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set +# CONFIG_RT_USING_WIFI is not set + +# +# Using USB +# # CONFIG_RT_USING_USB_HOST is not set # CONFIG_RT_USING_USB_DEVICE is not set # # POSIX layer and C standard library # -# CONFIG_RT_USING_LIBC is not set +CONFIG_RT_USING_LIBC=y # CONFIG_RT_USING_PTHREADS is not set # @@ -120,25 +131,20 @@ CONFIG_RT_USING_PIN=y # # CONFIG_RT_USING_MODBUS is not set -# -# RT-Thread UI Engine -# -# CONFIG_PKG_USING_GUIENGINE is not set - # # VBUS(Virtual Software BUS) # # CONFIG_RT_USING_VBUS is not set # -# RT-Thread online packages +# Utilities # +# CONFIG_RT_USING_LOGTRACE is not set +# CONFIG_RT_USING_RYM is not set # -# system packages +# RT-Thread online packages # -# CONFIG_PKG_USING_PARTITION is not set -# CONFIG_PKG_USING_SQLITE is not set # # IoT - internet of things @@ -148,37 +154,122 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_MONGOOSE is not set # CONFIG_PKG_USING_WEBTERMINAL is not set # CONFIG_PKG_USING_CJSON is not set +# 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 +# # # Marvell WiFi # -# CONFIG_PKG_USING_MARVELLWIFI is not set +# CONFIG_PKG_USING_WLANMARVELL is not set + +# +# Wiced WiFi +# +# CONFIG_PKG_USING_WLAN_WICED is not set +# 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 # # CONFIG_PKG_USING_MBEDTLS is not set +# CONFIG_PKG_USING_libsodium is not set +# CONFIG_PKG_USING_TINYCRYPT is not set # # language packages # # CONFIG_PKG_USING_JERRYSCRIPT is not set +# CONFIG_PKG_USING_MICROPYTHON is not set # # multimedia packages # -# CONFIG_PKG_USING_FASTLZ is not set +# CONFIG_PKG_USING_OPENMV is not set +# CONFIG_PKG_USING_MUPDF is not set # # 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 + +# +# system packages +# + +# +# RT-Thread GUI Engine +# +# CONFIG_PKG_USING_GUIENGINE is not set +# CONFIG_PKG_USING_LWEXT4 is not set +# CONFIG_PKG_USING_PARTITION is not set +# CONFIG_PKG_USING_SQLITE is not set +# CONFIG_PKG_USING_RTI is not set +# CONFIG_PKG_USING_LITTLEVGL2RTT is not set + +# +# peripheral libraries and drivers +# +# CONFIG_PKG_USING_STM32F4_HAL is not set +# CONFIG_PKG_USING_STM32F4_DRIVERS is not set # # miscellaneous packages # +# 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_CANFESTIVAL is not set + +# +# sample package +# +# CONFIG_PKG_USING_SAMPLES is not set + +# +# example package: hello +# # CONFIG_PKG_USING_HELLO is not set -CONFIG_RT_USING_UART2=y + +# +# Privated Packages of RealThread +# +# CONFIG_PKG_USING_CODEC is not set +# CONFIG_PKG_USING_PLAYER is not set +# CONFIG_PKG_USING_PERSIMMON_SRC is not set + +# +# Network Utilities +# +# CONFIG_PKG_USING_WLAN_WICED_SRC is not set +# CONFIG_PKG_USING_CLOUDSDK is not set +# CONFIG_PKG_USING_COREMARK is not set +# CONFIG_PKG_USING_POWER_MANAGER is not set +# CONFIG_PKG_USING_RT_OTA is not set +# CONFIG_PKG_USING_RT_AT is not set +# CONFIG_PKG_USING_RDB is not set + +# +# Test Packages of RealThread +# +# CONFIG_PKG_USING_JERRYSCRIPT_WIN32 is not set +# CONFIG_PKG_USING_JS_PERSIMMON is not set +# CONFIG_BSP_USING_UART1 is not set +CONFIG_BSP_USING_UART2=y +# CONFIG_BSP_USING_UART3 is not set +# CONFIG_BSP_USING_UART4 is not set +# CONFIG_BSP_USING_UART5 is not set +# CONFIG_BSP_USING_LPUART1 is not set diff --git a/bsp/stm32l476-nucleo/rtconfig.h b/bsp/stm32l476-nucleo/rtconfig.h index 17b40a1066..56c7a4e632 100644 --- a/bsp/stm32l476-nucleo/rtconfig.h +++ b/bsp/stm32l476-nucleo/rtconfig.h @@ -12,7 +12,7 @@ #define RT_THREAD_PRIORITY_32 /* RT_THREAD_PRIORITY_256 is not set */ #define RT_THREAD_PRIORITY_MAX 32 -#define RT_TICK_PER_SECOND 1000 +#define RT_TICK_PER_SECOND 100 #define RT_DEBUG #define RT_USING_OVERFLOW_CHECK #define RT_DEBUG_INIT 0 @@ -32,12 +32,12 @@ /* Memory Management */ -/* RT_USING_MEMPOOL is not set */ +#define RT_USING_MEMPOOL /* RT_USING_MEMHEAP is not set */ /* RT_USING_NOHEAP is not set */ #define RT_USING_SMALL_MEM /* RT_USING_SLAB is not set */ -#define RT_USING_MEMTRACE +/* RT_USING_MEMTRACE is not set */ #define RT_USING_HEAP /* Kernel Device Object */ @@ -106,7 +106,6 @@ #define RT_USING_LIBC /* RT_USING_PTHREADS is not set */ -#define HAVE_SYS_SIGNALS /* Network stack */