WCH confirms CH32V307 FLASH and RAM sizes are configurable via LinkUtility, but mismatched ld script settings cause mysterious firmware failures. Here's how to keep them in sync.
A developer on the WCH forum reported what looked like a bug:
> "I burned the GPIO and tcpserver examples into my custom board. At first everything worked. Later, burning the tcpserver example stopped working. After debugging, I traced it to the RAM size setting being different between the two examples. Using LinkUtility to reconfigure the RAM setting fixed it. Is this a widespread bug?" WCH's response: This is not a bug — it is a feature you need to understand.A typical CH32V307 project might use:
MEMORY { FLASH (rx) : ORIGIN = 0x00000000, LENGTH = 256K RAM (rwx) : ORIGIN = 0x20000000, LENGTH = 64K }If LinkUtility is set to 192K FLASH / 32K RAM but your ld file says 256K / 64K, the firmware will expect more memory than the MCU is configured to provide. The result is unpredictable behavior that looks like a hardware bug.
The configurability exists because the CH32V307 (and related V3 family devices) share a die family with multiple memory options. Rather than fixed-fuse memory sizes, WCH uses a software-configurable approach that lets the same silicon serve multiple product tiers. This is cost-efficient but places the synchronization burden on the developer.
If your CH32V307 firmware works in one project but fails in another, or stops working after flashing a different example, check the FLASH/RAM configuration in WCH-LinkUtility before assuming a hardware bug. The fix is usually a 30-second config change.