From 0461f6565bbc1bf0bdd04eaefb374b52f9df7989 Mon Sep 17 00:00:00 2001 From: cjjohn Date: Wed, 5 Aug 2026 06:56:34 +0200 Subject: [PATCH] Fix board definition: VersaPad uses SAMD21G17D, not G18A versapad.json declared samd21g18a (256K flash / 32K RAM) while the linker script, the NVM config addresses (0x1FB00-0x1FFFF, just below the 128K boundary) and versapad_nobl.json all point to the actual chip, a SAMD21G17D (128K flash / 16K RAM). PlatformIO's flash-size check was silently using a ~248K limit instead of the real ~120K budget for the USB-bootloader build variant. --- boards/versapad.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/boards/versapad.json b/boards/versapad.json index ee0f346..6d7eec5 100644 --- a/boards/versapad.json +++ b/boards/versapad.json @@ -7,12 +7,12 @@ "core": "arduino", "variant": "versapad", "cpu": "cortex-m0plus", - "extra_flags": "-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -D__SAMD21G18A__", + "extra_flags": "-DARDUINO_SAMD_ZERO -DARM_MATH_CM0PLUS -D__SAMD21G17D__", "f_cpu": "48000000L", "hwids": [ ["0x239A", "0x0011"] ], - "mcu": "samd21g18a", + "mcu": "samd21g17d", "usb_product": "VersaPad v2", "usb_manufacturer": "Custom" }, @@ -20,8 +20,8 @@ "frameworks": ["arduino"], "name": "VersaPad v2 (USB bootloader)", "upload": { - "maximum_ram_size": 32768, - "maximum_size": 253952, + "maximum_ram_size": 16384, + "maximum_size": 122880, "disable_flushing": true, "native_usb": true, "offset": "0x2000",