Add end-to-end USB flashing for the app firmware via UF2
Adds uf2conv.py (minimal, dependency-free .bin -> .uf2 converter matching bootloader/inc/uf2format.h's block layout) and upload_uf2.py, a PlatformIO upload hook for env:versapad_usb that finds the mounted VERSABOOT volume and copies the converted firmware onto it. env:versapad_usb previously used upload_protocol=sam-ba, the classic Arduino/Atmel protocol -- the actual bootloader speaks UF2/mass storage, not SAM-BA, so that upload path never worked. Switched to upload_protocol=custom with the new hook, and cleaned the now-unused SAM-BA-specific fields out of boards/versapad.json. Verified end to end on real hardware: pio run -e versapad_usb --target upload builds, converts, copies to the VERSABOOT drive, and the bootloader jumps into the freshly written app on its own. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
parent
f60a29137c
commit
d325297063
7 changed files with 210 additions and 32 deletions
|
|
@ -22,13 +22,8 @@
|
|||
"upload": {
|
||||
"maximum_ram_size": 16384,
|
||||
"maximum_size": 120832,
|
||||
"disable_flushing": true,
|
||||
"native_usb": true,
|
||||
"offset": "0x2000",
|
||||
"protocol": "sam-ba",
|
||||
"require_upload_port": true,
|
||||
"use_1200bps_touch": true,
|
||||
"wait_for_upload_port": true
|
||||
"protocol": "custom"
|
||||
},
|
||||
"url": "",
|
||||
"vendor": "Custom"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue