I have a really strange problem that made me pull out my hair. I'm working on RP2040 project where I want to ship single *.uf2 file which will write application code + put some additional data in a different memory region (0x80000 - 0x8E800).
I wrote my own application that generates UF2 file for flashing both application and payload. When I drag and drop the file, it saves to virtual drive and unmounts. Application code is properly flashed because the code works (confirmed by blinking LED etc.) but the payload region (0x80000 - 0x8E800) is corrupted. It looks like a lot of UF2 blocks were not written at all.
Check hex dump of my UF2 file and payload memory region (0x80000 - 0x8E800): https://gist.github.com/webhdx/c7e8da52 ... 07e3bfcad2
Notice empty (FF's) areas between actual correct data blocks. It's always 768 bytes (3 UF2 blocks) correctly flashed then 3328 bytes missing (13 UF2 blocks). There is some more data correctly written in the end of the memory region: 2816 bytes (11 UF2 blocks).
Now It gets really weird - when I flash the same file using picotool via
I've tested Mac, Windows and Linux and 2 different Pico boards and the result was always the same.
I wrote my own application that generates UF2 file for flashing both application and payload. When I drag and drop the file, it saves to virtual drive and unmounts. Application code is properly flashed because the code works (confirmed by blinking LED etc.) but the payload region (0x80000 - 0x8E800) is corrupted. It looks like a lot of UF2 blocks were not written at all.
Check hex dump of my UF2 file and payload memory region (0x80000 - 0x8E800): https://gist.github.com/webhdx/c7e8da52 ... 07e3bfcad2
Notice empty (FF's) areas between actual correct data blocks. It's always 768 bytes (3 UF2 blocks) correctly flashed then 3328 bytes missing (13 UF2 blocks). There is some more data correctly written in the end of the memory region: 2816 bytes (11 UF2 blocks).
Now It gets really weird - when I flash the same file using picotool via
everything is flashed correctly. Another UF2 file that writes only payload memory region is correctly flashed via file drag and drop method.picotool load ~/Downloads/pico_full.uf2
I've tested Mac, Windows and Linux and 2 different Pico boards and the result was always the same.
Statistics: Posted by maciejko — Tue Aug 06, 2024 6:34 pm