diff --git a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h index 1deda871a..a508d9191 100644 --- a/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.h @@ -7,9 +7,9 @@ #define MICROPY_HW_LED_STATUS (&pin_PB23) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) diff --git a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h index d98da4d14..02750e646 100644 --- a/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.h @@ -5,9 +5,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA09) #define DEFAULT_I2C_BUS_SDA (&pin_PA08) diff --git a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h index 7ab09d447..ec201e6ef 100644 --- a/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h +++ b/ports/atmel-samd/boards/arduino_zero/mpconfigboard.h @@ -10,9 +10,9 @@ #define MICROPY_PORT_B (PORT_PB03) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h index 341dcc27e..7a32bf023 100644 --- a/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h +++ b/ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.h @@ -7,13 +7,13 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 #define DEFAULT_SPI_BUS_SCK (&pin_PA19) #define DEFAULT_SPI_BUS_MOSI (&pin_PA18) #define DEFAULT_SPI_BUS_MISO (&pin_PA22) -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define IGNORE_PIN_PA00 1 #define IGNORE_PIN_PA01 1 diff --git a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h index 787a3ee55..eb1b90585 100644 --- a/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.h @@ -8,9 +8,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA22) #define DEFAULT_I2C_BUS_SDA (&pin_PA23) diff --git a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h index 2a21b8f02..a16cee0b4 100644 --- a/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.h @@ -8,9 +8,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h index a0f79ed72..19a514758 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.h @@ -8,9 +8,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h index 85c24bfd0..d3db098e5 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.h @@ -8,9 +8,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h index 59e0b3c61..bc60ba49b 100644 --- a/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/gemma_m0/mpconfigboard.h @@ -12,7 +12,7 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 #define DEFAULT_I2C_BUS_SCL (&pin_PA05) #define DEFAULT_I2C_BUS_SDA (&pin_PA04) @@ -20,7 +20,7 @@ #define DEFAULT_UART_BUS_RX (&pin_PA05) #define DEFAULT_UART_BUS_TX (&pin_PA04) -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA06 1 diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index fe741a0f7..1304b6dfb 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -10,9 +10,9 @@ // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code. -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define CALIBRATE_CRYSTALLESS 1 diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h index 7dd4a5441..445ccc435 100644 --- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.h +++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.h @@ -5,9 +5,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define IGNORE_PIN_PB00 1 diff --git a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h index a004336bf..288208f65 100644 --- a/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/pirkey_m0/mpconfigboard.h @@ -10,9 +10,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define IGNORE_PIN_PA02 1 #define IGNORE_PIN_PA03 1 diff --git a/ports/atmel-samd/boards/samd21x18-bootloader.ld b/ports/atmel-samd/boards/samd21x18-bootloader.ld index 3eb97ee02..2ef09ba9a 100644 --- a/ports/atmel-samd/boards/samd21x18-bootloader.ld +++ b/ports/atmel-samd/boards/samd21x18-bootloader.ld @@ -5,8 +5,9 @@ /* Specify the memory areas */ MEMORY { - /* Leave 8KiB for the bootloader, and 64k for the flash file system. */ - FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 64K + /* Leave 8KiB for the bootloader, 64k for the flash file system, and 256b + for user config. */ + FLASH (rx) : ORIGIN = 0x00000000 + 8K, LENGTH = 256K - 8K - 64K - 256 RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 32K } diff --git a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h index 3112d3f2a..a50c61cf2 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_samd21_dev/mpconfigboard.h @@ -5,9 +5,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h index aec54ddfb..6af7fa191 100644 --- a/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h +++ b/ports/atmel-samd/boards/sparkfun_samd21_mini/mpconfigboard.h @@ -5,9 +5,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define DEFAULT_I2C_BUS_SCL (&pin_PA23) #define DEFAULT_I2C_BUS_SDA (&pin_PA22) diff --git a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h index cef35983e..dd8bc03cc 100644 --- a/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/trinket_m0/mpconfigboard.h @@ -11,9 +11,9 @@ #define MICROPY_PORT_B (0) #define MICROPY_PORT_C (0) -#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_NVM_SIZE 256 -#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000) +#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE) #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA04 1