diff --git a/bsp/hc32/.clang-format-ignore b/bsp/hc32/.clang-format-ignore index d3ecbb8d5b02..1d3f75eda21a 100644 --- a/bsp/hc32/.clang-format-ignore +++ b/bsp/hc32/.clang-format-ignore @@ -1,2 +1,3 @@ -# clang-format ignore file +# clang-format ignore file /libraries/hc32_drivers/ +*/rtconfig.h diff --git a/bsp/hc32/README.md b/bsp/hc32/README.md index 523387d7e16a..afc6c509cdec 100644 --- a/bsp/hc32/README.md +++ b/bsp/hc32/README.md @@ -11,8 +11,10 @@ HC32 系列 BSP 目前支持情况如下表所示: | **F4 系列** | | | [ev_hc32f448_lqfp80](ev_hc32f448_lqfp80) | 小华 官方 EV_F448_LQ80 开发板 | | [ev_hc32f460_lqfp100_v2](ev_hc32f460_lqfp100_v2) | 小华 官方 EV_F460_LQ100_V2 开发板 | +| [ev_hc32f467_lqfp144](ev_hc32f467_lqfp176) | 小华 官方 EV_F467_LQ144 开发板 | | [ev_hc32f472_lqfp100](ev_hc32f472_lqfp100) | 小华 官方 EV_F472_LQ100 开发板 | | [ev_hc32f4a0_lqfp176](ev_hc32f4a0_lqfp176) | 小华 官方 EV_F4A0_LQ176 开发板 | +| [ev_hc32f4a2_lqfp176](ev_hc32f4a2_lqfp176) | 小华 官方 EV_F4A0_LQ176 开发板 | | [lckfb-hc32f4a0-lqfp100](lckfb-hc32f4a0-lqfp100) | 立创开发板 天空星-HC32F4A0PITB | | [ev_hc32f4a8_lqfp176](ev_hc32f4a8_lqfp176) | 小华 官方 EV_F4A8_LQ176 开发板 | | **M1 系列** | | diff --git a/bsp/hc32/ev_hc32f334_lqfp64/.config b/bsp/hc32/ev_hc32f334_lqfp64/.config index 8c1d2ea196bf..62b9171d8479 100644 --- a/bsp/hc32/ev_hc32f334_lqfp64/.config +++ b/bsp/hc32/ev_hc32f334_lqfp64/.config @@ -106,7 +106,7 @@ # end of rt_strnlen options # end of klibc options -CONFIG_RT_NAME_MAX=12 +CONFIG_RT_NAME_MAX=24 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_NANO is not set # CONFIG_RT_USING_SMART is not set diff --git a/bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h b/bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h index c3e8d7f52a96..756535af918b 100644 --- a/bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h +++ b/bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h @@ -24,9 +24,9 @@ extern "C" { For the message RAM: 1. MCAN1 and MCAN2 share 2048 bytes message RAM 2. User can modify the definitions of filter number, Rx FIFO number, Tx FIFO number. - 3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default. + 3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default. If only one FIFO is needed, use Rx FIFO0. If Rx FIFO1 is needed, define it's macro between 1 and 64, - and pay attention the total size of meesage RAM that to be allocated. + and pay attention the total size of message RAM that to be allocated. */ #ifdef RT_CAN_USING_CANFD diff --git a/bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h b/bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h index 4357f8e11304..0fe614827bc0 100644 --- a/bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h +++ b/bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h @@ -6,6 +6,7 @@ * Change Logs: * Date Author Notes * 2024-02-20 CDT first version + * 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer */ #ifndef __PM_CONFIG_H__ @@ -20,12 +21,6 @@ extern "C" { #ifdef BSP_USING_PM extern void rt_hw_board_pm_sysclk_cfg(uint8_t run_mode); -#ifndef PM_TICKLESS_TIMER_ENABLE_MASK -#define PM_TICKLESS_TIMER_ENABLE_MASK \ - ((1UL << PM_SLEEP_MODE_IDLE) | \ - (1UL << PM_SLEEP_MODE_DEEP)) -#endif - /** * @brief run mode config @ref pm_run_mode_config structure */ diff --git a/bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h b/bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h index 7935d7a9bdac..663562a2d2be 100644 --- a/bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h +++ b/bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h @@ -61,7 +61,7 @@ /* end of rt_strnlen options */ /* end of klibc options */ -#define RT_NAME_MAX 12 +#define RT_NAME_MAX 24 #define RT_CPUS_NR 1 #define RT_ALIGN_SIZE 8 #define RT_THREAD_PRIORITY_32 diff --git a/bsp/hc32/ev_hc32f448_lqfp80/.config b/bsp/hc32/ev_hc32f448_lqfp80/.config index 562533d9e4ed..c2e2bc987de8 100644 --- a/bsp/hc32/ev_hc32f448_lqfp80/.config +++ b/bsp/hc32/ev_hc32f448_lqfp80/.config @@ -106,7 +106,7 @@ # end of rt_strnlen options # end of klibc options -CONFIG_RT_NAME_MAX=12 +CONFIG_RT_NAME_MAX=24 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_NANO is not set # CONFIG_RT_USING_SMART is not set diff --git a/bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h b/bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h index 0c9bb9263a3b..b79ab4773ddc 100644 --- a/bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h +++ b/bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h @@ -25,9 +25,9 @@ extern "C" { For the message RAM: 1. MCAN1 and MCAN2 share 2048 bytes message RAM 2. User can modify the definitions of filter number, Rx FIFO number, Tx FIFO number. - 3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default. + 3. MCAN has two configurable Receive FIFOs, Rx FIFO0 and Rx FIFO1. There use Rx FIFO0 only by default. If only one FIFO is needed, use Rx FIFO0. If Rx FIFO1 is needed, define it's macro between 1 and 64, - and pay attention the total size of meesage RAM that to be allocated. + and pay attention the total size of message RAM that to be allocated. */ #ifdef RT_CAN_USING_CANFD diff --git a/bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h b/bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h index 8dc37b7f23cb..1e5b5c9a8ee5 100644 --- a/bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h +++ b/bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h @@ -7,6 +7,7 @@ * Change Logs: * Date Author Notes * 2024-02-20 CDT first version + * 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer */ #ifndef __PM_CONFIG_H__ @@ -21,12 +22,6 @@ extern "C" { #ifdef BSP_USING_PM extern void rt_hw_board_pm_sysclk_cfg(uint8_t run_mode); -#ifndef PM_TICKLESS_TIMER_ENABLE_MASK -#define PM_TICKLESS_TIMER_ENABLE_MASK \ - ((1UL << PM_SLEEP_MODE_IDLE) | \ - (1UL << PM_SLEEP_MODE_DEEP)) -#endif - /** * @brief run mode config @ref pm_run_mode_config structure */ diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/.config b/bsp/hc32/ev_hc32f460_lqfp100_v2/.config index 2791e070dccf..c0e748d85145 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/.config +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/.config @@ -106,7 +106,7 @@ # end of rt_strnlen options # end of klibc options -CONFIG_RT_NAME_MAX=12 +CONFIG_RT_NAME_MAX=24 # CONFIG_RT_USING_ARCH_DATA_TYPE is not set # CONFIG_RT_USING_NANO is not set # CONFIG_RT_USING_SMART is not set diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig index 08a05019a7da..257c59605189 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig @@ -407,6 +407,7 @@ menu "On-chip Peripheral Drivers" bool "Enable SDIO" default n select RT_USING_SDIO + select RT_USING_DFS if BSP_USING_SDIO config BSP_USING_SDIO1 bool "Enable SDIO1" diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h index 4ce382797ebc..3b81defb712c 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h @@ -8,6 +8,7 @@ * 2023-05-12 CDT first version * 2024-06-13 CDT disable pm tickless timer * delete member u16ExBusHold of PM_SLEEP_DEEP_CFG + * 2026-06-24 CDT delete PM_TICKLESS_TIMER_ENABLE_MASK for unsupport pm tickless timer */ #ifndef __PM_CONFIG_H__ @@ -22,10 +23,6 @@ extern "C" { #ifdef BSP_USING_PM extern void rt_hw_board_pm_sysclk_cfg(uint8_t run_mode); -#ifndef PM_TICKLESS_TIMER_ENABLE_MASK -#define PM_TICKLESS_TIMER_ENABLE_MASK (0UL) -#endif - /** * @brief run mode config @ref pm_run_mode_config structure */ diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h index 91c6a46fb488..d6d89441ad70 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h @@ -295,13 +295,4 @@ #define CONFIG_USBHOST_PIPE_NUM 10 #endif - -#ifndef usb_phyaddr2ramaddr -#define usb_phyaddr2ramaddr(addr) (addr) -#endif - -#ifndef usb_ramaddr2phyaddr -#define usb_ramaddr2phyaddr(addr) (addr) -#endif - #endif diff --git a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h index cffd14a0365c..c72cedfb2c22 100644 --- a/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h +++ b/bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h @@ -61,7 +61,7 @@ /* end of rt_strnlen options */ /* end of klibc options */ -#define RT_NAME_MAX 12 +#define RT_NAME_MAX 24 #define RT_CPUS_NR 1 #define RT_ALIGN_SIZE 8 #define RT_THREAD_PRIORITY_32 diff --git a/bsp/hc32/ev_hc32f467_lqfp144/project.ewp b/bsp/hc32/ev_hc32f467_lqfp144/project.ewp index bf00eabf9962..5470d6ac01ee 100644 --- a/bsp/hc32/ev_hc32f467_lqfp144/project.ewp +++ b/bsp/hc32/ev_hc32f467_lqfp144/project.ewp @@ -323,7 +323,6 @@ $PROJ_DIR$\..\..\..\libcpu\arm\common $PROJ_DIR$\..\..\..\libcpu\arm\cortex-m4 $PROJ_DIR$\..\..\..\components\drivers\include - $PROJ_DIR$\..\..\..\components\drivers\phy $PROJ_DIR$\..\..\..\components\drivers\smp_call $PROJ_DIR$\board $PROJ_DIR$\board\ports @@ -344,6 +343,7 @@ $PROJ_DIR$\packages\hc32-f4-cmsis-latest\Include $PROJ_DIR$\packages\hc32-f4-cmsis-latest\Device\HDSC\hc32f467\Include $PROJ_DIR$\..\platform\tca9539 + $PROJ_DIR$\..\tests $PROJ_DIR$\..\..\..\components\net\utest