Skip to content

Instantly share code, notes, and snippets.

@zwlp
zwlp / uPyFS.patch
Created September 2, 2017 20:26
Larger uPyFS for MicroPython on STM32F429 Discovery
diff --git a/stmhal/storage.c b/stmhal/storage.c
index d0f27828..6097eece 100644
--- a/stmhal/storage.c
+++ b/stmhal/storage.c
@@ -73,6 +73,10 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
#define FLASH_SECTOR_SIZE_MAX (0x10000) // 64k max, size of CCM
#define FLASH_MEM_SEG1_START_ADDR (0x08004000) // sector 1
#define FLASH_MEM_SEG1_NUM_BLOCKS (224) // sectors 1,2,3,4: 16k+16k+16k+64k=112k
+// After flashing this you may need to do a factory reset to force
+// uPy to make use of the increased space.