nrf: mpconfigport: support configuration of various sizes
Conditionally set variables such as the softdevice RAM size, bootloader size, and the spi m3 buffer size. This allows ports to adjust these values to suit their needs. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
33720af0c6
commit
3537ad4059
@ -36,7 +36,9 @@
|
||||
|
||||
// Max RAM used by SoftDevice. Can be changed when SoftDevice parameters are changed.
|
||||
// See common.template.ld.
|
||||
#ifndef SOFTDEVICE_RAM_SIZE
|
||||
#define SOFTDEVICE_RAM_SIZE (64*1024)
|
||||
#endif
|
||||
|
||||
#ifdef NRF52840
|
||||
#define MICROPY_PY_SYS_PLATFORM "nRF52840"
|
||||
@ -53,8 +55,10 @@
|
||||
#define RAM_SIZE (0x20000) // 128 KiB
|
||||
// Special RAM area for SPIM3 transmit buffer, to work around hardware bug.
|
||||
// See common.template.ld.
|
||||
#ifndef SPIM3_BUFFER_SIZE
|
||||
#define SPIM3_BUFFER_SIZE (8192)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (1)
|
||||
#define MICROPY_PY_FUNCTION_ATTRS (1)
|
||||
@ -124,7 +128,9 @@
|
||||
// Bootloader values from https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/master/src/linker/s140_v6.ld
|
||||
#define BOOTLOADER_START_ADDR (FLASH_SIZE - BOOTLOADER_SIZE - BOOTLOADER_SETTINGS_SIZE - BOOTLOADER_MBR_SIZE)
|
||||
#define BOOTLOADER_MBR_SIZE (0x1000) // 4kib
|
||||
#ifndef BOOTLOADER_SIZE
|
||||
#define BOOTLOADER_SIZE (0xA000) // 40kiB
|
||||
#endif
|
||||
#define BOOTLOADER_SETTINGS_START_ADDR (FLASH_SIZE - BOOTLOADER_SETTINGS_SIZE)
|
||||
#define BOOTLOADER_SETTINGS_SIZE (0x1000) // 4kiB
|
||||
|
||||
@ -137,7 +143,9 @@
|
||||
#define CIRCUITPY_INTERNAL_NVM_START_ADDR (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_INTERNAL_NVM_SIZE)
|
||||
|
||||
// 32kiB for bonding, etc.
|
||||
#ifndef CIRCUITPY_BLE_CONFIG_SIZE
|
||||
#define CIRCUITPY_BLE_CONFIG_SIZE (32*1024)
|
||||
#endif
|
||||
#define CIRCUITPY_BLE_CONFIG_START_ADDR (CIRCUITPY_INTERNAL_NVM_START_ADDR - CIRCUITPY_BLE_CONFIG_SIZE)
|
||||
|
||||
// The firmware space is the space left over between the fixed lower and upper regions.
|
||||
|
Loading…
Reference in New Issue
Block a user