newaetech / sonata-rp2040

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

Use UF2 Block Count to Determine Flash Prog Location #10

Open alex-dewar opened 1 month ago

alex-dewar commented 1 month 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.