diff options
| author | alt-0191 <[email protected]> | 2026-02-26 21:10:04 +0800 |
|---|---|---|
| committer | alt-0191 <[email protected]> | 2026-03-18 15:23:28 +0800 |
| commit | 20fdaeef6ca8853002087927e460c0b6339049cd (patch) | |
| tree | 08266aa2573d05e50c58bdefe6ec10f8e0bf0ec1 | |
| parent | 6b0d20d70dbe0462fc89a92ab0c0ca04a9c625d0 (diff) | |
ch58x: fix MCU macro naming and add get_deps/boards entries
| -rw-r--r-- | docs/reference/boards.rst | 1 | ||||
| -rw-r--r-- | hw/bsp/ch58x/family.cmake | 2 | ||||
| -rw-r--r-- | hw/bsp/ch58x/family.mk | 2 | ||||
| -rw-r--r-- | src/common/tusb_mcu.h | 4 | ||||
| -rw-r--r-- | src/tusb_option.h | 4 | ||||
| -rwxr-xr-x | tools/get_deps.py | 3 |
6 files changed, 11 insertions, 5 deletions
diff --git a/docs/reference/boards.rst b/docs/reference/boards.rst index ec91b343e..517c479fe 100644 --- a/docs/reference/boards.rst +++ b/docs/reference/boards.rst @@ -368,4 +368,5 @@ ch32v203g_r0_1v0 CH32V203G-R0-1v0 ch32v20x https://github.com/openwch/ch32v20 nanoch32v203 nanoCH32V203 ch32v20x https://github.com/wuxx/nanoCH32V203 ch32v307v_r1_1v0 CH32V307V-R1-1v0 ch32v30x https://github.com/openwch/ch32v307/tree/main/SCHPCB/CH32V307V-R1-1v0 nanoch32v305 nanoCH32V305 ch32v30x https://github.com/wuxx/nanoCH32V305 +yd-ch582m yd-ch582m ch58x http://vcc-gnd.com ================ ================ ======== ===================================================================== ====== diff --git a/hw/bsp/ch58x/family.cmake b/hw/bsp/ch58x/family.cmake index 9ad158662..64b534eb1 100644 --- a/hw/bsp/ch58x/family.cmake +++ b/hw/bsp/ch58x/family.cmake @@ -64,7 +64,7 @@ endfunction() #------------------------------------ function(family_configure_example TARGET RTOS) family_configure_common(${TARGET} ${RTOS}) - family_add_tinyusb(${TARGET} OPT_MCU_CH582) + family_add_tinyusb(${TARGET} OPT_MCU_CH58X) target_sources(${TARGET} PUBLIC ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/family.c diff --git a/hw/bsp/ch58x/family.mk b/hw/bsp/ch58x/family.mk index 41eb36c84..566842f93 100644 --- a/hw/bsp/ch58x/family.mk +++ b/hw/bsp/ch58x/family.mk @@ -13,7 +13,7 @@ CFLAGS += \ -mno-save-restore \ -fmessage-length=0 \ -fsigned-char \ - -DCFG_TUSB_MCU=OPT_MCU_CH582 \ + -DCFG_TUSB_MCU=OPT_MCU_CH58X \ -DCFG_TUD_WCH_USBIP_USBFS=1 \ -DFREQ_SYS=60000000 \ diff --git a/src/common/tusb_mcu.h b/src/common/tusb_mcu.h index 02364d580..dfeae3fbb 100644 --- a/src/common/tusb_mcu.h +++ b/src/common/tusb_mcu.h @@ -629,8 +629,8 @@ #define TUP_DCD_EDPT_CLOSE_API #endif -#elif TU_CHECK_MCU(OPT_MCU_CH582) - // CH58x has 2 independent USBFS controllers with merged EP registers, FS only. +#elif TU_CHECK_MCU(OPT_MCU_CH58X) + // CH582/583 has 2 independent USBFS controllers with merged EP registers, FS only. #define TUP_USBIP_WCH_CH58X #ifndef CFG_TUD_WCH_USBIP_USBFS diff --git a/src/tusb_option.h b/src/tusb_option.h index 50998613a..699e3d44d 100644 --- a/src/tusb_option.h +++ b/src/tusb_option.h @@ -193,7 +193,9 @@ #define OPT_MCU_CH32F20X 2210 ///< WCH CH32F20x #define OPT_MCU_CH32V20X 2220 ///< WCH CH32V20X #define OPT_MCU_CH32V103 2230 ///< WCH CH32V103 -#define OPT_MCU_CH58X 2240 ///< WCH CH582/CH583 +#define OPT_MCU_CH58X 2240 ///< WCH CH58x series (CH582/CH583) +#define OPT_MCU_CH582 OPT_MCU_CH58X ///< alias +#define OPT_MCU_CH583 OPT_MCU_CH58X ///< alias // NXP LPC MCX #define OPT_MCU_MCXN9 2300 ///< NXP MCX N9 Series diff --git a/tools/get_deps.py b/tools/get_deps.py index 25b85ac3b..eb239bf34 100755 --- a/tools/get_deps.py +++ b/tools/get_deps.py @@ -241,6 +241,9 @@ deps_optional = { 'hw/mcu/wch/ch32f20x': ['https://github.com/openwch/ch32f20x.git', '77c4095087e5ed2c548ec9058e655d0b8757663b', 'ch32f20x'], + 'hw/mcu/wch/ch58x': ['https://github.com/openwch/ch583.git', + 'bd508ad7ceed48377619837051412a651952857f', + 'ch58x'], 'hw/mcu/artery/at32f403a_407': ['https://github.com/ArteryTek/AT32F403A_407_Firmware_Library.git', 'f2cb360c3d28fada76b374308b8c4c61d37a090b', 'at32f403a_407'], |
