[bsp]添加ch32v307vct6 (#6331)
|
@ -0,0 +1,668 @@
|
||||||
|
#
|
||||||
|
# Automatically generated file; DO NOT EDIT.
|
||||||
|
# RT-Thread Configuration
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# RT-Thread Kernel
|
||||||
|
#
|
||||||
|
CONFIG_RT_NAME_MAX=8
|
||||||
|
# CONFIG_RT_USING_ARCH_DATA_TYPE is not set
|
||||||
|
# CONFIG_RT_USING_SMP is not set
|
||||||
|
CONFIG_RT_ALIGN_SIZE=4
|
||||||
|
# CONFIG_RT_THREAD_PRIORITY_8 is not set
|
||||||
|
CONFIG_RT_THREAD_PRIORITY_32=y
|
||||||
|
# CONFIG_RT_THREAD_PRIORITY_256 is not set
|
||||||
|
CONFIG_RT_THREAD_PRIORITY_MAX=32
|
||||||
|
CONFIG_RT_TICK_PER_SECOND=1000
|
||||||
|
# CONFIG_RT_USING_OVERFLOW_CHECK is not set
|
||||||
|
CONFIG_RT_USING_HOOK=y
|
||||||
|
CONFIG_RT_HOOK_USING_FUNC_PTR=y
|
||||||
|
CONFIG_RT_USING_IDLE_HOOK=y
|
||||||
|
CONFIG_RT_IDLE_HOOK_LIST_SIZE=4
|
||||||
|
CONFIG_IDLE_THREAD_STACK_SIZE=256
|
||||||
|
CONFIG_RT_USING_TIMER_SOFT=y
|
||||||
|
CONFIG_RT_TIMER_THREAD_PRIO=4
|
||||||
|
CONFIG_RT_TIMER_THREAD_STACK_SIZE=512
|
||||||
|
|
||||||
|
#
|
||||||
|
# kservice optimization
|
||||||
|
#
|
||||||
|
# CONFIG_RT_KSERVICE_USING_STDLIB is not set
|
||||||
|
# CONFIG_RT_KSERVICE_USING_TINY_SIZE is not set
|
||||||
|
# CONFIG_RT_USING_TINY_FFS is not set
|
||||||
|
# CONFIG_RT_KPRINTF_USING_LONGLONG is not set
|
||||||
|
# CONFIG_RT_DEBUG is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Inter-Thread communication
|
||||||
|
#
|
||||||
|
CONFIG_RT_USING_SEMAPHORE=y
|
||||||
|
CONFIG_RT_USING_MUTEX=y
|
||||||
|
CONFIG_RT_USING_EVENT=y
|
||||||
|
CONFIG_RT_USING_MAILBOX=y
|
||||||
|
CONFIG_RT_USING_MESSAGEQUEUE=y
|
||||||
|
# CONFIG_RT_USING_SIGNALS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Memory Management
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_MEMPOOL is not set
|
||||||
|
CONFIG_RT_USING_SMALL_MEM=y
|
||||||
|
# CONFIG_RT_USING_SLAB is not set
|
||||||
|
# CONFIG_RT_USING_MEMHEAP is not set
|
||||||
|
CONFIG_RT_USING_SMALL_MEM_AS_HEAP=y
|
||||||
|
# CONFIG_RT_USING_MEMHEAP_AS_HEAP is not set
|
||||||
|
# CONFIG_RT_USING_SLAB_AS_HEAP is not set
|
||||||
|
# CONFIG_RT_USING_USERHEAP is not set
|
||||||
|
# CONFIG_RT_USING_NOHEAP is not set
|
||||||
|
# CONFIG_RT_USING_MEMTRACE is not set
|
||||||
|
# CONFIG_RT_USING_HEAP_ISR is not set
|
||||||
|
CONFIG_RT_USING_HEAP=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Kernel Device Object
|
||||||
|
#
|
||||||
|
CONFIG_RT_USING_DEVICE=y
|
||||||
|
# CONFIG_RT_USING_DEVICE_OPS is not set
|
||||||
|
# CONFIG_RT_USING_INTERRUPT_INFO is not set
|
||||||
|
CONFIG_RT_USING_CONSOLE=y
|
||||||
|
CONFIG_RT_CONSOLEBUF_SIZE=128
|
||||||
|
CONFIG_RT_CONSOLE_DEVICE_NAME="uart1"
|
||||||
|
CONFIG_RT_VER_NUM=0x40101
|
||||||
|
# CONFIG_RT_USING_CPU_FFS is not set
|
||||||
|
CONFIG_ARCH_RISCV=y
|
||||||
|
# CONFIG_ARCH_CPU_STACK_GROWS_UPWARD is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RT-Thread Components
|
||||||
|
#
|
||||||
|
CONFIG_RT_USING_COMPONENTS_INIT=y
|
||||||
|
CONFIG_RT_USING_USER_MAIN=y
|
||||||
|
CONFIG_RT_MAIN_THREAD_STACK_SIZE=2048
|
||||||
|
CONFIG_RT_MAIN_THREAD_PRIORITY=10
|
||||||
|
# CONFIG_RT_USING_LEGACY is not set
|
||||||
|
CONFIG_RT_USING_MSH=y
|
||||||
|
CONFIG_RT_USING_FINSH=y
|
||||||
|
CONFIG_FINSH_USING_MSH=y
|
||||||
|
CONFIG_FINSH_THREAD_NAME="tshell"
|
||||||
|
CONFIG_FINSH_THREAD_PRIORITY=20
|
||||||
|
CONFIG_FINSH_THREAD_STACK_SIZE=1024
|
||||||
|
CONFIG_FINSH_USING_HISTORY=y
|
||||||
|
CONFIG_FINSH_HISTORY_LINES=5
|
||||||
|
CONFIG_FINSH_USING_SYMTAB=y
|
||||||
|
CONFIG_FINSH_CMD_SIZE=80
|
||||||
|
CONFIG_MSH_USING_BUILT_IN_COMMANDS=y
|
||||||
|
CONFIG_FINSH_USING_DESCRIPTION=y
|
||||||
|
# CONFIG_FINSH_ECHO_DISABLE_DEFAULT is not set
|
||||||
|
# CONFIG_FINSH_USING_AUTH is not set
|
||||||
|
CONFIG_FINSH_ARG_MAX=10
|
||||||
|
# CONFIG_RT_USING_DFS is not set
|
||||||
|
# CONFIG_RT_USING_FAL is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Device Drivers
|
||||||
|
#
|
||||||
|
CONFIG_RT_USING_DEVICE_IPC=y
|
||||||
|
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
|
||||||
|
CONFIG_RT_USING_SERIAL=y
|
||||||
|
CONFIG_RT_USING_SERIAL_V1=y
|
||||||
|
# CONFIG_RT_USING_SERIAL_V2 is not set
|
||||||
|
# CONFIG_RT_SERIAL_USING_DMA is not set
|
||||||
|
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_PHY is not set
|
||||||
|
CONFIG_RT_USING_PIN=y
|
||||||
|
# CONFIG_RT_USING_ADC is not set
|
||||||
|
# CONFIG_RT_USING_DAC 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
|
||||||
|
# CONFIG_RT_USING_PM is not set
|
||||||
|
# CONFIG_RT_USING_RTC is not set
|
||||||
|
# CONFIG_RT_USING_SDIO is not set
|
||||||
|
# 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
|
||||||
|
# CONFIG_RT_USING_TOUCH is not set
|
||||||
|
# CONFIG_RT_USING_HWCRYPTO is not set
|
||||||
|
# CONFIG_RT_USING_PULSE_ENCODER is not set
|
||||||
|
# CONFIG_RT_USING_INPUT_CAPTURE is not set
|
||||||
|
# CONFIG_RT_USING_WIFI is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Using USB
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_USB is not set
|
||||||
|
# CONFIG_RT_USING_USB_HOST is not set
|
||||||
|
# CONFIG_RT_USING_USB_DEVICE is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# C/C++ and POSIX layer
|
||||||
|
#
|
||||||
|
CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
|
||||||
|
|
||||||
|
#
|
||||||
|
# POSIX (Portable Operating System Interface) layer
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_POSIX_FS is not set
|
||||||
|
# CONFIG_RT_USING_POSIX_DELAY is not set
|
||||||
|
# CONFIG_RT_USING_POSIX_CLOCK is not set
|
||||||
|
# CONFIG_RT_USING_POSIX_TIMER is not set
|
||||||
|
# CONFIG_RT_USING_PTHREADS is not set
|
||||||
|
# CONFIG_RT_USING_MODULE is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Interprocess Communication (IPC)
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_POSIX_PIPE is not set
|
||||||
|
# CONFIG_RT_USING_POSIX_MESSAGE_QUEUE is not set
|
||||||
|
# CONFIG_RT_USING_POSIX_MESSAGE_SEMAPHORE is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Socket is in the 'Network' category
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_CPLUSPLUS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Network
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_SAL is not set
|
||||||
|
# CONFIG_RT_USING_NETDEV is not set
|
||||||
|
# CONFIG_RT_USING_LWIP is not set
|
||||||
|
# CONFIG_RT_USING_AT is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Utilities
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_RYM is not set
|
||||||
|
# CONFIG_RT_USING_ULOG is not set
|
||||||
|
# CONFIG_RT_USING_UTEST is not set
|
||||||
|
# CONFIG_RT_USING_VAR_EXPORT is not set
|
||||||
|
# CONFIG_RT_USING_RT_LINK is not set
|
||||||
|
# CONFIG_RT_USING_VBUS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RT-Thread Utestcases
|
||||||
|
#
|
||||||
|
# CONFIG_RT_USING_UTESTCASES is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# RT-Thread online packages
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# IoT - internet of things
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_LWIP is not set
|
||||||
|
# CONFIG_PKG_USING_LORAWAN_DRIVER is not set
|
||||||
|
# CONFIG_PKG_USING_PAHOMQTT is not set
|
||||||
|
# CONFIG_PKG_USING_UMQTT 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_MYMQTT is not set
|
||||||
|
# CONFIG_PKG_USING_KAWAII_MQTT is not set
|
||||||
|
# CONFIG_PKG_USING_BC28_MQTT is not set
|
||||||
|
# CONFIG_PKG_USING_WEBTERMINAL is not set
|
||||||
|
# CONFIG_PKG_USING_LIBMODBUS is not set
|
||||||
|
# CONFIG_PKG_USING_FREEMODBUS is not set
|
||||||
|
# CONFIG_PKG_USING_NANOPB is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Wi-Fi
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Marvell WiFi
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_WLANMARVELL is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
# CONFIG_PKG_USING_CMUX is not set
|
||||||
|
# CONFIG_PKG_USING_PPP_DEVICE is not set
|
||||||
|
# CONFIG_PKG_USING_AT_DEVICE is not set
|
||||||
|
# CONFIG_PKG_USING_ATSRV_SOCKET is not set
|
||||||
|
# CONFIG_PKG_USING_WIZNET is not set
|
||||||
|
# CONFIG_PKG_USING_ZB_COORDINATOR is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# IoT Cloud
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_ONENET is not set
|
||||||
|
# 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_IOT_EXPLORER is not set
|
||||||
|
# CONFIG_PKG_USING_JIOT-C-SDK is not set
|
||||||
|
# CONFIG_PKG_USING_UCLOUD_IOT_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_JOYLINK is not set
|
||||||
|
# CONFIG_PKG_USING_EZ_IOT_OS is not set
|
||||||
|
# CONFIG_PKG_USING_IOTSHARP_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_NIMBLE is not set
|
||||||
|
# CONFIG_PKG_USING_LLSYNC_SDK_ADAPTER is not set
|
||||||
|
# CONFIG_PKG_USING_OTA_DOWNLOADER is not set
|
||||||
|
# CONFIG_PKG_USING_IPMSG is not set
|
||||||
|
# CONFIG_PKG_USING_LSSDP is not set
|
||||||
|
# CONFIG_PKG_USING_AIRKISS_OPEN is not set
|
||||||
|
# CONFIG_PKG_USING_LIBRWS is not set
|
||||||
|
# CONFIG_PKG_USING_TCPSERVER is not set
|
||||||
|
# CONFIG_PKG_USING_PROTOBUF_C is not set
|
||||||
|
# CONFIG_PKG_USING_DLT645 is not set
|
||||||
|
# CONFIG_PKG_USING_QXWZ is not set
|
||||||
|
# CONFIG_PKG_USING_SMTP_CLIENT is not set
|
||||||
|
# CONFIG_PKG_USING_ABUP_FOTA is not set
|
||||||
|
# CONFIG_PKG_USING_LIBCURL2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_CAPNP is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_TELNET is not set
|
||||||
|
# CONFIG_PKG_USING_NMEALIB is not set
|
||||||
|
# CONFIG_PKG_USING_PDULIB is not set
|
||||||
|
# CONFIG_PKG_USING_BTSTACK is not set
|
||||||
|
# CONFIG_PKG_USING_LORAWAN_ED_STACK is not set
|
||||||
|
# CONFIG_PKG_USING_WAYZ_IOTKIT is not set
|
||||||
|
# CONFIG_PKG_USING_MAVLINK is not set
|
||||||
|
# CONFIG_PKG_USING_BSAL is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_MODBUS is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_FTP is not set
|
||||||
|
# CONFIG_PKG_USING_EMBEDDEDPROTO is not set
|
||||||
|
# CONFIG_PKG_USING_RT_LINK_HW is not set
|
||||||
|
# CONFIG_PKG_USING_LORA_PKT_FWD is not set
|
||||||
|
# CONFIG_PKG_USING_LORA_GW_DRIVER_LIB is not set
|
||||||
|
# CONFIG_PKG_USING_LORA_PKT_SNIFFER is not set
|
||||||
|
# CONFIG_PKG_USING_HM is not set
|
||||||
|
# CONFIG_PKG_USING_SMALL_MODBUS is not set
|
||||||
|
# CONFIG_PKG_USING_NET_SERVER is not set
|
||||||
|
# CONFIG_PKG_USING_ZFTP is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# security packages
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_MBEDTLS is not set
|
||||||
|
# CONFIG_PKG_USING_LIBSODIUM is not set
|
||||||
|
# CONFIG_PKG_USING_LIBHYDROGEN is not set
|
||||||
|
# CONFIG_PKG_USING_TINYCRYPT is not set
|
||||||
|
# CONFIG_PKG_USING_TFM is not set
|
||||||
|
# CONFIG_PKG_USING_YD_CRYPTO is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# language packages
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# JSON: JavaScript Object Notation, a lightweight data-interchange format
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_CJSON is not set
|
||||||
|
# CONFIG_PKG_USING_LJSON is not set
|
||||||
|
# CONFIG_PKG_USING_RT_CJSON_TOOLS is not set
|
||||||
|
# CONFIG_PKG_USING_RAPIDJSON is not set
|
||||||
|
# CONFIG_PKG_USING_JSMN is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_JSMN is not set
|
||||||
|
# CONFIG_PKG_USING_PARSON is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# XML: Extensible Markup Language
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_SIMPLE_XML is not set
|
||||||
|
# CONFIG_PKG_USING_EZXML is not set
|
||||||
|
# CONFIG_PKG_USING_LUATOS_SOC is not set
|
||||||
|
# CONFIG_PKG_USING_LUA is not set
|
||||||
|
# CONFIG_PKG_USING_JERRYSCRIPT is not set
|
||||||
|
# CONFIG_PKG_USING_MICROPYTHON is not set
|
||||||
|
# CONFIG_PKG_USING_PIKASCRIPT is not set
|
||||||
|
# CONFIG_PKG_USING_RTT_RUST is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# multimedia packages
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# LVGL: powerful and easy-to-use embedded GUI library
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_LVGL is not set
|
||||||
|
# CONFIG_PKG_USING_LITTLEVGL2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_LV_MUSIC_DEMO is not set
|
||||||
|
# CONFIG_PKG_USING_GUI_GUIDER_DEMO is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# u8g2: a monochrome graphic library
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_U8G2_OFFICIAL is not set
|
||||||
|
# CONFIG_PKG_USING_U8G2 is not set
|
||||||
|
# CONFIG_PKG_USING_OPENMV is not set
|
||||||
|
# CONFIG_PKG_USING_MUPDF is not set
|
||||||
|
# CONFIG_PKG_USING_STEMWIN is not set
|
||||||
|
# CONFIG_PKG_USING_WAVPLAYER is not set
|
||||||
|
# CONFIG_PKG_USING_TJPGD is not set
|
||||||
|
# CONFIG_PKG_USING_PDFGEN is not set
|
||||||
|
# CONFIG_PKG_USING_HELIX is not set
|
||||||
|
# CONFIG_PKG_USING_AZUREGUIX is not set
|
||||||
|
# CONFIG_PKG_USING_TOUCHGFX2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_NUEMWIN is not set
|
||||||
|
# CONFIG_PKG_USING_MP3PLAYER is not set
|
||||||
|
# CONFIG_PKG_USING_TINYJPEG is not set
|
||||||
|
# CONFIG_PKG_USING_UGUI is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# PainterEngine: A cross-platform graphics application framework written in C language
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_PAINTERENGINE is not set
|
||||||
|
# CONFIG_PKG_USING_PAINTERENGINE_AUX is not set
|
||||||
|
# CONFIG_PKG_USING_MCURSES is not set
|
||||||
|
# CONFIG_PKG_USING_TERMBOX is not set
|
||||||
|
# CONFIG_PKG_USING_VT100 is not set
|
||||||
|
# CONFIG_PKG_USING_QRCODE is not set
|
||||||
|
# CONFIG_PKG_USING_GUIENGINE 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_SEGGER_RTT is not set
|
||||||
|
# CONFIG_PKG_USING_RDB is not set
|
||||||
|
# CONFIG_PKG_USING_ULOG_EASYFLASH is not set
|
||||||
|
# CONFIG_PKG_USING_ULOG_FILE is not set
|
||||||
|
# CONFIG_PKG_USING_LOGMGR is not set
|
||||||
|
# CONFIG_PKG_USING_ADBD is not set
|
||||||
|
# CONFIG_PKG_USING_COREMARK is not set
|
||||||
|
# CONFIG_PKG_USING_DHRYSTONE is not set
|
||||||
|
# CONFIG_PKG_USING_MEMORYPERF is not set
|
||||||
|
# CONFIG_PKG_USING_NR_MICRO_SHELL is not set
|
||||||
|
# CONFIG_PKG_USING_CHINESE_FONT_LIBRARY is not set
|
||||||
|
# CONFIG_PKG_USING_LUNAR_CALENDAR is not set
|
||||||
|
# CONFIG_PKG_USING_BS8116A is not set
|
||||||
|
# CONFIG_PKG_USING_GPS_RMC is not set
|
||||||
|
# CONFIG_PKG_USING_URLENCODE is not set
|
||||||
|
# CONFIG_PKG_USING_UMCN is not set
|
||||||
|
# CONFIG_PKG_USING_LWRB2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_CPU_USAGE is not set
|
||||||
|
# CONFIG_PKG_USING_GBK2UTF8 is not set
|
||||||
|
# CONFIG_PKG_USING_VCONSOLE is not set
|
||||||
|
# CONFIG_PKG_USING_KDB is not set
|
||||||
|
# CONFIG_PKG_USING_WAMR is not set
|
||||||
|
# CONFIG_PKG_USING_MICRO_XRCE_DDS_CLIENT is not set
|
||||||
|
# CONFIG_PKG_USING_LWLOG is not set
|
||||||
|
# CONFIG_PKG_USING_ANV_TRACE is not set
|
||||||
|
# CONFIG_PKG_USING_ANV_MEMLEAK is not set
|
||||||
|
# CONFIG_PKG_USING_ANV_TESTSUIT is not set
|
||||||
|
# CONFIG_PKG_USING_ANV_BENCH is not set
|
||||||
|
# CONFIG_PKG_USING_DEVMEM is not set
|
||||||
|
# CONFIG_PKG_USING_REGEX is not set
|
||||||
|
# CONFIG_PKG_USING_MEM_SANDBOX is not set
|
||||||
|
# CONFIG_PKG_USING_SOLAR_TERMS is not set
|
||||||
|
# CONFIG_PKG_USING_GAN_ZHI is not set
|
||||||
|
# CONFIG_PKG_USING_FDT is not set
|
||||||
|
# CONFIG_PKG_USING_CBOX is not set
|
||||||
|
# CONFIG_PKG_USING_SNOWFLAKE is not set
|
||||||
|
# CONFIG_PKG_USING_HASH_MATCH is not set
|
||||||
|
# CONFIG_PKG_USING_FIRE_PID_CURVE is not set
|
||||||
|
# CONFIG_PKG_USING_ARMV7M_DWT_TOOL is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# system packages
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# enhanced kernel services
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_RT_MEMCPY_CM is not set
|
||||||
|
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
|
||||||
|
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# acceleration: Assembly language or algorithmic acceleration packages
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_QFPLIB_M0_FULL is not set
|
||||||
|
# CONFIG_PKG_USING_QFPLIB_M0_TINY is not set
|
||||||
|
# CONFIG_PKG_USING_QFPLIB_M3 is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# CMSIS: ARM Cortex-M Microcontroller Software Interface Standard
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_CMSIS_5 is not set
|
||||||
|
# CONFIG_PKG_USING_CMSIS_RTOS1 is not set
|
||||||
|
# CONFIG_PKG_USING_CMSIS_RTOS2 is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# Micrium: Micrium software products porting for RT-Thread
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_UCOSIII_WRAPPER is not set
|
||||||
|
# CONFIG_PKG_USING_UCOSII_WRAPPER is not set
|
||||||
|
# CONFIG_PKG_USING_UC_CRC is not set
|
||||||
|
# CONFIG_PKG_USING_UC_CLK is not set
|
||||||
|
# CONFIG_PKG_USING_UC_COMMON is not set
|
||||||
|
# CONFIG_PKG_USING_UC_MODBUS is not set
|
||||||
|
# CONFIG_PKG_USING_RTDUINO is not set
|
||||||
|
# CONFIG_PKG_USING_FREERTOS_WRAPPER is not set
|
||||||
|
# CONFIG_PKG_USING_CAIRO is not set
|
||||||
|
# CONFIG_PKG_USING_PIXMAN is not set
|
||||||
|
# CONFIG_PKG_USING_PARTITION is not set
|
||||||
|
# CONFIG_PKG_USING_PERF_COUNTER is not set
|
||||||
|
# CONFIG_PKG_USING_FLASHDB is not set
|
||||||
|
# CONFIG_PKG_USING_SQLITE is not set
|
||||||
|
# CONFIG_PKG_USING_RTI is not set
|
||||||
|
# CONFIG_PKG_USING_DFS_YAFFS is not set
|
||||||
|
# CONFIG_PKG_USING_LITTLEFS is not set
|
||||||
|
# CONFIG_PKG_USING_DFS_JFFS2 is not set
|
||||||
|
# CONFIG_PKG_USING_DFS_UFFS is not set
|
||||||
|
# CONFIG_PKG_USING_LWEXT4 is not set
|
||||||
|
# CONFIG_PKG_USING_THREAD_POOL is not set
|
||||||
|
# CONFIG_PKG_USING_ROBOTS is not set
|
||||||
|
# CONFIG_PKG_USING_EV is not set
|
||||||
|
# CONFIG_PKG_USING_SYSWATCH is not set
|
||||||
|
# CONFIG_PKG_USING_SYS_LOAD_MONITOR is not set
|
||||||
|
# CONFIG_PKG_USING_PLCCORE is not set
|
||||||
|
# CONFIG_PKG_USING_RAMDISK is not set
|
||||||
|
# CONFIG_PKG_USING_MININI is not set
|
||||||
|
# CONFIG_PKG_USING_QBOOT is not set
|
||||||
|
# CONFIG_PKG_USING_PPOOL is not set
|
||||||
|
# CONFIG_PKG_USING_OPENAMP is not set
|
||||||
|
# CONFIG_PKG_USING_LPM is not set
|
||||||
|
# CONFIG_PKG_USING_TLSF is not set
|
||||||
|
# CONFIG_PKG_USING_EVENT_RECORDER is not set
|
||||||
|
# CONFIG_PKG_USING_ARM_2D is not set
|
||||||
|
# CONFIG_PKG_USING_MCUBOOT is not set
|
||||||
|
# CONFIG_PKG_USING_TINYUSB is not set
|
||||||
|
# CONFIG_PKG_USING_CHERRYUSB is not set
|
||||||
|
# CONFIG_PKG_USING_KMULTI_RTIMER is not set
|
||||||
|
# CONFIG_PKG_USING_TFDB is not set
|
||||||
|
# CONFIG_PKG_USING_QPC 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_SHT3X is not set
|
||||||
|
# CONFIG_PKG_USING_ADT74XX is not set
|
||||||
|
# CONFIG_PKG_USING_AS7341 is not set
|
||||||
|
# CONFIG_PKG_USING_STM32_SDIO is not set
|
||||||
|
# CONFIG_PKG_USING_RTT_ESP_IDF is not set
|
||||||
|
# CONFIG_PKG_USING_ICM20608 is not set
|
||||||
|
# CONFIG_PKG_USING_BUTTON 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_LEDBLINK is not set
|
||||||
|
# CONFIG_PKG_USING_LITTLED is not set
|
||||||
|
# CONFIG_PKG_USING_LKDGUI is not set
|
||||||
|
# CONFIG_PKG_USING_NRF5X_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_NRFX is not set
|
||||||
|
# CONFIG_PKG_USING_WM_LIBRARIES is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# kendryte-sdk: Kendryte SDK
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_K210_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_KENDRYTE_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_INFRARED is not set
|
||||||
|
# CONFIG_PKG_USING_MULTI_INFRARED is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_BUTTON is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_LED is not set
|
||||||
|
# CONFIG_PKG_USING_AT24CXX is not set
|
||||||
|
# CONFIG_PKG_USING_MOTIONDRIVER2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_AD7746 is not set
|
||||||
|
# CONFIG_PKG_USING_PCA9685 is not set
|
||||||
|
# CONFIG_PKG_USING_I2C_TOOLS is not set
|
||||||
|
# CONFIG_PKG_USING_NRF24L01 is not set
|
||||||
|
# CONFIG_PKG_USING_TOUCH_DRIVERS is not set
|
||||||
|
# CONFIG_PKG_USING_MAX17048 is not set
|
||||||
|
# CONFIG_PKG_USING_RPLIDAR is not set
|
||||||
|
# CONFIG_PKG_USING_AS608 is not set
|
||||||
|
# CONFIG_PKG_USING_RC522 is not set
|
||||||
|
# CONFIG_PKG_USING_WS2812B is not set
|
||||||
|
# CONFIG_PKG_USING_EMBARC_BSP is not set
|
||||||
|
# CONFIG_PKG_USING_EXTERN_RTC_DRIVERS is not set
|
||||||
|
# CONFIG_PKG_USING_MULTI_RTIMER is not set
|
||||||
|
# CONFIG_PKG_USING_MAX7219 is not set
|
||||||
|
# CONFIG_PKG_USING_BEEP is not set
|
||||||
|
# CONFIG_PKG_USING_EASYBLINK is not set
|
||||||
|
# CONFIG_PKG_USING_PMS_SERIES is not set
|
||||||
|
# CONFIG_PKG_USING_NUCLEI_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_CAN_YMODEM is not set
|
||||||
|
# CONFIG_PKG_USING_LORA_RADIO_DRIVER is not set
|
||||||
|
# CONFIG_PKG_USING_QLED is not set
|
||||||
|
# CONFIG_PKG_USING_PAJ7620 is not set
|
||||||
|
# CONFIG_PKG_USING_AGILE_CONSOLE is not set
|
||||||
|
# CONFIG_PKG_USING_LD3320 is not set
|
||||||
|
# CONFIG_PKG_USING_WK2124 is not set
|
||||||
|
# CONFIG_PKG_USING_LY68L6400 is not set
|
||||||
|
# CONFIG_PKG_USING_DM9051 is not set
|
||||||
|
# CONFIG_PKG_USING_SSD1306 is not set
|
||||||
|
# CONFIG_PKG_USING_QKEY is not set
|
||||||
|
# CONFIG_PKG_USING_RS485 is not set
|
||||||
|
# CONFIG_PKG_USING_RS232 is not set
|
||||||
|
# CONFIG_PKG_USING_NES is not set
|
||||||
|
# CONFIG_PKG_USING_VIRTUAL_SENSOR is not set
|
||||||
|
# CONFIG_PKG_USING_VDEVICE is not set
|
||||||
|
# CONFIG_PKG_USING_SGM706 is not set
|
||||||
|
# CONFIG_PKG_USING_STM32WB55_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_RDA58XX is not set
|
||||||
|
# CONFIG_PKG_USING_LIBNFC is not set
|
||||||
|
# CONFIG_PKG_USING_MFOC is not set
|
||||||
|
# CONFIG_PKG_USING_TMC51XX is not set
|
||||||
|
# CONFIG_PKG_USING_TCA9534 is not set
|
||||||
|
# CONFIG_PKG_USING_KOBUKI is not set
|
||||||
|
# CONFIG_PKG_USING_ROSSERIAL is not set
|
||||||
|
# CONFIG_PKG_USING_MICRO_ROS is not set
|
||||||
|
# CONFIG_PKG_USING_MCP23008 is not set
|
||||||
|
# CONFIG_PKG_USING_BLUETRUM_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_MISAKA_AT24CXX is not set
|
||||||
|
# CONFIG_PKG_USING_MISAKA_RGB_BLING is not set
|
||||||
|
# CONFIG_PKG_USING_LORA_MODEM_DRIVER is not set
|
||||||
|
# CONFIG_PKG_USING_BL_MCU_SDK is not set
|
||||||
|
# CONFIG_PKG_USING_SOFT_SERIAL is not set
|
||||||
|
# CONFIG_PKG_USING_MB85RS16 is not set
|
||||||
|
# CONFIG_PKG_USING_CW2015 is not set
|
||||||
|
# CONFIG_PKG_USING_RFM300 is not set
|
||||||
|
# CONFIG_PKG_USING_IO_INPUT_FILTER is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# AI packages
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_LIBANN is not set
|
||||||
|
# CONFIG_PKG_USING_NNOM is not set
|
||||||
|
# CONFIG_PKG_USING_ONNX_BACKEND is not set
|
||||||
|
# CONFIG_PKG_USING_ONNX_PARSER is not set
|
||||||
|
# CONFIG_PKG_USING_TENSORFLOWLITEMICRO is not set
|
||||||
|
# CONFIG_PKG_USING_ELAPACK is not set
|
||||||
|
# CONFIG_PKG_USING_ULAPACK is not set
|
||||||
|
# CONFIG_PKG_USING_QUEST is not set
|
||||||
|
# CONFIG_PKG_USING_NAXOS is not set
|
||||||
|
|
||||||
|
#
|
||||||
|
# miscellaneous packages
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# project laboratory
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# samples: kernel and components samples
|
||||||
|
#
|
||||||
|
# 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
|
||||||
|
|
||||||
|
#
|
||||||
|
# entertainment: terminal games and other interesting software packages
|
||||||
|
#
|
||||||
|
# CONFIG_PKG_USING_CMATRIX is not set
|
||||||
|
# CONFIG_PKG_USING_SL is not set
|
||||||
|
# CONFIG_PKG_USING_CAL is not set
|
||||||
|
# CONFIG_PKG_USING_ACLOCK is not set
|
||||||
|
# CONFIG_PKG_USING_THREES is not set
|
||||||
|
# CONFIG_PKG_USING_2048 is not set
|
||||||
|
# CONFIG_PKG_USING_SNAKE is not set
|
||||||
|
# CONFIG_PKG_USING_TETRIS is not set
|
||||||
|
# CONFIG_PKG_USING_DONUT is not set
|
||||||
|
# CONFIG_PKG_USING_COWSAY is not set
|
||||||
|
# CONFIG_PKG_USING_LIBCSV is not set
|
||||||
|
# CONFIG_PKG_USING_OPTPARSE is not set
|
||||||
|
# CONFIG_PKG_USING_FASTLZ is not set
|
||||||
|
# CONFIG_PKG_USING_MINILZO is not set
|
||||||
|
# CONFIG_PKG_USING_QUICKLZ is not set
|
||||||
|
# CONFIG_PKG_USING_LZMA is not set
|
||||||
|
# CONFIG_PKG_USING_MULTIBUTTON is not set
|
||||||
|
# CONFIG_PKG_USING_FLEXIBLE_BUTTON is not set
|
||||||
|
# CONFIG_PKG_USING_CANFESTIVAL is not set
|
||||||
|
# CONFIG_PKG_USING_ZLIB is not set
|
||||||
|
# CONFIG_PKG_USING_MINIZIP is not set
|
||||||
|
# CONFIG_PKG_USING_HEATSHRINK is not set
|
||||||
|
# CONFIG_PKG_USING_DSTR is not set
|
||||||
|
# CONFIG_PKG_USING_TINYFRAME is not set
|
||||||
|
# CONFIG_PKG_USING_KENDRYTE_DEMO is not set
|
||||||
|
# CONFIG_PKG_USING_DIGITALCTRL is not set
|
||||||
|
# CONFIG_PKG_USING_UPACKER is not set
|
||||||
|
# CONFIG_PKG_USING_UPARAM is not set
|
||||||
|
# CONFIG_PKG_USING_HELLO is not set
|
||||||
|
# CONFIG_PKG_USING_VI is not set
|
||||||
|
# CONFIG_PKG_USING_KI is not set
|
||||||
|
# CONFIG_PKG_USING_ARMv7M_DWT is not set
|
||||||
|
# CONFIG_PKG_USING_UKAL is not set
|
||||||
|
# CONFIG_PKG_USING_CRCLIB is not set
|
||||||
|
# CONFIG_PKG_USING_LWGPS is not set
|
||||||
|
# CONFIG_PKG_USING_STATE_MACHINE is not set
|
||||||
|
# CONFIG_PKG_USING_DESIGN_PATTERN is not set
|
||||||
|
# CONFIG_PKG_USING_CONTROLLER is not set
|
||||||
|
# CONFIG_PKG_USING_PHASE_LOCKED_LOOP is not set
|
||||||
|
# CONFIG_PKG_USING_MFBD is not set
|
||||||
|
# CONFIG_PKG_USING_SLCAN2RTT is not set
|
||||||
|
# CONFIG_PKG_USING_SOEM is not set
|
||||||
|
CONFIG_SOC_RISCV_FAMILY_CH32=y
|
||||||
|
CONFIG_SOC_RISCV_SERIES_CH32V307=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Hardware Drivers Config
|
||||||
|
#
|
||||||
|
CONFIG_SOC_CH32V307VC=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# On-chip Peripheral Drivers
|
||||||
|
#
|
||||||
|
CONFIG_BSP_USING_UART=y
|
||||||
|
CONFIG_BSP_USING_UART1=y
|
||||||
|
|
||||||
|
#
|
||||||
|
# Onboard Peripheral Drivers
|
||||||
|
#
|
||||||
|
|
||||||
|
#
|
||||||
|
# Board extended module Drivers
|
||||||
|
#
|
|
@ -0,0 +1,21 @@
|
||||||
|
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"
|
||||||
|
|
||||||
|
source "$RTT_DIR/Kconfig"
|
||||||
|
source "$PKGS_DIR/Kconfig"
|
||||||
|
source "../Libraries/Kconfig"
|
||||||
|
source "board/Kconfig"
|
|
@ -0,0 +1,89 @@
|
||||||
|
# ch32v307v-r1 BSP 说明
|
||||||
|
## 开发板简介
|
||||||
|
|
||||||
|
CH32V307V-R1 是 WCH 推出的一款基于 RISC-V 内核的开发板,最高主频为 144Mhz。比较适合入门学习 RISC-V 架构。
|
||||||
|
|
||||||
|
## 开发板图片
|
||||||
|
|
||||||
|
![board](./figures/ch32v307.jpg)
|
||||||
|
|
||||||
|
## 基本特性:
|
||||||
|
|
||||||
|
- MCU:CH32V307VCT6,主频 144MHz,FLASH和RAM可配置
|
||||||
|
- LED:2个,用户 LEDs, LED1(blue),LED2(red)。
|
||||||
|
- 按键:3个,Reset, User 和 Download。
|
||||||
|
- USB:2个,Tpye-C。
|
||||||
|
- 网口:1个,内置 10M PHY。
|
||||||
|
- 板载 WCH-Link 下载调试工具。
|
||||||
|
|
||||||
|
更多信息和资源请访问[互联型RISC-V单片机 CH32V307](https://www.wch.cn/products/CH32V307.html)
|
||||||
|
|
||||||
|
## 编译说明
|
||||||
|
|
||||||
|
板级包支持 RISC-V GCC 开发环境,以下是具体版本信息:
|
||||||
|
|
||||||
|
| IDE/编译器 | 已测试版本 |
|
||||||
|
| ---------- | -------------------- |
|
||||||
|
| GCC | WCH RISC-V GCC 8.2.0 |
|
||||||
|
|
||||||
|
## 使用说明
|
||||||
|
|
||||||
|
>本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
|
||||||
|
|
||||||
|
### 快速上手
|
||||||
|
|
||||||
|
本 BSP 为开发者提供 Scons编译配置。下面介绍如何将系统运行起来。
|
||||||
|
|
||||||
|
#### 1、指定RISC-V GCC编译器
|
||||||
|
|
||||||
|
推荐使用RT_Studio软件里面的编译器。
|
||||||
|
|
||||||
|
##### 方法一:直接指定编译器路径。
|
||||||
|
|
||||||
|
![method1](./figures/method1.png)
|
||||||
|
|
||||||
|
##### 方法二:通过env设置编译器路径
|
||||||
|
|
||||||
|
![method2](./figures/method2.png)
|
||||||
|
|
||||||
|
```shell
|
||||||
|
set RTT_EXEC_PATH=D:\RT-ThreadStudio\repo\Extract\ToolChain_Support_Packages\WCH\RISC-V-GCC-WCH\8.2.0\bin
|
||||||
|
```
|
||||||
|
|
||||||
|
> 注意:如果使用第二种方法,第一种方法设置的路劲将会失效。
|
||||||
|
|
||||||
|
#### 2、生成dist文件夹
|
||||||
|
|
||||||
|
```shell
|
||||||
|
scons --dist
|
||||||
|
```
|
||||||
|
|
||||||
|
![dist](./figures/dist.png)
|
||||||
|
|
||||||
|
#### 3、进入dist文件夹scons编译
|
||||||
|
|
||||||
|
```shell
|
||||||
|
scons
|
||||||
|
```
|
||||||
|
|
||||||
|
![scons](./figures/scons.png)
|
||||||
|
|
||||||
|
最终会生成 **rtthread.bin** 文件。
|
||||||
|
|
||||||
|
#### 4、硬件连接
|
||||||
|
|
||||||
|
使用数据线连接板载 wch-link 到 PC,打开电源开关。
|
||||||
|
|
||||||
|
#### 5、下载
|
||||||
|
|
||||||
|
打开WCH RISC-V MCU ProgrammerTool下载软件,选择刚刚生成的 **rtthread.bin** 文件,进行下载。
|
||||||
|
|
||||||
|
![tool](./figures/tool.png)
|
||||||
|
|
||||||
|
> 注意:这里Chip Mem 设置为224K ROM + 96K RAM。不要以参考手册为准。
|
||||||
|
|
||||||
|
#### 运行结果
|
||||||
|
|
||||||
|
在终端工具里打开板载 wch-link 串口(WCHDapLink SERIAL,默认115200-8-1-N),复位设备后,在串口上可以看到 RT-Thread 的输出信息:
|
||||||
|
|
||||||
|
![end](./figures/end.png)
|
|
@ -0,0 +1,15 @@
|
||||||
|
# for module compiling
|
||||||
|
import os
|
||||||
|
Import('RTT_ROOT')
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
objs = []
|
||||||
|
list = os.listdir(cwd)
|
||||||
|
|
||||||
|
for d in list:
|
||||||
|
path = os.path.join(cwd, d)
|
||||||
|
if os.path.isfile(os.path.join(path, 'SConscript')):
|
||||||
|
objs = objs + SConscript(os.path.join(d, 'SConscript'))
|
||||||
|
|
||||||
|
Return('objs')
|
|
@ -0,0 +1,64 @@
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import rtconfig
|
||||||
|
from SCons.Script import *
|
||||||
|
|
||||||
|
if os.getenv('RTT_ROOT'):
|
||||||
|
RTT_ROOT = os.getenv('RTT_ROOT')
|
||||||
|
else:
|
||||||
|
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../../..')
|
||||||
|
|
||||||
|
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
|
||||||
|
try:
|
||||||
|
from building import *
|
||||||
|
except:
|
||||||
|
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
|
||||||
|
print(RTT_ROOT)
|
||||||
|
exit(-1)
|
||||||
|
|
||||||
|
|
||||||
|
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
|
||||||
|
|
||||||
|
DefaultEnvironment(tools=[])
|
||||||
|
env = Environment(tools = ['mingw'],
|
||||||
|
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
|
||||||
|
CC = rtconfig.CC, CFLAGS = rtconfig.CFLAGS,
|
||||||
|
AR = rtconfig.AR, ARFLAGS = '-rc',
|
||||||
|
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
|
||||||
|
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
|
||||||
|
|
||||||
|
if rtconfig.PLATFORM in ['iccarm']:
|
||||||
|
env.Replace(CCCOM = ['$CC $CFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
|
||||||
|
env.Replace(ARFLAGS = [''])
|
||||||
|
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
|
||||||
|
|
||||||
|
Export('RTT_ROOT')
|
||||||
|
Export('rtconfig')
|
||||||
|
|
||||||
|
SDK_ROOT = os.path.abspath('./')
|
||||||
|
|
||||||
|
if os.path.exists(SDK_ROOT + '/Libraries'):
|
||||||
|
libraries_path_prefix = SDK_ROOT + '/Libraries'
|
||||||
|
else:
|
||||||
|
libraries_path_prefix = os.path.dirname(SDK_ROOT) + '/Libraries'
|
||||||
|
|
||||||
|
SDK_LIB = libraries_path_prefix
|
||||||
|
Export('SDK_LIB')
|
||||||
|
|
||||||
|
# prepare building environment
|
||||||
|
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
|
||||||
|
|
||||||
|
ch32_library = 'ch32v30x_libraries'
|
||||||
|
rtconfig.BSP_LIBRARY_TYPE = ch32_library
|
||||||
|
|
||||||
|
bsp_vdir = 'build'
|
||||||
|
library_vdir = 'build/libraries'
|
||||||
|
|
||||||
|
# include libraries
|
||||||
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, ch32_library, 'SConscript'), variant_dir=library_vdir + '/ch32_library', duplicate=0))
|
||||||
|
|
||||||
|
# common include drivers
|
||||||
|
objs.extend(SConscript(os.path.join(libraries_path_prefix, 'ch32_drivers', 'SConscript'), variant_dir=library_vdir + '/ch32_drivers', duplicate=0))
|
||||||
|
|
||||||
|
# make a building
|
||||||
|
DoBuilding(TARGET, objs)
|
|
@ -0,0 +1,15 @@
|
||||||
|
from building import *
|
||||||
|
import os
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
src = Glob('*.c')
|
||||||
|
CPPPATH = [cwd]
|
||||||
|
|
||||||
|
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
|
||||||
|
|
||||||
|
list = os.listdir(cwd)
|
||||||
|
for item in list:
|
||||||
|
if os.path.isfile(os.path.join(cwd, item, 'SConscript')):
|
||||||
|
group = group + SConscript(os.path.join(item, 'SConscript'))
|
||||||
|
|
||||||
|
Return('group')
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2022-08-23 liYony first version
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
int main(void)
|
||||||
|
{
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
rt_kprintf("Hello RT-Thread!\n");
|
||||||
|
rt_thread_mdelay(1000);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
menu "Hardware Drivers Config"
|
||||||
|
|
||||||
|
config SOC_CH32V307VC
|
||||||
|
bool
|
||||||
|
select SOC_RISCV_SERIES_CH32V307
|
||||||
|
select RT_USING_COMPONENTS_INIT
|
||||||
|
select RT_USING_USER_MAIN
|
||||||
|
default y
|
||||||
|
|
||||||
|
menu "On-chip Peripheral Drivers"
|
||||||
|
|
||||||
|
config BSP_USING_UART
|
||||||
|
bool "Enable UART"
|
||||||
|
select RT_USING_SERIAL
|
||||||
|
default n
|
||||||
|
|
||||||
|
if BSP_USING_UART
|
||||||
|
config BSP_USING_UART1
|
||||||
|
bool "Enable UART1"
|
||||||
|
default n
|
||||||
|
endif
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "Onboard Peripheral Drivers"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
menu "Board extended module Drivers"
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
endmenu
|
|
@ -0,0 +1,17 @@
|
||||||
|
import os
|
||||||
|
import rtconfig
|
||||||
|
from building import *
|
||||||
|
|
||||||
|
Import('SDK_LIB')
|
||||||
|
|
||||||
|
cwd = GetCurrentDir()
|
||||||
|
|
||||||
|
# add general drivers
|
||||||
|
src = Split('''
|
||||||
|
board.c
|
||||||
|
''')
|
||||||
|
|
||||||
|
path = [cwd]
|
||||||
|
|
||||||
|
group = DefineGroup('Drivers', src, depend = [''], CPPPATH = path)
|
||||||
|
Return('group')
|
|
@ -0,0 +1,84 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2022-08-23 liYony first version
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "board.h"
|
||||||
|
#include <stdint.h>
|
||||||
|
#include "drv_usart.h"
|
||||||
|
#include <rthw.h>
|
||||||
|
#include <rtthread.h>
|
||||||
|
|
||||||
|
extern uint32_t SystemCoreClock;
|
||||||
|
|
||||||
|
static uint32_t _SysTick_Config(rt_uint32_t ticks)
|
||||||
|
{
|
||||||
|
NVIC_SetPriority(SysTicK_IRQn,0xf0);
|
||||||
|
NVIC_SetPriority(Software_IRQn,0xf0);
|
||||||
|
NVIC_EnableIRQ(SysTicK_IRQn);
|
||||||
|
NVIC_EnableIRQ(Software_IRQn);
|
||||||
|
SysTick->CTLR=0;
|
||||||
|
SysTick->SR=0;
|
||||||
|
SysTick->CNT=0;
|
||||||
|
SysTick->CMP=ticks-1;
|
||||||
|
SysTick->CTLR=0xF;
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
|
#define RT_HEAP_SIZE (4096)
|
||||||
|
static uint32_t rt_heap[RT_HEAP_SIZE];
|
||||||
|
RT_WEAK void *rt_heap_begin_get(void)
|
||||||
|
{
|
||||||
|
return rt_heap;
|
||||||
|
}
|
||||||
|
|
||||||
|
RT_WEAK void *rt_heap_end_get(void)
|
||||||
|
{
|
||||||
|
return rt_heap + RT_HEAP_SIZE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function will initial your board.
|
||||||
|
*/
|
||||||
|
void rt_hw_board_init()
|
||||||
|
{
|
||||||
|
/* System Tick Configuration */
|
||||||
|
_SysTick_Config(SystemCoreClock / RT_TICK_PER_SECOND);
|
||||||
|
|
||||||
|
#if defined(RT_USING_USER_MAIN) && defined(RT_USING_HEAP)
|
||||||
|
rt_system_heap_init(rt_heap_begin_get(), rt_heap_end_get());
|
||||||
|
#endif
|
||||||
|
/* USART driver initialization is open by default */
|
||||||
|
#ifdef RT_USING_SERIAL
|
||||||
|
rt_hw_usart_init();
|
||||||
|
#endif
|
||||||
|
#ifdef RT_USING_CONSOLE
|
||||||
|
rt_console_set_device(RT_CONSOLE_DEVICE_NAME);
|
||||||
|
#endif
|
||||||
|
/* Call components board initial (use INIT_BOARD_EXPORT()) */
|
||||||
|
#ifdef RT_USING_COMPONENTS_INIT
|
||||||
|
rt_components_board_init();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void SysTick_Handler(void) __attribute__((interrupt("WCH-Interrupt-fast")));
|
||||||
|
void SysTick_Handler(void)
|
||||||
|
{
|
||||||
|
GET_INT_SP();
|
||||||
|
/* enter interrupt */
|
||||||
|
rt_interrupt_enter();
|
||||||
|
SysTick->SR=0;
|
||||||
|
rt_tick_increase();
|
||||||
|
/* leave interrupt */
|
||||||
|
rt_interrupt_leave();
|
||||||
|
FREE_INT_SP();
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2006-2022, RT-Thread Development Team
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*
|
||||||
|
* Change Logs:
|
||||||
|
* Date Author Notes
|
||||||
|
* 2022-08-23 liYony first version
|
||||||
|
*/
|
||||||
|
|
||||||
|
// <<< Use Configuration Wizard in Context Menu >>>
|
||||||
|
#ifndef __BOARD_H__
|
||||||
|
#define __BOARD_H__
|
||||||
|
|
||||||
|
#include "ch32v30x.h"
|
||||||
|
|
||||||
|
/* board configuration */
|
||||||
|
#define SRAM_SIZE 96
|
||||||
|
#define SRAM_END (0x20000000 + SRAM_SIZE * 1024)
|
||||||
|
|
||||||
|
extern int _ebss;
|
||||||
|
#define HEAP_BEGIN ((void *)&_ebss)
|
||||||
|
#define HEAP_END (SRAM_END-_stack_size)
|
||||||
|
|
||||||
|
void rt_hw_board_init(void);
|
||||||
|
|
||||||
|
#endif /* __BOARD_H__ */
|
|
@ -0,0 +1,190 @@
|
||||||
|
ENTRY( _start )
|
||||||
|
|
||||||
|
__stack_size = 2048;
|
||||||
|
|
||||||
|
PROVIDE( _stack_size = __stack_size );
|
||||||
|
|
||||||
|
|
||||||
|
MEMORY
|
||||||
|
{
|
||||||
|
FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 224K
|
||||||
|
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
SECTIONS
|
||||||
|
{
|
||||||
|
|
||||||
|
.init :
|
||||||
|
{
|
||||||
|
_sinit = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
KEEP(*(SORT_NONE(.init)))
|
||||||
|
. = ALIGN(4);
|
||||||
|
_einit = .;
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.vector :
|
||||||
|
{
|
||||||
|
*(.vector);
|
||||||
|
. = ALIGN(64);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.text :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
*(.text)
|
||||||
|
*(.text.*)
|
||||||
|
*(.rodata)
|
||||||
|
*(.rodata*)
|
||||||
|
*(.glue_7)
|
||||||
|
*(.glue_7t)
|
||||||
|
*(.gnu.linkonce.t.*)
|
||||||
|
|
||||||
|
/* section information for finsh shell */
|
||||||
|
. = ALIGN(4);
|
||||||
|
__fsymtab_start = .;
|
||||||
|
KEEP(*(FSymTab))
|
||||||
|
__fsymtab_end = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
__vsymtab_start = .;
|
||||||
|
KEEP(*(VSymTab))
|
||||||
|
__vsymtab_end = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
/* section information for initial. */
|
||||||
|
. = ALIGN(4);
|
||||||
|
__rt_init_start = .;
|
||||||
|
KEEP(*(SORT(.rti_fn*)))
|
||||||
|
__rt_init_end = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
/* section information for modules */
|
||||||
|
. = ALIGN(4);
|
||||||
|
__rtmsymtab_start = .;
|
||||||
|
KEEP(*(RTMSymTab))
|
||||||
|
__rtmsymtab_end = .;
|
||||||
|
. = ALIGN(4);
|
||||||
|
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.fini :
|
||||||
|
{
|
||||||
|
KEEP(*(SORT_NONE(.fini)))
|
||||||
|
. = ALIGN(4);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
PROVIDE( _etext = . );
|
||||||
|
PROVIDE( _eitcm = . );
|
||||||
|
|
||||||
|
.preinit_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_start = .);
|
||||||
|
KEEP (*(.preinit_array))
|
||||||
|
PROVIDE_HIDDEN (__preinit_array_end = .);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.init_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__init_array_start = .);
|
||||||
|
KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*)))
|
||||||
|
KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors))
|
||||||
|
PROVIDE_HIDDEN (__init_array_end = .);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.fini_array :
|
||||||
|
{
|
||||||
|
PROVIDE_HIDDEN (__fini_array_start = .);
|
||||||
|
KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*)))
|
||||||
|
KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors))
|
||||||
|
PROVIDE_HIDDEN (__fini_array_end = .);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.ctors :
|
||||||
|
{
|
||||||
|
/* gcc uses crtbegin.o to find the start of
|
||||||
|
the constructors, so we make sure it is
|
||||||
|
first. Because this is a wildcard, it
|
||||||
|
doesn't matter if the user does not
|
||||||
|
actually link against crtbegin.o; the
|
||||||
|
linker won't look for a file to match a
|
||||||
|
wildcard. The wildcard also means that it
|
||||||
|
doesn't matter which directory crtbegin.o
|
||||||
|
is in. */
|
||||||
|
KEEP (*crtbegin.o(.ctors))
|
||||||
|
KEEP (*crtbegin?.o(.ctors))
|
||||||
|
/* We don't want to include the .ctor section from
|
||||||
|
the crtend.o file until after the sorted ctors.
|
||||||
|
The .ctor section from the crtend file contains the
|
||||||
|
end of ctors marker and it must be last */
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors))
|
||||||
|
KEEP (*(SORT(.ctors.*)))
|
||||||
|
KEEP (*(.ctors))
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.dtors :
|
||||||
|
{
|
||||||
|
KEEP (*crtbegin.o(.dtors))
|
||||||
|
KEEP (*crtbegin?.o(.dtors))
|
||||||
|
KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors))
|
||||||
|
KEEP (*(SORT(.dtors.*)))
|
||||||
|
KEEP (*(.dtors))
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.dalign :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE(_data_vma = .);
|
||||||
|
} >RAM AT>FLASH
|
||||||
|
|
||||||
|
.dlalign :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE(_data_lma = .);
|
||||||
|
} >FLASH AT>FLASH
|
||||||
|
|
||||||
|
.data :
|
||||||
|
{
|
||||||
|
*(.gnu.linkonce.r.*)
|
||||||
|
*(.data .data.*)
|
||||||
|
*(.gnu.linkonce.d.*)
|
||||||
|
. = ALIGN(8);
|
||||||
|
PROVIDE( __global_pointer$ = . + 0x800 );
|
||||||
|
*(.sdata .sdata.*)
|
||||||
|
*(.sdata2.*)
|
||||||
|
*(.gnu.linkonce.s.*)
|
||||||
|
. = ALIGN(8);
|
||||||
|
*(.srodata.cst16)
|
||||||
|
*(.srodata.cst8)
|
||||||
|
*(.srodata.cst4)
|
||||||
|
*(.srodata.cst2)
|
||||||
|
*(.srodata .srodata.*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE( _edata = .);
|
||||||
|
} >RAM AT>FLASH
|
||||||
|
|
||||||
|
.bss :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE( _sbss = .);
|
||||||
|
*(.sbss*)
|
||||||
|
*(.gnu.linkonce.sb.*)
|
||||||
|
*(.bss*)
|
||||||
|
*(.gnu.linkonce.b.*)
|
||||||
|
*(COMMON*)
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE( _ebss = .);
|
||||||
|
} >RAM AT>FLASH
|
||||||
|
|
||||||
|
PROVIDE( _end = _ebss);
|
||||||
|
PROVIDE( end = . );
|
||||||
|
|
||||||
|
.stack ORIGIN(RAM) + LENGTH(RAM) - __stack_size :
|
||||||
|
{
|
||||||
|
. = ALIGN(4);
|
||||||
|
PROVIDE(_susrstack = . );
|
||||||
|
. = . + __stack_size;
|
||||||
|
PROVIDE( _eusrstack = .);
|
||||||
|
} >RAM
|
||||||
|
|
||||||
|
}
|
After Width: | Height: | Size: 143 KiB |
After Width: | Height: | Size: 69 KiB |
After Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 65 KiB |
After Width: | Height: | Size: 73 KiB |
After Width: | Height: | Size: 61 KiB |
After Width: | Height: | Size: 242 KiB |
|
@ -0,0 +1,192 @@
|
||||||
|
#ifndef RT_CONFIG_H__
|
||||||
|
#define RT_CONFIG_H__
|
||||||
|
|
||||||
|
/* Automatically generated file; DO NOT EDIT. */
|
||||||
|
/* RT-Thread Configuration */
|
||||||
|
|
||||||
|
/* RT-Thread Kernel */
|
||||||
|
|
||||||
|
#define RT_NAME_MAX 8
|
||||||
|
#define RT_ALIGN_SIZE 4
|
||||||
|
#define RT_THREAD_PRIORITY_32
|
||||||
|
#define RT_THREAD_PRIORITY_MAX 32
|
||||||
|
#define RT_TICK_PER_SECOND 1000
|
||||||
|
#define RT_USING_HOOK
|
||||||
|
#define RT_HOOK_USING_FUNC_PTR
|
||||||
|
#define RT_USING_IDLE_HOOK
|
||||||
|
#define RT_IDLE_HOOK_LIST_SIZE 4
|
||||||
|
#define IDLE_THREAD_STACK_SIZE 256
|
||||||
|
#define RT_USING_TIMER_SOFT
|
||||||
|
#define RT_TIMER_THREAD_PRIO 4
|
||||||
|
#define RT_TIMER_THREAD_STACK_SIZE 512
|
||||||
|
|
||||||
|
/* kservice optimization */
|
||||||
|
|
||||||
|
|
||||||
|
/* Inter-Thread communication */
|
||||||
|
|
||||||
|
#define RT_USING_SEMAPHORE
|
||||||
|
#define RT_USING_MUTEX
|
||||||
|
#define RT_USING_EVENT
|
||||||
|
#define RT_USING_MAILBOX
|
||||||
|
#define RT_USING_MESSAGEQUEUE
|
||||||
|
|
||||||
|
/* Memory Management */
|
||||||
|
|
||||||
|
#define RT_USING_SMALL_MEM
|
||||||
|
#define RT_USING_SMALL_MEM_AS_HEAP
|
||||||
|
#define RT_USING_HEAP
|
||||||
|
|
||||||
|
/* Kernel Device Object */
|
||||||
|
|
||||||
|
#define RT_USING_DEVICE
|
||||||
|
#define RT_USING_CONSOLE
|
||||||
|
#define RT_CONSOLEBUF_SIZE 128
|
||||||
|
#define RT_CONSOLE_DEVICE_NAME "uart1"
|
||||||
|
#define RT_VER_NUM 0x40101
|
||||||
|
#define ARCH_RISCV
|
||||||
|
|
||||||
|
/* RT-Thread Components */
|
||||||
|
|
||||||
|
#define RT_USING_COMPONENTS_INIT
|
||||||
|
#define RT_USING_USER_MAIN
|
||||||
|
#define RT_MAIN_THREAD_STACK_SIZE 2048
|
||||||
|
#define RT_MAIN_THREAD_PRIORITY 10
|
||||||
|
#define RT_USING_MSH
|
||||||
|
#define RT_USING_FINSH
|
||||||
|
#define FINSH_USING_MSH
|
||||||
|
#define FINSH_THREAD_NAME "tshell"
|
||||||
|
#define FINSH_THREAD_PRIORITY 20
|
||||||
|
#define FINSH_THREAD_STACK_SIZE 1024
|
||||||
|
#define FINSH_USING_HISTORY
|
||||||
|
#define FINSH_HISTORY_LINES 5
|
||||||
|
#define FINSH_USING_SYMTAB
|
||||||
|
#define FINSH_CMD_SIZE 80
|
||||||
|
#define MSH_USING_BUILT_IN_COMMANDS
|
||||||
|
#define FINSH_USING_DESCRIPTION
|
||||||
|
#define FINSH_ARG_MAX 10
|
||||||
|
|
||||||
|
/* Device Drivers */
|
||||||
|
|
||||||
|
#define RT_USING_DEVICE_IPC
|
||||||
|
#define RT_USING_SERIAL
|
||||||
|
#define RT_USING_SERIAL_V1
|
||||||
|
#define RT_SERIAL_RB_BUFSZ 64
|
||||||
|
#define RT_USING_PIN
|
||||||
|
|
||||||
|
/* Using USB */
|
||||||
|
|
||||||
|
|
||||||
|
/* C/C++ and POSIX layer */
|
||||||
|
|
||||||
|
#define RT_LIBC_DEFAULT_TIMEZONE 8
|
||||||
|
|
||||||
|
/* POSIX (Portable Operating System Interface) layer */
|
||||||
|
|
||||||
|
|
||||||
|
/* Interprocess Communication (IPC) */
|
||||||
|
|
||||||
|
|
||||||
|
/* Socket is in the 'Network' category */
|
||||||
|
|
||||||
|
|
||||||
|
/* Network */
|
||||||
|
|
||||||
|
|
||||||
|
/* Utilities */
|
||||||
|
|
||||||
|
|
||||||
|
/* RT-Thread Utestcases */
|
||||||
|
|
||||||
|
|
||||||
|
/* RT-Thread online packages */
|
||||||
|
|
||||||
|
/* IoT - internet of things */
|
||||||
|
|
||||||
|
|
||||||
|
/* Wi-Fi */
|
||||||
|
|
||||||
|
/* Marvell WiFi */
|
||||||
|
|
||||||
|
|
||||||
|
/* Wiced WiFi */
|
||||||
|
|
||||||
|
|
||||||
|
/* IoT Cloud */
|
||||||
|
|
||||||
|
|
||||||
|
/* security packages */
|
||||||
|
|
||||||
|
|
||||||
|
/* language packages */
|
||||||
|
|
||||||
|
/* JSON: JavaScript Object Notation, a lightweight data-interchange format */
|
||||||
|
|
||||||
|
|
||||||
|
/* XML: Extensible Markup Language */
|
||||||
|
|
||||||
|
|
||||||
|
/* multimedia packages */
|
||||||
|
|
||||||
|
/* LVGL: powerful and easy-to-use embedded GUI library */
|
||||||
|
|
||||||
|
|
||||||
|
/* u8g2: a monochrome graphic library */
|
||||||
|
|
||||||
|
|
||||||
|
/* PainterEngine: A cross-platform graphics application framework written in C language */
|
||||||
|
|
||||||
|
|
||||||
|
/* tools packages */
|
||||||
|
|
||||||
|
|
||||||
|
/* system packages */
|
||||||
|
|
||||||
|
/* enhanced kernel services */
|
||||||
|
|
||||||
|
|
||||||
|
/* acceleration: Assembly language or algorithmic acceleration packages */
|
||||||
|
|
||||||
|
|
||||||
|
/* CMSIS: ARM Cortex-M Microcontroller Software Interface Standard */
|
||||||
|
|
||||||
|
|
||||||
|
/* Micrium: Micrium software products porting for RT-Thread */
|
||||||
|
|
||||||
|
|
||||||
|
/* peripheral libraries and drivers */
|
||||||
|
|
||||||
|
|
||||||
|
/* kendryte-sdk: Kendryte SDK */
|
||||||
|
|
||||||
|
|
||||||
|
/* AI packages */
|
||||||
|
|
||||||
|
|
||||||
|
/* miscellaneous packages */
|
||||||
|
|
||||||
|
/* project laboratory */
|
||||||
|
|
||||||
|
/* samples: kernel and components samples */
|
||||||
|
|
||||||
|
|
||||||
|
/* entertainment: terminal games and other interesting software packages */
|
||||||
|
|
||||||
|
#define SOC_RISCV_FAMILY_CH32
|
||||||
|
#define SOC_RISCV_SERIES_CH32V307
|
||||||
|
|
||||||
|
/* Hardware Drivers Config */
|
||||||
|
|
||||||
|
#define SOC_CH32V307VC
|
||||||
|
|
||||||
|
/* On-chip Peripheral Drivers */
|
||||||
|
|
||||||
|
#define BSP_USING_UART
|
||||||
|
#define BSP_USING_UART1
|
||||||
|
|
||||||
|
/* Onboard Peripheral Drivers */
|
||||||
|
|
||||||
|
/* Board extended module Drivers */
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
|
@ -0,0 +1,69 @@
|
||||||
|
import os
|
||||||
|
ARCH = 'risc-v'
|
||||||
|
CPU = 'ch32v3'
|
||||||
|
# toolchains options
|
||||||
|
CROSS_TOOL = 'gcc'
|
||||||
|
|
||||||
|
#------- toolchains path -------------------------------------------------------
|
||||||
|
if os.getenv('RTT_CC'):
|
||||||
|
CROSS_TOOL = os.getenv('RTT_CC')
|
||||||
|
|
||||||
|
if CROSS_TOOL == 'gcc':
|
||||||
|
PLATFORM = 'gcc'
|
||||||
|
EXEC_PATH = r'D:\RT-ThreadStudio\repo\Extract\ToolChain_Support_Packages\WCH\RISC-V-GCC-WCH\8.2.0\bin'
|
||||||
|
else:
|
||||||
|
print('Please make sure your toolchains is GNU GCC!')
|
||||||
|
exit(0)
|
||||||
|
|
||||||
|
if os.getenv('RTT_EXEC_PATH'):
|
||||||
|
EXEC_PATH = os.getenv('RTT_EXEC_PATH')
|
||||||
|
|
||||||
|
BUILD = 'debug'
|
||||||
|
#BUILD = 'release'
|
||||||
|
|
||||||
|
CORE = 'risc-v'
|
||||||
|
MAP_FILE = 'rtthread.map'
|
||||||
|
LINK_FILE = './board/linker_scripts/link.lds'
|
||||||
|
TARGET_NAME = 'rtthread.bin'
|
||||||
|
|
||||||
|
#------- GCC settings ----------------------------------------------------------
|
||||||
|
if PLATFORM == 'gcc':
|
||||||
|
# toolchains
|
||||||
|
PREFIX = 'riscv-none-embed-'
|
||||||
|
CC = PREFIX + 'gcc'
|
||||||
|
CXX= PREFIX + 'g++'
|
||||||
|
AS = PREFIX + 'gcc'
|
||||||
|
AR = PREFIX + 'ar'
|
||||||
|
LINK = PREFIX + 'gcc'
|
||||||
|
TARGET_EXT = 'elf'
|
||||||
|
SIZE = PREFIX + 'size'
|
||||||
|
OBJDUMP = PREFIX + 'objdump'
|
||||||
|
OBJCPY = PREFIX + 'objcopy'
|
||||||
|
|
||||||
|
DEVICE = ' -march=rv32imac -mabi=ilp32 -DUSE_PLIC -DUSE_M_TIME -DNO_INIT -mcmodel=medany -msmall-data-limit=8 -L. -nostartfiles -lc '
|
||||||
|
CFLAGS = DEVICE
|
||||||
|
CFLAGS += ' -save-temps=obj'
|
||||||
|
AFLAGS = '-c'+ DEVICE + ' -x assembler-with-cpp'
|
||||||
|
LFLAGS = DEVICE
|
||||||
|
LFLAGS += ' -Wl,--gc-sections,-cref,-Map=' + MAP_FILE
|
||||||
|
LFLAGS += ' -T ' + LINK_FILE
|
||||||
|
LFLAGS += ' -Wl,-wrap=memset'
|
||||||
|
|
||||||
|
CPATH = ''
|
||||||
|
LPATH = ''
|
||||||
|
|
||||||
|
if BUILD == 'debug':
|
||||||
|
CFLAGS += ' -O0 -g3'
|
||||||
|
AFLAGS += ' -g3'
|
||||||
|
else:
|
||||||
|
CFLAGS += ' -O2'
|
||||||
|
|
||||||
|
POST_ACTION = OBJCPY + ' -O binary $TARGET ' + TARGET_NAME + '\n'
|
||||||
|
POST_ACTION += SIZE + ' $TARGET\n'
|
||||||
|
|
||||||
|
def dist_handle(BSP_ROOT, dist_dir):
|
||||||
|
import sys
|
||||||
|
cwd_path = os.getcwd()
|
||||||
|
sys.path.append(os.path.join(os.path.dirname(BSP_ROOT), 'tools'))
|
||||||
|
from sdk_dist import dist_do_building
|
||||||
|
dist_do_building(BSP_ROOT, dist_dir)
|