Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion bsp/hc32/.clang-format-ignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
# clang-format ignore file
# clang-format ignore file
/libraries/hc32_drivers/
*/rtconfig.h
2 changes: 2 additions & 0 deletions bsp/hc32/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 系列** | |
Expand Down
2 changes: 1 addition & 1 deletion bsp/hc32/ev_hc32f334_lqfp64/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bsp/hc32/ev_hc32f334_lqfp64/board/config/mcan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions bsp/hc32/ev_hc32f334_lqfp64/board/config/pm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion bsp/hc32/ev_hc32f334_lqfp64/rtconfig.h

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rtconfig.h不要进行格式化,保持env生成的格式即可,然后也可以添加到忽略格式化脚本中

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

好的,谢谢提醒,rtconfig.h文件已恢复,格式化脚本已忽略rtconfig.h文件

Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion bsp/hc32/ev_hc32f448_lqfp80/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions bsp/hc32/ev_hc32f448_lqfp80/board/config/mcan_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 1 addition & 6 deletions bsp/hc32/ev_hc32f448_lqfp80/board/config/pm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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
*/
Expand Down
2 changes: 1 addition & 1 deletion bsp/hc32/ev_hc32f460_lqfp100_v2/.config
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions bsp/hc32/ev_hc32f460_lqfp100_v2/board/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
5 changes: 1 addition & 4 deletions bsp/hc32/ev_hc32f460_lqfp100_v2/board/config/pm_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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
*/
Expand Down
9 changes: 0 additions & 9 deletions bsp/hc32/ev_hc32f460_lqfp100_v2/board/ports/usb_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion bsp/hc32/ev_hc32f460_lqfp100_v2/rtconfig.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
19 changes: 14 additions & 5 deletions bsp/hc32/ev_hc32f467_lqfp144/project.ewp
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m4</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\phy</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\smp_call</state>
<state>$PROJ_DIR$\board</state>
<state>$PROJ_DIR$\board\ports</state>
Expand All @@ -344,6 +343,7 @@
<state>$PROJ_DIR$\packages\hc32-f4-cmsis-latest\Include</state>
<state>$PROJ_DIR$\packages\hc32-f4-cmsis-latest\Device\HDSC\hc32f467\Include</state>
<state>$PROJ_DIR$\..\platform\tca9539</state>
<state>$PROJ_DIR$\..\tests</state>
<state>$PROJ_DIR$\..\..\..\components\net\utest</state>
</option>
<option>
Expand Down Expand Up @@ -1319,7 +1319,6 @@
<state>$PROJ_DIR$\..\..\..\libcpu\arm\common</state>
<state>$PROJ_DIR$\..\..\..\libcpu\arm\cortex-m4</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\include</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\phy</state>
<state>$PROJ_DIR$\..\..\..\components\drivers\smp_call</state>
<state>$PROJ_DIR$\board</state>
<state>$PROJ_DIR$\board\ports</state>
Expand All @@ -1340,6 +1339,7 @@
<state>$PROJ_DIR$\packages\hc32-f4-cmsis-latest\Include</state>
<state>$PROJ_DIR$\packages\hc32-f4-cmsis-latest\Device\HDSC\hc32f467\Include</state>
<state>$PROJ_DIR$\..\platform\tca9539</state>
<state>$PROJ_DIR$\..\tests</state>
<state>$PROJ_DIR$\..\..\..\components\net\utest</state>
</option>
<option>
Expand Down Expand Up @@ -2090,9 +2090,6 @@
<file>
<name>$PROJ_DIR$\..\libraries\hc32_drivers\drv_irq.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\libraries\hc32_drivers\drv_soft_i2c.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\libraries\hc32_drivers\drv_tmr_capture.c</name>
</file>
Expand Down Expand Up @@ -2298,6 +2295,18 @@
<name>$PROJ_DIR$\..\platform\tca9539\tca9539.c</name>
</file>
</group>
<group>
<name>Tests</name>
<file>
<name>$PROJ_DIR$\..\tests\test_uart_v1.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\tests\test_i2c.c</name>
</file>
<file>
<name>$PROJ_DIR$\..\tests\test_gpio.c</name>
</file>
</group>
<group>
<name>utc_UTest</name>
</group>
Expand Down
Loading
Loading