jacobrosenthal / hf2-rs

Microsoft HF2 HID Flashing Format for UF2 Bootloaders
49 stars 14 forks source link

cargo hf2 sometimes writes pages that come out as all FFs #22

Closed fionawhim closed 3 years ago

fionawhim commented 3 years ago

Mac OS X 10.14.6. Adafruit PyPortal (SAMD51) running v3.10.0 of their bootloader.

Looking at a savebin dump between a version of the code loaded via JLinkExe and the version loaded with cargo hf2, the latter will occassionally have 1 or more pages that are all FFs.

Screen Shot 2020-07-24 at 11 04 08 PM

Log of cargo hf2 loading a program: hf2_debug.log

Log of a verify step failing, run directly after using cargo hf2 to load the program:

verify.log

(Verification done with: cargo objcopy --example pyportal-ap --features="pyportal-examples" -- -O binary pyportal-ap.bin hf2 -v 0x239a verify -f pyportal-ap.bin -a 0x4000)

(Seen when compiling examples in the wifinina-rs repo, but that code doesn’t appear to be special in a way that would trigger this.)