Created
September 2, 2017 20:26
-
-
Save zwlp/bcfda08018c0c80a948a99809fc7cc4e to your computer and use it in GitHub Desktop.
Larger uPyFS for MicroPython on STM32F429 Discovery
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | |
+#define FLASH_MEM_SEG2_START_ADDR (0x08100000) // sector 12 | |
+#define FLASH_MEM_SEG2_NUM_BLOCKS (384) // sectors 12,13,14,15,16,17: 16k+16k+16k+16k+64k+64k(of 128k)=192k | |
#elif defined(STM32F439xx) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment