ch32v003fun
ch32v003fun copied to clipboard
Configurable RAM sizes for V20x, V30x
The linker script
https://github.com/cnlohr/ch32v003fun/blob/6c14912e79adf9097d46c3f4688da3b567d64d6c/ch32v003fun/ch32v003fun.ld#L31-L40
for V30x only gives the "256K Flash + 64K RAM" and "128K Flash + 32K RAM" option. This is however wrong: The 128K Flash option doesn't exist naturally. The options for 30x are
And for 20x
Through invocation of the blackest dark magic I've ever seen, flash cells become RAM cells, and their sum is a constant.
Also see https://github.com/Community-PIO-CH32V/platform-ch32v/issues/20 and https://github.com/Community-PIO-CH32V/platform-ch32v/issues/17#issuecomment-1446040078
What I'm specifically saying is that I think the linker script and Makefile is wrong by deducing the "one right" memory sizes only through the chip's name / package name, when in fact, some chips are more freely configurable.