summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobert-hh <robert@hammelrath.com>2025-04-15 16:57:53 +0200
committerDamien George <damien@micropython.org>2025-05-07 16:18:07 +1000
commitc22c2c806694dbce55cfe484b1b9e55af33bb950 (patch)
tree783444a9c3f3a2478229ec4943f6f372507c6cca
parentff9e01782b7e0f21d8d085bdc4c917a7faf6c17e (diff)
samd/boards/SAMD_GENERIC_D51xxx: Fix VFS settings for internal flash.
Fixes in this commit: - The wrong loader script was assigned for SAMD_GENERIC_D51X20, causing the VFS block count to be wrong. - Change the VFS block size from 1536 to 2048. With the setting of 1536, writing more that 1536 bytes at once failed. This applies to SAMD_GENERIC_D51X19 and SAMD_GENERIC_D51X20. No other SAMD51 board uses the internal flash for the file system. Signed-off-by: robert-hh <robert@hammelrath.com>
-rw-r--r--ports/samd/boards/SAMD_GENERIC_D51X20/mpconfigboard.mk6
-rw-r--r--ports/samd/mcu/samd51/mpconfigmcu.h2
2 files changed, 3 insertions, 5 deletions
diff --git a/ports/samd/boards/SAMD_GENERIC_D51X20/mpconfigboard.mk b/ports/samd/boards/SAMD_GENERIC_D51X20/mpconfigboard.mk
index ddba3dcbb..b240c2587 100644
--- a/ports/samd/boards/SAMD_GENERIC_D51X20/mpconfigboard.mk
+++ b/ports/samd/boards/SAMD_GENERIC_D51X20/mpconfigboard.mk
@@ -1,13 +1,11 @@
MCU_SERIES = SAMD51
CMSIS_MCU = SAMD51P20A
-LD_FILES = boards/samd51x19a.ld sections.ld
+LD_FILES = boards/samd51x20a.ld sections.ld
TEXT0 = 0x4000
-
# The ?='s allow overriding in mpconfigboard.mk.
# MicroPython settings
# The size of a MCU flash filesystem will be
-# 1008k - MICROPY_HW_CODESIZE - MICROPY_HW_VFSROMSIZE
+# 1008k - MICROPY_HW_CODESIZE
# The default for MICROPY_HW_VFSROMSIZE is 64K
MICROPY_HW_CODESIZE ?= 752K
-MICROPY_HW_VFSROMSIZE ?= 128K
diff --git a/ports/samd/mcu/samd51/mpconfigmcu.h b/ports/samd/mcu/samd51/mpconfigmcu.h
index 831949bab..8cce90b88 100644
--- a/ports/samd/mcu/samd51/mpconfigmcu.h
+++ b/ports/samd/mcu/samd51/mpconfigmcu.h
@@ -23,7 +23,7 @@ unsigned long trng_random_u32(void);
#define MICROPY_FATFS_MAX_SS (4096)
#define MICROPY_FATFS_LFN_CODE_PAGE 437 /* 1=SFN/ANSI 437=LFN/U.S.(OEM) */
-#define VFS_BLOCK_SIZE_BYTES (1536) //
+#define VFS_BLOCK_SIZE_BYTES (2048) //
#ifndef MICROPY_HW_UART_TXBUF
#define MICROPY_HW_UART_TXBUF (1)