gd32: add GD32F303 and GD32E230 support - #191
Draft
sendu2wfdx wants to merge 4 commits into
Draft
sendu2wfdx wants to merge 4 commits into
sendu2wfdx wants to merge 4 commits into
Conversation
Signed-off-by: Xiaoyue Cui <2508041672@qq.com>
sendu2wfdx
marked this pull request as draft
September 9, 2026 10:46
Signed-off-by: Xiaoyue Cui <2508041672@qq.com>
Signed-off-by: Xiaoyue Cui <2508041672@qq.com>
sendu2wfdx
force-pushed
the
upstream-gd32-v1
branch
from
September 29, 2026 04:11
d79d022 to
e220709
Compare
Signed-off-by: Xiaoyue Cui <2508041672@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add GD32F303 and GD32E230 support through Katapult's existing
src/stm32/platform instead of maintaining a parallel GD32 backend.GD32F303 reuses the STM32F1 GPIO, serial, USB, CAN, chip-ID, flash, and startup paths, with localized support for the Cortex-M4 core and 120 MHz GD32 clock/power behavior. GD32E230 also uses
src/stm32/, sharing the common GPIO and STM32F0-style serial paths while keeping localized clock, timer, and flash programming code.To match the existing STM32 menu style, the processor entries and exported MCU constants use the family names
GigaDevice GD32F303/gd32f303andGigaDevice GD32E230/gd32e230. GD32F303 uses a conservative xB link profile (128 KiB Flash, 32 KiB RAM), which runs on the validated xB and xC parts and leaves additional memory unused on larger densities. GD32E230 targets the validated x8 profile (64 KiB Flash, 8 KiB RAM). Internal use of an STM32F103 compatibility header does not change the reported model.Supported models and validation status
Hardware validated:
The same conservative GD32F303 build profile is expected to run on xE devices, but xE has not been hardware tested. GD32E230x6 is not advertised because this series entry intentionally uses the validated x8 memory profile.
On all three production boards the contributor confirmed Katapult entry, firmware upload, and Klipper application jump over the internal 230400-baud serial links. The separate GD32F303CCT6 development board validates all three transport implementations.
Build validation
Built from current Katapult upstream with the Arm GNU toolchain:
Generated ELFs export
gd32f303orgd32e230; the build system privately maps GD32F303 to the compatible STM32F103 CMSIS target.Third-party material
The GD32E23x device headers are derived from
CrealityOfficial/Ender-3_V3_KE_Klippercommita63fb1a71672b91b505e0bda68fae2ede49f1168, pathlib/gd32e23x/. They identify themselves as GigaDevice GD32E23x V1.1.0 (2020-12-12) and retain GigaDevice's BSD-3-Clause notice.core_cm23.hmatches Arm CMSIS 5.7.0 commita65b7c9a3e6502127fdb80eb288d8cbdf251a6f4and retains Apache-2.0 licensing.GD32F303 does not add a separate vendor-header tree; it uses Katapult's existing STM32F1 CMSIS definitions internally.
Review notes
This candidate excludes product-specific configuration, private CI, Windows-only helper scripts, GD32F425 support, and the experimental USB double-buffer transmit path.