newaetech / sonata-rp2040

rp2040 firmware for Sonata
BSD 3-Clause "New" or "Revised" License
3 stars 3 forks source link

Use UF2 Block Count to Determine Flash Prog Location #10

Closed alex-dewar closed 3 months ago

alex-dewar commented 5 months ago

Some OS's (plus maybe some differences in file browsers?) send data out of order. Should just use UF2 block count to determine where to write in flash instead of order the data is sent in.

Basic idea will be to erase all necessary flash when we get the "first" (first one we get, not block 0), then write. Only potential hangup will be if the OS gets mad at the large delay at the beginning, since flash erases take a relatively long time.