adafruit / tinyuf2

UF2 bootloader based on TinyUSB for embedded devices such as ESP32S2, STM32F4 and iMX RT10xx
MIT License
302 stars 165 forks source link

Initial support for ch32v20x (not fully working yet) #389

Closed hathach closed 1 month ago

hathach commented 1 month ago

Description of Change

Initial support for ch32v20x, build and run, able to enumerate as MSC and written to flash. Double tap dectection work. However, @ladyada it is not fully functional since jump to app not working yet (hopefully other can help). But we made an good progress, will wrap this up for now, since it already takes quite a few days, will come back after doing other pending work (pr/issue).

Ch32v20x current state:

   text    data     bss     dec     hex filename
  13660     724    9080   23464    5ba8 _build/ch32v203_r0_1v0/tinyuf2-ch32v203_r0_1v0.elf

Lots of other Tinyuf2 refactor

ladyada commented 1 month ago

ok thanks. it is a little unclear about flash memory. some folks say theres 224K on a variant

https://cpldcpu.com/2024/05/01/decapsulating-the-ch32v203-reveals-a-separate-flash-die/

hathach commented 1 month ago

oh, that is an interesting read, the official doc only mentnion max 64KB for v20x. I will give it a try to see if that is possible :)

image