File tree Expand file tree Collapse file tree 7 files changed +17
-10
lines changed Expand file tree Collapse file tree 7 files changed +17
-10
lines changed Original file line number Diff line number Diff line change 13
13
_estack = ORIGIN (RAM) + LENGTH (RAM) - 8;
14
14
_sstack = _estack - 8K;
15
15
16
+ _oflash_fs = ORIGIN (FLASH) + 192K - 8K;
17
+ _sflash_fs = LENGTH (FLASH) - 192K + 8K - 1;
18
+
16
19
_sheap = _ebss;
17
20
_eheap = _sstack;
Original file line number Diff line number Diff line change 13
13
_estack = ORIGIN (RAM) + LENGTH (RAM) - 8;
14
14
_sstack = _estack - 16K;
15
15
16
+ _oflash_fs = ORIGIN (FLASH) + 384K - 16K;
17
+ _sflash_fs = LENGTH (FLASH) - 384K + 16K - 1;
18
+
16
19
_sheap = _ebss;
17
20
_eheap = _sstack;
Original file line number Diff line number Diff line change 13
13
_estack = ORIGIN (RAM) + LENGTH (RAM) - 8;
14
14
_sstack = _estack - 16K;
15
15
16
+ _oflash_fs = ORIGIN (FLASH) + 384K - 16K;
17
+ _sflash_fs = LENGTH (FLASH) - 384K + 16K - 1;
18
+
16
19
_sheap = _ebss;
17
20
_eheap = _sstack;
Original file line number Diff line number Diff line change 13
13
_estack = ORIGIN (RAM) + LENGTH (RAM) - 8;
14
14
_sstack = _estack - 16K;
15
15
16
+ _oflash_fs = ORIGIN (FLASH) + 384K - 16K;
17
+ _sflash_fs = LENGTH (FLASH) - 384K + 16K - 1;
18
+
16
19
_sheap = _ebss;
17
20
_eheap = _sstack;
Original file line number Diff line number Diff line change 12
12
#define MICROPY_PY_MATH (0)
13
13
#define MICROPY_PY_CMATH (0)
14
14
15
- #define MICROPY_HW_FLASH_STORAGE_BASE (0x30000)
16
- #define MICROPY_HW_FLASH_STORAGE_BYTES (0xFFFF)
17
15
#define VFS_BLOCK_SIZE_BYTES (1536) // 24x 64B flash pages;
18
16
19
17
#define MICROPY_HW_UART_TXBUF (1)
Original file line number Diff line number Diff line change @@ -19,12 +19,7 @@ unsigned long trng_random_u32(void);
19
19
20
20
// Due to a limitation in the TC counter for us, the ticks period is 2**29
21
21
#define MICROPY_PY_UTIME_TICKS_PERIOD (0x20000000)
22
- // MicroPython configs
23
- // samd_flash.c flash parameters
24
- // Build a 128k Flash storage at top. 512k-128k=384k=0x60000
25
- // 512*1024= 0x80000 minus 128*1024= 0x20000 = 0x60000
26
- #define MICROPY_HW_FLASH_STORAGE_BASE (0x60000)
27
- #define MICROPY_HW_FLASH_STORAGE_BYTES (0x1FFFF)
22
+
28
23
#define VFS_BLOCK_SIZE_BYTES (1536) //
29
24
30
25
#define MICROPY_HW_UART_TXBUF (1)
Original file line number Diff line number Diff line change @@ -53,11 +53,13 @@ typedef struct _samd_flash_obj_t {
53
53
uint32_t flash_size ;
54
54
} samd_flash_obj_t ;
55
55
56
+ extern uint8_t _oflash_fs , _sflash_fs ;
57
+
56
58
// Build a Flash storage at top.
57
59
STATIC samd_flash_obj_t samd_flash_obj = {
58
60
.base = { & samd_flash_type },
59
- .flash_base = MICROPY_HW_FLASH_STORAGE_BASE , // Board specific: mpconfigboard.h
60
- .flash_size = MICROPY_HW_FLASH_STORAGE_BYTES , // Board specific: mpconfigboard.h
61
+ .flash_base = ( uint32_t ) & _oflash_fs , // Get from MCU-Specific loader script.
62
+ .flash_size = ( uint32_t ) & _sflash_fs , // Get from MCU-Specific loader script.
61
63
};
62
64
63
65
// FLASH stuff
You can’t perform that action at this time.
0 commit comments