From 843cc6fcd18b2a775e3e84830743fc4df552c3db Mon Sep 17 00:00:00 2001 From: xuzhuoyi Date: Wed, 27 Mar 2019 13:09:19 +0800 Subject: [PATCH] [bsp][tms320f28379d] Add SCI support --- bsp/tms320f28379d/.config | 43 +- bsp/tms320f28379d/.cproject | 6 +- bsp/tms320f28379d/.project | 15 + .../org.eclipse.core.resources.prefs | 4 + bsp/tms320f28379d/applications/startup.c | 2 + bsp/tms320f28379d/drivers/board.c | 8 +- bsp/tms320f28379d/drivers/board.h | 4 +- bsp/tms320f28379d/drivers/drv_sci.c | 224 ++++++++ bsp/tms320f28379d/drivers/drv_sci.h | 16 + .../libraries/common/include/stdint.h | 523 ++++++++++++++++++ bsp/tms320f28379d/rtconfig.h | 14 +- bsp/tms320f28379d/rtconfig_project.h | 23 + 12 files changed, 857 insertions(+), 25 deletions(-) create mode 100644 bsp/tms320f28379d/drivers/drv_sci.c create mode 100644 bsp/tms320f28379d/drivers/drv_sci.h create mode 100644 bsp/tms320f28379d/libraries/common/include/stdint.h create mode 100644 bsp/tms320f28379d/rtconfig_project.h diff --git a/bsp/tms320f28379d/.config b/bsp/tms320f28379d/.config index 4d68f71848..2ef26e73e3 100644 --- a/bsp/tms320f28379d/.config +++ b/bsp/tms320f28379d/.config @@ -8,17 +8,19 @@ CONFIG_SOC_TMS320F28X=y # RT-Thread Kernel # CONFIG_RT_NAME_MAX=8 +CONFIG_RT_USING_ARCH_DATA_TYPE=y +# CONFIG_RT_USING_SMP is not set CONFIG_RT_ALIGN_SIZE=4 CONFIG_RT_THREAD_PRIORITY_8=y # CONFIG_RT_THREAD_PRIORITY_32 is not set # CONFIG_RT_THREAD_PRIORITY_256 is not set CONFIG_RT_THREAD_PRIORITY_MAX=8 CONFIG_RT_TICK_PER_SECOND=100 -CONFIG_RT_USING_OVERFLOW_CHECK=y +# CONFIG_RT_USING_OVERFLOW_CHECK is not set CONFIG_RT_USING_HOOK=y CONFIG_RT_USING_IDLE_HOOK=y CONFIG_RT_IDEL_HOOK_LIST_SIZE=4 -CONFIG_IDLE_THREAD_STACK_SIZE=256 +CONFIG_IDLE_THREAD_STACK_SIZE=1024 # CONFIG_RT_USING_TIMER_SOFT is not set CONFIG_RT_DEBUG=y CONFIG_RT_DEBUG_COLOR=y @@ -62,7 +64,8 @@ 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="scia" +CONFIG_RT_VER_NUM=0x40001 CONFIG_ARCH_TIDSP=y CONFIG_ARCH_TIDSP_C28X=y CONFIG_ARCH_CPU_STACK_GROWS_UPWARD=y @@ -106,11 +109,13 @@ CONFIG_RT_USING_DEVICE_IPC=y CONFIG_RT_PIPE_BUFSZ=512 CONFIG_RT_USING_SERIAL=y CONFIG_RT_SERIAL_USING_DMA=y +CONFIG_RT_SERIAL_RB_BUFSZ=64 # 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_ADC is not set # CONFIG_RT_USING_PWM is not set # CONFIG_RT_USING_MTD_NOR is not set # CONFIG_RT_USING_MTD_NAND is not set @@ -121,6 +126,7 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_SPI is not set # CONFIG_RT_USING_WDT is not set # CONFIG_RT_USING_AUDIO is not set +# CONFIG_RT_USING_SENSOR is not set # # Using WiFi @@ -174,6 +180,7 @@ CONFIG_RT_USING_PIN=y # CONFIG_RT_USING_LOGTRACE is not set # CONFIG_RT_USING_RYM is not set # CONFIG_RT_USING_ULOG is not set +# CONFIG_RT_USING_UTEST is not set # # RT-Thread online packages @@ -184,10 +191,12 @@ CONFIG_RT_USING_PIN=y # # CONFIG_PKG_USING_PAHOMQTT 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_WEBTERMINAL is not set # CONFIG_PKG_USING_CJSON is not set # CONFIG_PKG_USING_JSMN is not set +# CONFIG_PKG_USING_LIBMODBUS is not set # CONFIG_PKG_USING_LJSON is not set # CONFIG_PKG_USING_EZXML is not set # CONFIG_PKG_USING_NANOPB is not set @@ -205,6 +214,7 @@ CONFIG_RT_USING_PIN=y # Wiced WiFi # # CONFIG_PKG_USING_WLAN_WICED is not set +# CONFIG_PKG_USING_RW007 is not set # CONFIG_PKG_USING_COAP is not set # CONFIG_PKG_USING_NOPOLL is not set # CONFIG_PKG_USING_NETUTILS is not set @@ -218,6 +228,9 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_GAGENT_CLOUD 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 +# CONFIG_PKG_USING_NIMBLE is not set +# CONFIG_PKG_USING_OTA_DOWNLOADER is not set # # security packages @@ -238,6 +251,7 @@ CONFIG_RT_USING_PIN=y # # CONFIG_PKG_USING_OPENMV is not set # CONFIG_PKG_USING_MUPDF is not set +# CONFIG_PKG_USING_STEMWIN is not set # # tools packages @@ -247,6 +261,9 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_EASYLOGGER 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 +# CONFIG_PKG_USING_ADBD is not set # # system packages @@ -262,10 +279,12 @@ CONFIG_RT_USING_PIN=y # 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 # +# CONFIG_PKG_USING_SENSORS_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 @@ -273,6 +292,12 @@ CONFIG_RT_USING_PIN=y # 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_SX12XX is not set +# CONFIG_PKG_USING_SIGNAL_LED is not set +# CONFIG_PKG_USING_KENDRYTE_SDK is not set # # miscellaneous packages @@ -286,10 +311,8 @@ CONFIG_RT_USING_PIN=y # CONFIG_PKG_USING_CANFESTIVAL is not set # CONFIG_PKG_USING_ZLIB is not set # CONFIG_PKG_USING_DSTR is not set - -# -# sample package -# +# CONFIG_PKG_USING_TINYFRAME is not set +# CONFIG_PKG_USING_KENDRYTE_DEMO is not set # # samples: kernel and components samples @@ -298,8 +321,6 @@ CONFIG_RT_USING_PIN=y # 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 -# # CONFIG_PKG_USING_HELLO is not set +# CONFIG_PKG_USING_VI is not set +# CONFIG_PKG_USING_NNOM is not set diff --git a/bsp/tms320f28379d/.cproject b/bsp/tms320f28379d/.cproject index d2f74c22d6..a4aacf5b46 100644 --- a/bsp/tms320f28379d/.cproject +++ b/bsp/tms320f28379d/.cproject @@ -38,6 +38,7 @@ @@ -60,7 +62,7 @@ -