This repository was archived by the owner on Mar 7, 2026. It is now read-only.
Fix: hardcode GD32VW553 memory map#2199
Open
ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
Open
Fix: hardcode GD32VW553 memory map#2199ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
ALTracer wants to merge 1 commit intoblackmagic-debug:mainfrom
Conversation
dragonmux
suggested changes
Mar 6, 2026
Member
dragonmux
left a comment
There was a problem hiding this comment.
Paired with what you've shared on Discord this seems reasonable - just needs a small clean-up and then we'll be happy to merge it. Shame that using the FLASHSIZE register won't work! But such are the realities of parts not setting things up right and such..
With the small tweak made, we'll be happy to merge this.
| const uint16_t flash_size = 4096U; | ||
| /* SRAM0/1/2 each 64 KiB, SRAM3 128 KiB (96+32 shared) */ | ||
| const uint16_t ram_size = 320U; | ||
| DEBUG_WARN("Stub for detection of GD32VW553. DBG_ID=0x%x, RAM=%u, flash=%u\n", device_id, ram_size, flash_size); |
Member
There was a problem hiding this comment.
Please drop this warning if you're hard-coding these bits - the line no longer serves a purpose.
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Detailed description
Tested on "LCSC-boards LCKFB-GD32VW553-HMQ6", now that it arrived, via
blackpill-f411ce.Apparently 0x1ffff7e0 reads as 0xFF, so normal autodetection code gets 65536 KiB for each, this is wrong.
User Manual and Datasheet state that there are either 4 MiB or 2 MiB of SiP flash in these parts, and 320 KiB of SRAM (last 32 KiB are "shared" mysteriously, with Wi-Fi or BLE maybe). Let's just go by that. Flash is readable.
Before:
After:
Your checklist for this pull request
Closing issues