|
76 | 76 |
|
77 | 77 | // Flash layout, starting at 0x00000000
|
78 | 78 | //
|
79 |
| -// SoftDevice |
80 |
| -// ISR |
81 |
| -// firmware |
82 |
| -// internal CIRCUITPY flash filesystem (optional) |
83 |
| -// BLE config (bonding info, etc.) (optional) |
84 |
| -// microcontroller.nvm (optional) |
85 |
| -// bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash) |
86 |
| -// bootloader settings |
| 79 | +// - SoftDevice |
| 80 | +// - ISR |
| 81 | +// - firmware |
| 82 | +// - BLE config (bonding info, etc.) (optional) |
| 83 | +// - microcontroller.nvm (optional) |
| 84 | +// - internal CIRCUITPY flash filesystem (optional) |
| 85 | +// The flash filesystem is adjacent to the bootloader, so that its location will not change even if |
| 86 | +// other regions change in size. |
| 87 | +// - bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash) |
| 88 | +// - bootloader settings |
87 | 89 |
|
88 | 90 | // Define these regions starting up from the bottom of flash:
|
89 | 91 |
|
|
105 | 107 | #define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000)
|
106 | 108 | #define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB
|
107 | 109 |
|
108 |
| -#define CIRCUITPY_INTERNAL_NVM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE) |
| 110 | +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) |
| 111 | + |
| 112 | +#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE > 0 && CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR != (BOOTLOADER_START_ADDR - 256*1024) |
| 113 | +#warning Internal flash filesystem location has moved! |
| 114 | +#endif |
| 115 | + |
| 116 | +#define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE) |
109 | 117 |
|
110 | 118 | // 32kiB for bonding, etc.
|
111 | 119 | #define CIRCUITPY_BLE_CONFIG_SIZE (32*1024)
|
112 | 120 | #define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE)
|
113 | 121 |
|
114 |
| -#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (CIRCUITPY_BLE_CONFIG_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE) |
115 |
| - |
116 | 122 | // The firmware space is the space left over between the fixed lower and upper regions.
|
117 | 123 | #define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR)
|
118 | 124 |
|
|
0 commit comments