ch32-rs / wlink

An open source WCH-Link library/command line tool written in Rust.
Apache License 2.0
157 stars 26 forks source link

Program the processor without erasing whole chip? #17

Closed KurtE closed 1 year ago

KurtE commented 1 year ago

Can wlink program a chip like the CH32V308, without doing a full chip erasure? And if not, could it be done?

Why, if the chip lets say has 256KB of flash and my program maybe use 64KB, In some case I might want to use some of the remaining flash as a file system, probably using LittleFS. Likewise I might want to reserve some portion of flash to emulate an EEPROM.

Possible?

Thanks Kurt

Schildkroet commented 1 year ago

AFAIK wlink only programms the given address+length

KurtE commented 1 year ago

Thanks, I will double check.
... Updated - it appears like you are right. It looks like the region of memory was not touched.

Now mostly using OpenOCD WCH version to update the chip and that appears to wipe the whole chip. Not sure if something in the script controls it or not... But that is a different project to look at.

Thanks again