forked from jappel/VersaMCU
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>
30 lines
702 B
JSON
30 lines
702 B
JSON
{
|
|
"build": {
|
|
"arduino": {
|
|
"ldscript": "flash_with_bootloader.ld",
|
|
"variant": "versapad"
|
|
},
|
|
"core": "arduino",
|
|
"variant": "versapad",
|
|
"cpu": "cortex-m0plus",
|
|
"extra_flags": "-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -D__SAMD21G18A__",
|
|
"f_cpu": "48000000L",
|
|
"hwids": [
|
|
["0x239A", "0x0042"]
|
|
],
|
|
"mcu": "samd21g17d",
|
|
"usb_product": "VersaPad v2",
|
|
"usb_manufacturer": "Custom"
|
|
},
|
|
"connectivity": ["usb"],
|
|
"frameworks": ["arduino"],
|
|
"name": "VersaPad v2 (USB bootloader)",
|
|
"upload": {
|
|
"maximum_ram_size": 16384,
|
|
"maximum_size": 120832,
|
|
"offset": "0x2000",
|
|
"protocol": "custom"
|
|
},
|
|
"url": "",
|
|
"vendor": "Custom"
|
|
}
|