fix build failures

This commit is contained in:
Dan Halbert 2019-12-10 22:39:44 -05:00
parent c6221c5956
commit d9ca4c9a60
7 changed files with 44 additions and 33 deletions

View File

@ -10,8 +10,6 @@
#define MICROPY_PORT_C (0)
#define MICROPY_PORT_D (0)
#define CALIBRATE_CRYSTALLESS 1
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
#define DEFAULT_I2C_BUS_SCL (&pin_PA17)

View File

@ -6,7 +6,6 @@ USB_MANUFACTURER = "maholli"
CHIP_VARIANT = SAMD51G19A
CHIP_FAMILY = samd51
QSPI_FLASH_FILESYSTEM = 0
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ

View File

@ -30,15 +30,11 @@
// Definitions for which SAMD chip we're using.
#include "include/sam.h"
// Definitions that control circuitpy_mpconfig.h:
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef SAMD21
#if INTERNAL_FLASH_FILESYSTEM
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024)
#else
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
#endif
#ifdef SAMD21
// HMCRAMC0_SIZE is defined in the ASF4 include files for each SAMD21 chip.
#define RAM_SIZE HMCRAMC0_SIZE
@ -66,29 +62,12 @@
X(EISDIR) \
X(EINVAL) \
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
#define CIRCUITPY_INTERNAL_NVM_SIZE (256)
#endif
#endif // SAMD21
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef SAMD51
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
#define CIRCUITPY_INTERNAL_NVM_SIZE (8192)
#endif
// If CIRCUITPY is internal, use half of flash for it.
#if INTERNAL_FLASH_FILESYSTEM
#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2)
#endif
#else
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
#endif
// HSRAM_SIZE is defined in the ASF4 include files for each SAMD51 chip.
#define RAM_SIZE HSRAM_SIZE
#define BOOTLOADER_SIZE (16*1024)
@ -113,6 +92,45 @@
// This also includes mpconfigboard.h.
#include "py/circuitpy_mpconfig.h"
// Definitions that can be overridden by mpconfigboard.h:
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef SAMD21
#if INTERNAL_FLASH_FILESYSTEM
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024)
#else
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
#endif
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
#define CIRCUITPY_INTERNAL_NVM_SIZE (256)
#endif
#endif // SAMD21
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifdef SAMD51
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
#define CIRCUITPY_INTERNAL_NVM_SIZE (8192)
#endif
// If CIRCUITPY is internal, use half of flash for it.
#if INTERNAL_FLASH_FILESYSTEM
#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2)
#endif
#else
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
#endif
#endif // SAMD51
////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef CALIBRATE_CRYSTALLESS
#define CALIBRATE_CRYSTALLESS (0)
#endif

View File

@ -5,4 +5,4 @@ USB_MANUFACTURER = "Electronut Labs"
MCU_CHIP = nrf52840
INTERNAL_FLASH_FILEYSTEM = 1
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -5,4 +5,4 @@ USB_MANUFACTURER = "makerdiary"
MCU_CHIP = nrf52840
INTERNAL_FLASH_FILEYSTEM = 1
INTERNAL_FLASH_FILESYSTEM = 1

View File

@ -146,10 +146,6 @@
#error No space left in flash for firmware after specifying other regions!
#endif
#if CIRCUITPY_FIRMWARE_SIZE < 0
#error No space left in flash for firmware after specifying other regions!
#endif

View File

@ -61,7 +61,7 @@ for region in regions:
space = space.split("/*")[0]
space = K_PATTERN.sub(K_REPLACE, space)
space = M_PATTERN.sub(M_REPLACE, space)
regions[region] = eval(space)
regions[region] = int(eval(space))
# TODO Remove check for both FLASH_FIRMWARE and FLASH after all ports are converted to use FLASH_FIRMWARE.
try: