moved nrf internal filesystem to just below bootloader

This commit is contained in:
Dan Halbert 2019-12-12 14:57:23 -05:00
parent 8176325130
commit e11fabd5e0
3 changed files with 23 additions and 17 deletions

View File

@ -151,11 +151,11 @@
// Flash layout, starting at 0x00000000 // Flash layout, starting at 0x00000000
// //
// bootloader (8 or 16kB) // - bootloader (8 or 16kB)
// firmware // - firmware
// internal CIRCUITPY flash filesystem (optional) // - internal CIRCUITPY flash filesystem (optional)
// internal config, used to store crystalless clock calibration info (optional) // - internal config, used to store crystalless clock calibration info (optional)
// microntroller.nvm (optional) // - microntroller.nvm (optional)
// Define these regions starting up from the bottom of flash: // Define these regions starting up from the bottom of flash:

View File

@ -11,9 +11,9 @@ MEMORY
FLASH_SD (rx) : ORIGIN = ${SD_FLASH_START_ADDR}, LENGTH = ${SD_FLASH_SIZE} FLASH_SD (rx) : ORIGIN = ${SD_FLASH_START_ADDR}, LENGTH = ${SD_FLASH_SIZE}
FLASH_ISR (rx) : ORIGIN = ${ISR_START_ADDR}, LENGTH = ${ISR_SIZE} FLASH_ISR (rx) : ORIGIN = ${ISR_START_ADDR}, LENGTH = ${ISR_SIZE}
FLASH_FIRMWARE (rx) : ORIGIN = ${CIRCUITPY_FIRMWARE_START_ADDR}, LENGTH = ${CIRCUITPY_FIRMWARE_SIZE} FLASH_FIRMWARE (rx) : ORIGIN = ${CIRCUITPY_FIRMWARE_START_ADDR}, LENGTH = ${CIRCUITPY_FIRMWARE_SIZE}
FLASH_FATFS (r) : ORIGIN = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE}
FLASH_BLE_CONFIG (r) : ORIGIN = ${CIRCUITPY_BLE_CONFIG_START_ADDR}, LENGTH = ${CIRCUITPY_BLE_CONFIG_SIZE} FLASH_BLE_CONFIG (r) : ORIGIN = ${CIRCUITPY_BLE_CONFIG_START_ADDR}, LENGTH = ${CIRCUITPY_BLE_CONFIG_SIZE}
FLASH_NVM (r) : ORIGIN = ${CIRCUITPY_INTERNAL_NVM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_NVM_SIZE} FLASH_NVM (r) : ORIGIN = ${CIRCUITPY_INTERNAL_NVM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_NVM_SIZE}
FLASH_FATFS (r) : ORIGIN = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR}, LENGTH = ${CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE}
FLASH_BOOTLOADER (rx) : ORIGIN = ${BOOTLOADER_START_ADDR}, LENGTH = ${BOOTLOADER_SIZE} FLASH_BOOTLOADER (rx) : ORIGIN = ${BOOTLOADER_START_ADDR}, LENGTH = ${BOOTLOADER_SIZE}
FLASH_BOOTLOADER_SETTINGS (r) : ORIGIN = ${BOOTLOADER_SETTINGS_START_ADDR}, LENGTH = ${BOOTLOADER_SETTINGS_SIZE} FLASH_BOOTLOADER_SETTINGS (r) : ORIGIN = ${BOOTLOADER_SETTINGS_START_ADDR}, LENGTH = ${BOOTLOADER_SETTINGS_SIZE}
RAM (xrw) : ORIGIN = 0x20004000, LENGTH = 0x03C000 /* 240 KiB */ RAM (xrw) : ORIGIN = 0x20004000, LENGTH = 0x03C000 /* 240 KiB */

View File

@ -76,14 +76,16 @@
// Flash layout, starting at 0x00000000 // Flash layout, starting at 0x00000000
// //
// SoftDevice // - SoftDevice
// ISR // - ISR
// firmware // - firmware
// internal CIRCUITPY flash filesystem (optional) // - BLE config (bonding info, etc.) (optional)
// BLE config (bonding info, etc.) (optional) // - microcontroller.nvm (optional)
// microcontroller.nvm (optional) // - internal CIRCUITPY flash filesystem (optional)
// bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash) // The flash filesystem is adjacent to the bootloader, so that its location will not change even if
// bootloader settings // other regions change in size.
// - bootloader (note the MBR at 0x0 redirects to the bootloader here, in high flash)
// - bootloader settings
// Define these regions starting up from the bottom of flash: // Define these regions starting up from the bottom of flash:
@ -105,14 +107,18 @@
#define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000) #define BOOTLOADER_SETTINGS_START_ADDR (0x000FF000)
#define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB #define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE) #define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (BOOTLOADER_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE)
#if CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE > 0 && CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR != (BOOTLOADER_START_ADDR - 256*1024)
#warning Internal flash filesystem location has moved!
#endif
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE)
// 32kiB for bonding, etc. // 32kiB for bonding, etc.
#define CIRCUITPY_BLE_CONFIG_SIZE (32*1024) #define CIRCUITPY_BLE_CONFIG_SIZE (32*1024)
#define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE) #define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE)
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR (CIRCUITPY_BLE_CONFIG_START_ADDR - CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE)
// The firmware space is the space left over between the fixed lower and upper regions. // The firmware space is the space left over between the fixed lower and upper regions.
#define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR) #define CIRCUITPY_FIRMWARE_SIZE (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR)