diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/.config b/bsp/hc32/ev_hc32f460_lqfp100_v2/.config
index a4a1a7817d..03ddecfa34 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/.config
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/.config
@@ -122,7 +122,7 @@ CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_USING_SERIAL_V1=y
# CONFIG_RT_USING_SERIAL_V2 is not set
-CONFIG_RT_SERIAL_USING_DMA=y
+# 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
@@ -138,13 +138,7 @@ CONFIG_RT_USING_PIN=y
# 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=y
-# CONFIG_RT_USING_SPI_BITOPS is not set
-# CONFIG_RT_USING_QSPI is not set
-# CONFIG_RT_USING_SPI_MSD is not set
-# CONFIG_RT_USING_SFUD is not set
-# CONFIG_RT_USING_ENC28J60 is not set
-# CONFIG_RT_USING_SPI_WIFI 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
@@ -303,6 +297,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -327,6 +322,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -338,6 +334,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -427,6 +424,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -439,14 +437,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
-#
-# POSIX extension functions
-#
-# CONFIG_PKG_USING_POSIX_GETLINE is not set
-# CONFIG_PKG_USING_POSIX_WCWIDTH is not set
-# CONFIG_PKG_USING_POSIX_ITOA is not set
-# CONFIG_PKG_USING_POSIX_STRINGS is not set
-
#
# acceleration: Assembly language or algorithmic acceleration packages
#
@@ -474,6 +464,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -511,8 +502,10 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -682,6 +675,10 @@ CONFIG_BSP_USING_UART=y
CONFIG_BSP_USING_UART4=y
# CONFIG_BSP_UART4_RX_USING_DMA is not set
# CONFIG_BSP_UART4_TX_USING_DMA is not set
+# CONFIG_BSP_USING_CAN is not set
+# CONFIG_BSP_USING_ADC is not set
+# CONFIG_BSP_USING_RTC is not set
+# CONFIG_BSP_USING_I2C2 is not set
#
# Board extended module Drivers
diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig
index a161247a09..39e62535a4 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig
@@ -28,12 +28,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART1_RX_USING_DMA
bool "Enable UART1 RX DMA"
- depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART1
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART1_TX_USING_DMA
bool "Enable UART1 TX DMA"
- depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART1
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART2
@@ -42,12 +44,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART2_RX_USING_DMA
bool "Enable UART2 RX DMA"
- depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART2
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART2_TX_USING_DMA
bool "Enable UART2 TX DMA"
- depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART2
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART3
@@ -56,12 +60,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART3_RX_USING_DMA
bool "Enable UART3 RX DMA"
- depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART3
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART3_TX_USING_DMA
bool "Enable UART3 TX DMA"
- depends on BSP_USING_UART3 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART3
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART4
@@ -70,12 +76,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART4_RX_USING_DMA
bool "Enable UART4 RX DMA"
- depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART4
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART4_TX_USING_DMA
bool "Enable UART4 TX DMA"
- depends on BSP_USING_UART4 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART4
+ select RT_SERIAL_USING_DMA
default n
endif
diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/drv_config.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/drv_config.h
index aa9760cbcd..952412e2d9 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/drv_config.h
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/drv_config.h
@@ -19,6 +19,14 @@
extern "C" {
#endif
+/* Suppress warning messages */
+#if defined(__CC_ARM)
+// Suppress warning message: extended constant initialiser used
+#pragma diag_suppress 1296
+#elif defined(__ICCARM__)
+#elif defined(__GNUC__)
+#endif
+
#include "dma_config.h"
#include "uart_config.h"
#include "gpio_config.h"
diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/project.ewp b/bsp/hc32/ev_hc32f460_lqfp100_v2/project.ewp
index ddeea932c2..59d8a71037 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/project.ewp
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/project.ewp
@@ -180,9 +180,6 @@
@@ -1166,9 +1161,6 @@
@@ -1981,37 +1971,22 @@
Compiler
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\stdlib.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cctype.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\time.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstdio.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\environ.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstdlib.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_close.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstring.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_lseek.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\ctime.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_mem.c
-
-
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_open.c
-
-
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_read.c
-
-
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_remove.c
-
-
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscall_write.c
-
-
- $PROJ_DIR$\..\..\..\components\libc\compilers\dlib\syscalls.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cwchar.c
@@ -2025,9 +2000,6 @@
$PROJ_DIR$\..\..\..\libcpu\arm\common\showmem.c
-
- $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m4\context_iar.S
- $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m4\cpuport.c
@@ -2061,12 +2033,6 @@
$PROJ_DIR$\..\..\..\components\drivers\serial\serial.c
-
- $PROJ_DIR$\..\..\..\components\drivers\spi\spi_core.c
-
-
- $PROJ_DIR$\..\..\..\components\drivers\spi\spi_dev.c
- Drivers
@@ -2085,9 +2051,6 @@
$PROJ_DIR$\..\libraries\hc32_drivers\drv_irq.c
-
- $PROJ_DIR$\..\libraries\hc32_drivers\drv_spi.c
- $PROJ_DIR$\..\libraries\hc32_drivers\drv_usart.c
@@ -2100,6 +2063,9 @@
$PROJ_DIR$\..\..\..\components\finsh\msh.c
+
+ $PROJ_DIR$\..\..\..\components\finsh\msh_parse.c
+ $PROJ_DIR$\..\..\..\components\finsh\cmd.c
@@ -2193,9 +2159,6 @@
$PROJ_DIR$\..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\src\hc32_ll_rmu.c
-
- $PROJ_DIR$\..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\src\hc32_ll_spi.c
- $PROJ_DIR$\..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\src\hc32_ll_tmr0.c
diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/project.uvprojx b/bsp/hc32/ev_hc32f460_lqfp100_v2/project.uvprojx
index 2d95bacb11..c73f8bae90 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/project.uvprojx
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/project.uvprojx
@@ -333,9 +333,9 @@
0
- RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, HC32F460, USE_DDL_DRIVER, __RTTHREAD__, RT_USING_ARM_LIBC
+ __STDC_LIMIT_MACROS, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, HC32F460, USE_DDL_DRIVER, __RTTHREAD__, RT_USING_ARM_LIBC
- applications;.;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\spi;..\..\..\components\drivers\include;board;board\ports;board\config;..\libraries\hc32_drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\hc32f460_ddl\drivers\cmsis\Device\HDSC\hc32f4xx\Include;..\libraries\hc32f460_ddl\drivers\cmsis\Include;..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc
+ applications;.;..\..\..\components\libc\compilers\common\include;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\ports;board\config;..\libraries\hc32_drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\hc32f460_ddl\drivers\cmsis\Device\HDSC\hc32f4xx\Include;..\libraries\hc32f460_ddl\drivers\cmsis\Include;..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc
@@ -404,16 +404,44 @@
- stdlib.c
+ cctype.c1
- ..\..\..\components\libc\compilers\common\stdlib.c
+ ..\..\..\components\libc\compilers\common\cctype.c
- time.c
+ cstdio.c1
- ..\..\..\components\libc\compilers\common\time.c
+ ..\..\..\components\libc\compilers\common\cstdio.c
+
+
+
+
+ cstdlib.c
+ 1
+ ..\..\..\components\libc\compilers\common\cstdlib.c
+
+
+
+
+ cstring.c
+ 1
+ ..\..\..\components\libc\compilers\common\cstring.c
+
+
+
+
+ ctime.c
+ 1
+ ..\..\..\components\libc\compilers\common\ctime.c
+
+
+
+
+ cwchar.c
+ 1
+ ..\..\..\components\libc\compilers\common\cwchar.c
@@ -520,20 +548,6 @@
..\..\..\components\drivers\serial\serial.c
-
-
- spi_core.c
- 1
- ..\..\..\components\drivers\spi\spi_core.c
-
-
-
-
- spi_dev.c
- 1
- ..\..\..\components\drivers\spi\spi_dev.c
-
- Drivers
@@ -572,13 +586,6 @@
..\libraries\hc32_drivers\drv_irq.c
-
-
- drv_spi.c
- 1
- ..\libraries\hc32_drivers\drv_spi.c
-
- drv_usart.c
@@ -603,6 +610,13 @@
..\..\..\components\finsh\msh.c
+
+
+ msh_parse.c
+ 1
+ ..\..\..\components\finsh\msh_parse.c
+
+ cmd.c
@@ -812,13 +826,6 @@
..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\src\hc32_ll_rmu.c
-
-
- hc32_ll_spi.c
- 1
- ..\libraries\hc32f460_ddl\drivers\hc32_ll_driver\src\hc32_ll_spi.c
-
- hc32_ll_tmr0.c
diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h
index 87f5ae4621..c0cd770e43 100644
--- a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h
+++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h
@@ -78,10 +78,8 @@
#define RT_SYSTEM_WORKQUEUE_PRIORITY 23
#define RT_USING_SERIAL
#define RT_USING_SERIAL_V1
-#define RT_SERIAL_USING_DMA
#define RT_SERIAL_RB_BUFSZ 64
#define RT_USING_PIN
-#define RT_USING_SPI
/* Using USB */
@@ -154,9 +152,6 @@
/* enhanced kernel services */
-/* POSIX extension functions */
-
-
/* acceleration: Assembly language or algorithmic acceleration packages */
diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/.config b/bsp/hc32/ev_hc32f4a0_lqfp176/.config
index 7c2bf8a245..75226b9be7 100644
--- a/bsp/hc32/ev_hc32f4a0_lqfp176/.config
+++ b/bsp/hc32/ev_hc32f4a0_lqfp176/.config
@@ -122,40 +122,29 @@ CONFIG_RT_SYSTEM_WORKQUEUE_PRIORITY=23
CONFIG_RT_USING_SERIAL=y
CONFIG_RT_USING_SERIAL_V1=y
# CONFIG_RT_USING_SERIAL_V2 is not set
-CONFIG_RT_SERIAL_USING_DMA=y
+# 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=y
+# CONFIG_RT_USING_HWTIMER is not set
# CONFIG_RT_USING_CPUTIME is not set
-CONFIG_RT_USING_I2C=y
-# CONFIG_RT_I2C_DEBUG is not set
-CONFIG_RT_USING_I2C_BITOPS=y
-# CONFIG_RT_I2C_BITOPS_DEBUG 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=y
+# 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=y
-# CONFIG_RT_USING_ALARM is not set
-# CONFIG_RT_USING_SOFT_RTC is not set
+# CONFIG_RT_USING_RTC is not set
# CONFIG_RT_USING_SDIO is not set
-CONFIG_RT_USING_SPI=y
-# CONFIG_RT_USING_SPI_BITOPS is not set
-# CONFIG_RT_USING_QSPI is not set
-# CONFIG_RT_USING_SPI_MSD is not set
-# CONFIG_RT_USING_SFUD is not set
-# CONFIG_RT_USING_ENC28J60 is not set
-# CONFIG_RT_USING_SPI_WIFI 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=y
+# CONFIG_RT_USING_PULSE_ENCODER is not set
# CONFIG_RT_USING_INPUT_CAPTURE is not set
# CONFIG_RT_USING_WIFI is not set
@@ -308,6 +297,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -332,6 +322,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -343,6 +334,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -432,6 +424,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -444,14 +437,6 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# CONFIG_PKG_USING_RT_KPRINTF_THREADSAFE is not set
# CONFIG_PKG_USING_RT_VSNPRINTF_FULL is not set
-#
-# POSIX extension functions
-#
-# CONFIG_PKG_USING_POSIX_GETLINE is not set
-# CONFIG_PKG_USING_POSIX_WCWIDTH is not set
-# CONFIG_PKG_USING_POSIX_ITOA is not set
-# CONFIG_PKG_USING_POSIX_STRINGS is not set
-
#
# acceleration: Assembly language or algorithmic acceleration packages
#
@@ -479,6 +464,7 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
@@ -516,8 +502,10 @@ CONFIG_RT_LIBC_DEFAULT_TIMEZONE=8
# 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
diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig b/bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig
index eda0fd2c52..dc8ac5fe46 100644
--- a/bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig
+++ b/bsp/hc32/ev_hc32f4a0_lqfp176/board/Kconfig
@@ -59,12 +59,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART1_RX_USING_DMA
bool "Enable UART1 RX DMA"
- depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART1
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART1_TX_USING_DMA
bool "Enable UART1 TX DMA"
- depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART1
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART2
@@ -73,12 +75,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART2_RX_USING_DMA
bool "Enable UART2 RX DMA"
- depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART2
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART2_TX_USING_DMA
bool "Enable UART2 TX DMA"
- depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART2
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART3
@@ -99,12 +103,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART6_RX_USING_DMA
bool "Enable UART6 RX DMA"
- depends on BSP_USING_UART6 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART6
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART6_TX_USING_DMA
bool "Enable UART6 TX DMA"
- depends on BSP_USING_UART6 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART6
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART7
@@ -113,12 +119,14 @@ menu "On-chip Peripheral Drivers"
config BSP_UART7_RX_USING_DMA
bool "Enable UART7 RX DMA"
- depends on BSP_USING_UART7 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART7
+ select RT_SERIAL_USING_DMA
default n
config BSP_UART7_TX_USING_DMA
bool "Enable UART7 TX DMA"
- depends on BSP_USING_UART7 && RT_SERIAL_USING_DMA
+ depends on BSP_USING_UART7
+ select RT_SERIAL_USING_DMA
default n
config BSP_USING_UART8
diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/project.ewp b/bsp/hc32/ev_hc32f4a0_lqfp176/project.ewp
index 77106d8d33..912e5cf6dc 100644
--- a/bsp/hc32/ev_hc32f4a0_lqfp176/project.ewp
+++ b/bsp/hc32/ev_hc32f4a0_lqfp176/project.ewp
@@ -183,6 +183,7 @@
CLOCKS_PER_SEC=RT_TICK_PER_SECONDRT_USING_DLIBCRT_USING_LIBC
+ _DLIB_ADD_EXTRA_SYMBOLS=0HC32F4A0__RTTHREAD__USE_DDL_DRIVER
@@ -329,9 +330,9 @@
$PROJ_DIR$\applications$PROJ_DIR$\..\libraries\hc32_drivers$PROJ_DIR$\..\..\..\components\libc\posix\ipc
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\extension
- $PROJ_DIR$\..\..\..\components\libc\compilers\common$PROJ_DIR$\..\..\..\components\libc\posix\io\poll
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\extension
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\include$PROJ_DIR$\board\config$PROJ_DIR$\..\..\..\include$PROJ_DIR$\board
@@ -1168,6 +1169,7 @@
CLOCKS_PER_SEC=RT_TICK_PER_SECONDRT_USING_DLIBCRT_USING_LIBC
+ _DLIB_ADD_EXTRA_SYMBOLS=0HC32F4A0__RTTHREAD__USE_DDL_DRIVER
@@ -1314,9 +1316,9 @@
$PROJ_DIR$\applications$PROJ_DIR$\..\libraries\hc32_drivers$PROJ_DIR$\..\..\..\components\libc\posix\ipc
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\extension
- $PROJ_DIR$\..\..\..\components\libc\compilers\common$PROJ_DIR$\..\..\..\components\libc\posix\io\poll
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\extension
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\include$PROJ_DIR$\board\config$PROJ_DIR$\..\..\..\include$PROJ_DIR$\board
@@ -1979,10 +1981,22 @@
Compiler
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\stdlib.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cctype.c
- $PROJ_DIR$\..\..\..\components\libc\compilers\common\time.c
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstdio.c
+
+
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstdlib.c
+
+
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cstring.c
+
+
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\ctime.c
+
+
+ $PROJ_DIR$\..\..\..\components\libc\compilers\common\cwchar.c$PROJ_DIR$\..\..\..\components\libc\compilers\dlib\environ.c
@@ -2089,6 +2103,9 @@
$PROJ_DIR$\..\..\..\components\finsh\msh.c
+
+ $PROJ_DIR$\..\..\..\components\finsh\msh_parse.c
+ $PROJ_DIR$\..\..\..\components\finsh\cmd.c
diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/project.uvprojx b/bsp/hc32/ev_hc32f4a0_lqfp176/project.uvprojx
index 209b4daccc..40701cd717 100644
--- a/bsp/hc32/ev_hc32f4a0_lqfp176/project.uvprojx
+++ b/bsp/hc32/ev_hc32f4a0_lqfp176/project.uvprojx
@@ -333,9 +333,9 @@
0
- RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, USE_DDL_DRIVER, HC32F4A0, __RTTHREAD__, RT_USING_ARM_LIBC
+ __STDC_LIMIT_MACROS, RT_USING_LIBC, __CLK_TCK=RT_TICK_PER_SECOND, USE_DDL_DRIVER, HC32F4A0, __RTTHREAD__, RT_USING_ARM_LIBC
- applications;.;..\..\..\components\libc\compilers\common;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\ports;board\config;..\libraries\hc32_drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\hc32f4a0_ddl\drivers\cmsis\Device\HDSC\hc32f4xx\Include;..\libraries\hc32f4a0_ddl\drivers\cmsis\Include;..\libraries\hc32f4a0_ddl\drivers\hc32_ll_driver\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc
+ applications;.;..\..\..\components\libc\compilers\common\include;..\..\..\components\libc\compilers\common\extension;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\libcpu\arm\common;..\..\..\libcpu\arm\cortex-m4;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;board;board\ports;board\config;..\libraries\hc32_drivers;..\..\..\components\finsh;.;..\..\..\include;..\libraries\hc32f4a0_ddl\drivers\cmsis\Device\HDSC\hc32f4xx\Include;..\libraries\hc32f4a0_ddl\drivers\cmsis\Include;..\libraries\hc32f4a0_ddl\drivers\hc32_ll_driver\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\stdio;..\..\..\components\libc\posix\ipc
@@ -404,16 +404,44 @@
- stdlib.c
+ cctype.c1
- ..\..\..\components\libc\compilers\common\stdlib.c
+ ..\..\..\components\libc\compilers\common\cctype.c
- time.c
+ cstdio.c1
- ..\..\..\components\libc\compilers\common\time.c
+ ..\..\..\components\libc\compilers\common\cstdio.c
+
+
+
+
+ cstdlib.c
+ 1
+ ..\..\..\components\libc\compilers\common\cstdlib.c
+
+
+
+
+ cstring.c
+ 1
+ ..\..\..\components\libc\compilers\common\cstring.c
+
+
+
+
+ ctime.c
+ 1
+ ..\..\..\components\libc\compilers\common\ctime.c
+
+
+
+
+ cwchar.c
+ 1
+ ..\..\..\components\libc\compilers\common\cwchar.c
@@ -582,6 +610,13 @@
..\..\..\components\finsh\msh.c
+
+
+ msh_parse.c
+ 1
+ ..\..\..\components\finsh\msh_parse.c
+
+ cmd.c
diff --git a/bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h b/bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h
index 0723e81fd7..58599e9121 100644
--- a/bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h
+++ b/bsp/hc32/ev_hc32f4a0_lqfp176/rtconfig.h
@@ -152,9 +152,6 @@
/* enhanced kernel services */
-/* POSIX extension functions */
-
-
/* acceleration: Assembly language or algorithmic acceleration packages */
diff --git a/bsp/hc32/libraries/hc32_drivers/drv_spi.c b/bsp/hc32/libraries/hc32_drivers/drv_spi.c
index a1d3add03b..8abf1ae4d1 100644
--- a/bsp/hc32/libraries/hc32_drivers/drv_spi.c
+++ b/bsp/hc32/libraries/hc32_drivers/drv_spi.c
@@ -43,32 +43,32 @@ extern rt_err_t rt_hw_spi_board_init(CM_SPI_TypeDef *CM_SPIx);
/*******************************************************************************
* Local function prototypes ('static')
******************************************************************************/
-#if defined(BSP_USING_SPI1)
+#if defined(BSP_USING_SPI1) && defined(BSP_SPI1_RX_USING_DMA)
static void spi1_rx_dma_irq_handle(void);
static void spi1_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI1 */
-#if defined(BSP_USING_SPI2)
+#if defined(BSP_USING_SPI2) && defined(BSP_SPI2_RX_USING_DMA)
static void spi2_rx_dma_irq_handle(void);
static void spi2_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI2 */
-#if defined(BSP_USING_SPI3)
+#if defined(BSP_USING_SPI3) && defined(BSP_SPI3_RX_USING_DMA)
static void spi3_rx_dma_irq_handle(void);
static void spi3_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI3 */
-#if defined(BSP_USING_SPI4)
+#if defined(BSP_USING_SPI4) && defined(BSP_SPI4_RX_USING_DMA)
static void spi4_rx_dma_irq_handle(void);
static void spi4_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI4 */
-#if defined(BSP_USING_SPI5)
+#if defined(BSP_USING_SPI5) && defined(BSP_SPI5_RX_USING_DMA)
static void spi5_rx_dma_irq_handle(void);
static void spi5_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI5 */
-#if defined(BSP_USING_SPI6)
+#if defined(BSP_USING_SPI6) && defined(BSP_SPI6_RX_USING_DMA)
static void spi6_rx_dma_irq_handle(void);
static void spi6_tx_dma_irq_handle(void);
#endif /* BSP_USING_SPI6 */
@@ -549,6 +549,8 @@ rt_err_t rt_hw_spi_device_attach(const char *bus_name, const char *device_name,
return result;
}
+#if defined(BSP_SPI1_TX_USING_DMA) || defined(BSP_SPI2_TX_USING_DMA) || defined(BSP_SPI4_TX_USING_DMA) || \
+ defined(BSP_SPI4_TX_USING_DMA) || defined(BSP_SPI5_TX_USING_DMA) || defined(BSP_SPI6_TX_USING_DMA)
/**
* @brief Clear DMA transfer complete flag.
* @param dma specific dam witch spi used.
@@ -558,6 +560,7 @@ static void hc32_dma_irq_handle(struct dma_config *dma)
{
DMA_ClearTransCompleteStatus(dma->Instance, (1U << dma->channel));
}
+#endif
#if defined(BSP_USING_SPI1) && defined(BSP_SPI1_RX_USING_DMA)
/**
diff --git a/bsp/hc32/libraries/hc32_drivers/drv_usart.c b/bsp/hc32/libraries/hc32_drivers/drv_usart.c
index 36df63c428..a960418db5 100644
--- a/bsp/hc32/libraries/hc32_drivers/drv_usart.c
+++ b/bsp/hc32/libraries/hc32_drivers/drv_usart.c
@@ -594,6 +594,8 @@ static void hc32_dma_config(struct rt_serial_device *serial, rt_ubase_t flag)
}
}
+#if defined(BSP_UART1_RX_USING_DMA) || defined(BSP_UART2_RX_USING_DMA) || defined(BSP_UART3_RX_USING_DMA) || \
+ defined(BSP_UART4_RX_USING_DMA) || defined(BSP_UART6_RX_USING_DMA) || defined(BSP_UART7_RX_USING_DMA)
static void hc32_uart_dma_rx_irq_handler(struct hc32_uart *uart)
{
struct rt_serial_device *serial;
@@ -638,7 +640,10 @@ static void hc32_uart_rxto_irq_handler(struct hc32_uart *uart)
TMR0_Stop(uart->config->rx_timeout->TMR0_Instance, uart->config->rx_timeout->channel);
USART_ClearStatus(uart->config->Instance, USART_FLAG_RX_TIMEOUT);
}
+#endif
+#if defined(BSP_UART1_TX_USING_DMA) || defined(BSP_UART2_TX_USING_DMA) || defined(BSP_UART3_TX_USING_DMA) || \
+ defined(BSP_UART4_TX_USING_DMA) || defined(BSP_UART6_TX_USING_DMA) || defined(BSP_UART7_TX_USING_DMA)
static void hc32_uart_tc_irq_handler(struct hc32_uart *uart)
{
RT_ASSERT(uart != RT_NULL);
@@ -651,6 +656,7 @@ static void hc32_uart_tc_irq_handler(struct hc32_uart *uart)
}
}
#endif
+#endif
#if defined(BSP_USING_UART1)
static void hc32_uart1_rx_irq_handler(void)