summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ports/nrf/mpconfigport.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index 5fdc0f019..1f10f5e7e 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -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.