File tree Expand file tree Collapse file tree 6 files changed +25
-13
lines changed Expand file tree Collapse file tree 6 files changed +25
-13
lines changed Original file line number Diff line number Diff line change 14
14
#define MICROPY_HW_ENABLE_SERVO (1)
15
15
#define MICROPY_HW_HAS_UGFX (1)
16
16
#define MICROPY_HW_HAS_CC3100 (1)
17
+ #define MICROPY_HW_L4_512_FS (1)
17
18
18
19
#define MICROPY_BOARD_EARLY_INIT STM32L475_EMFBADGE_board_early_init
19
20
void STM32L475_EMFBADGE_board_early_init (void );
Original file line number Diff line number Diff line change 14
14
#define MICROPY_HW_ENABLE_SERVO (1)
15
15
#define MICROPY_HW_HAS_UGFX (1)
16
16
#define MICROPY_HW_HAS_CC3100 (1)
17
+ #define MICROPY_HW_L4_512_FS (1)
17
18
18
19
#define MICROPY_BOARD_EARLY_INIT STM32L476_EMFBADGE_board_early_init
19
20
void STM32L476_EMFBADGE_board_early_init (void );
Original file line number Diff line number Diff line change 5
5
/* Specify the memory areas */
6
6
MEMORY
7
7
{
8
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
9
- FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
10
- FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
11
- FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0080000 /* Sector starting @ 64 */
12
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
13
- SRAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
8
+ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x0100000 /* entire flash, 1 MiB */
9
+ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
10
+ FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
11
+ FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0080000 /* Sector starting @ 64 */
12
+ FLASH_FS2 (r) : ORIGIN = 0x080A0000, LENGTH = 0x0060000 /* Sector starting @ 320 (2K each = 384 KiB) */
13
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x0018000 /* 96K */
14
+ SRAM2_FS_BUF (xrw) : ORIGIN = 0x10000000, LENGTH = 0x0000800 /* 2K, do not touch used directly by storage.c */
15
+ SRAM2 (xrw) : ORIGIN = 0x10000800, LENGTH = 0x0007800 /* 30K */
14
16
}
15
17
16
18
ENTRY (Reset_Handler )
Original file line number Diff line number Diff line change 10
10
FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
11
11
FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0060000 /* Sector starting @ 64 */
12
12
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
13
- SRAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
13
+ SRAM2_FS_BUF (xrw) : ORIGIN = 0x10000000, LENGTH = 0x0000800 /* 2K, do not touch used directly by storage.c */
14
+ SRAM2 (xrw) : ORIGIN = 0x10000800, LENGTH = 0x0007800 /* 30K */
14
15
}
15
16
16
17
ENTRY (Reset_Handler )
Original file line number Diff line number Diff line change 5
5
/* Specify the memory areas */
6
6
MEMORY
7
7
{
8
- FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K
9
- FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
10
- FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
11
- FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0080000 /* Sector starting @ 64 */
12
- RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 96K
13
- SRAM2 (xrw) : ORIGIN = 0x10000000, LENGTH = 32K
8
+ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 0x0100000 /* entire flash, 1 MiB */
9
+ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 0x0000800 /* sector 0, 2 KiB */
10
+ FLASH_FS (r) : ORIGIN = 0x08000800, LENGTH = 0x001F800 /* sectors 1-63 (2K each = 126 KiB) */
11
+ FLASH_TEXT (rx) : ORIGIN = 0x08020000, LENGTH = 0x0080000 /* Sector starting @ 64 */
12
+ FLASH_FS2 (r) : ORIGIN = 0x080A0000, LENGTH = 0x0060000 /* Sector starting @ 320 (2K each = 384 KiB) */
13
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 0x0018000 /* 96K */
14
+ SRAM2_FS_BUF (xrw) : ORIGIN = 0x10000000, LENGTH = 0x0000800 /* 2K, do not touch used directly by storage.c */
15
+ SRAM2 (xrw) : ORIGIN = 0x10000800, LENGTH = 0x0007800 /* 30K */
14
16
}
15
17
16
18
ENTRY (Reset_Handler )
Original file line number Diff line number Diff line change @@ -91,6 +91,11 @@ STATIC byte flash_cache_mem[0x4000] __attribute__((aligned(4))); // 16k
91
91
#define FLASH_SECTOR_SIZE_MAX (0x00800) // 2k max
92
92
#define FLASH_MEM_SEG1_START_ADDR (0x08000800) // sector 1
93
93
#define FLASH_MEM_SEG1_NUM_BLOCKS (252) // 1 Block=512 Bytes Reserve 126 kBytes
94
+ // on the STM32L47xxG we have 1MB of flash so can enable a bigger FS
95
+ #if defined(MICROPY_HW_L4_512_FS ) && MICROPY_HW_L4_512_FS
96
+ #define FLASH_MEM_SEG2_START_ADDR (0x080A0000) // sector 320
97
+ #define FLASH_MEM_SEG2_NUM_BLOCKS (768) // 384 kBytes
98
+ #endif
94
99
95
100
#else
96
101
#error "no storage support for this MCU"
You can’t perform that action at this time.
0 commit comments