Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New platform: WeActStudio.BluePill-Plus-GD32 #2071

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ALTracer
Copy link
Contributor

@ALTracer ALTracer commented Feb 9, 2025

Detailed description

  • This is a whole new cleaned up platform.
  • The existing problems are mismatching LED pins and incomplete mappings of board features between stlink/swlink and bluepillplus. In-tree platforms default to 72 MHz and do not leverage full potential of Gigadevices. Unmapping own SWJ-DP is not always acceptable, and stlink pinout is just weird.
  • This PR solves that by providing all necessary bindings in a dedicated platform, with chip detection and PLL configuration.

I do not expect this to be merged, because in-tree -Dprobe=bluepill already does provide some functionality. I do not implement vanilla PC13 bluepills, it's impossible for me to discern these from bluepillplus. This platform has feature parity with blackpill-f4, except I'm dissatisfied with its USBOTG-FS DWC2 bugs.
Choice of USART for Aux and SWO was influenced by existing 2x128 aux_serial DMA ping-pong buffers, which are insufficient for 1024 byte Zmodem packet operation I need in DUT firmware. So SWO is faster for burst operation. When that's refactored, I'll swap them back such that 6Mbaud VCP is possible.

TODO: I'd like to use platform_ident to indicate autodetection results, and to leverage meson options to pick linkerscripts which influence flash size for drivers and RAM size for heap/buffers/SWO.

Your checklist for this pull request

Closing issues

* Uses PB2 LED, USB FS device with external 1.5k pullup
* BMD bootloader also uses PA0 button and boot magic flags
* Rely on DBGMCU_IDCODE and SCB_CPUID
* WeActStudio.BluePill-Plus boards have a DNF SOIC-8
  footprint for 25-series SPI NOR flash, wired to PA4/5/6/7.
* Add the pin mappings regardless of the platform flavour.
@dragonmux dragonmux added this to the v2.1 release milestone Feb 9, 2025
@dragonmux dragonmux added the Foreign Host Board Non Native hardware to runing Black Magic firmware on label Feb 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Foreign Host Board Non Native hardware to runing Black Magic firmware on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants