Skip to content

Commit d9ca4c9

Browse files
committed
fix build failures
1 parent c6221c5 commit d9ca4c9

7 files changed

Lines changed: 44 additions & 33 deletions

File tree

ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#define MICROPY_PORT_C (0)
1111
#define MICROPY_PORT_D (0)
1212

13-
#define CALIBRATE_CRYSTALLESS 1
14-
1513
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
1614

1715
#define DEFAULT_I2C_BUS_SCL (&pin_PA17)

ports/atmel-samd/boards/kicksat-sprite/mpconfigboard.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ USB_MANUFACTURER = "maholli"
66
CHIP_VARIANT = SAMD51G19A
77
CHIP_FAMILY = samd51
88

9-
QSPI_FLASH_FILESYSTEM = 0
109
INTERNAL_FLASH_FILESYSTEM = 1
1110
LONGINT_IMPL = MPZ
1211

ports/atmel-samd/mpconfigport.h

Lines changed: 41 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,11 @@
3030
// Definitions for which SAMD chip we're using.
3131
#include "include/sam.h"
3232

33+
// Definitions that control circuitpy_mpconfig.h:
3334

3435
////////////////////////////////////////////////////////////////////////////////////////////////////
35-
#ifdef SAMD21
3636

37-
#if INTERNAL_FLASH_FILESYSTEM
38-
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024)
39-
#else
40-
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
41-
#endif
37+
#ifdef SAMD21
4238

4339
// HMCRAMC0_SIZE is defined in the ASF4 include files for each SAMD21 chip.
4440
#define RAM_SIZE HMCRAMC0_SIZE
@@ -66,29 +62,12 @@
6662
X(EISDIR) \
6763
X(EINVAL) \
6864

69-
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
70-
#define CIRCUITPY_INTERNAL_NVM_SIZE (256)
71-
#endif
72-
7365
#endif // SAMD21
7466

7567
////////////////////////////////////////////////////////////////////////////////////////////////////
7668

7769
#ifdef SAMD51
7870

79-
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
80-
#define CIRCUITPY_INTERNAL_NVM_SIZE (8192)
81-
#endif
82-
83-
// If CIRCUITPY is internal, use half of flash for it.
84-
#if INTERNAL_FLASH_FILESYSTEM
85-
#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
86-
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2)
87-
#endif
88-
#else
89-
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
90-
#endif
91-
9271
// HSRAM_SIZE is defined in the ASF4 include files for each SAMD51 chip.
9372
#define RAM_SIZE HSRAM_SIZE
9473
#define BOOTLOADER_SIZE (16*1024)
@@ -113,6 +92,45 @@
11392
// This also includes mpconfigboard.h.
11493
#include "py/circuitpy_mpconfig.h"
11594

95+
// Definitions that can be overridden by mpconfigboard.h:
96+
97+
////////////////////////////////////////////////////////////////////////////////////////////////////
98+
99+
#ifdef SAMD21
100+
101+
#if INTERNAL_FLASH_FILESYSTEM
102+
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (64*1024)
103+
#else
104+
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
105+
#endif
106+
107+
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
108+
#define CIRCUITPY_INTERNAL_NVM_SIZE (256)
109+
#endif
110+
111+
#endif // SAMD21
112+
113+
////////////////////////////////////////////////////////////////////////////////////////////////////
114+
115+
#ifdef SAMD51
116+
117+
#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
118+
#define CIRCUITPY_INTERNAL_NVM_SIZE (8192)
119+
#endif
120+
121+
// If CIRCUITPY is internal, use half of flash for it.
122+
#if INTERNAL_FLASH_FILESYSTEM
123+
#ifndef CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE
124+
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (FLASH_SIZE/2)
125+
#endif
126+
#else
127+
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (0)
128+
#endif
129+
130+
#endif // SAMD51
131+
132+
////////////////////////////////////////////////////////////////////////////////////////////////////
133+
116134
#ifndef CALIBRATE_CRYSTALLESS
117135
#define CALIBRATE_CRYSTALLESS (0)
118136
#endif

ports/nrf/boards/electronut_labs_papyr/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ USB_MANUFACTURER = "Electronut Labs"
55

66
MCU_CHIP = nrf52840
77

8-
INTERNAL_FLASH_FILEYSTEM = 1
8+
INTERNAL_FLASH_FILESYSTEM = 1

ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ USB_MANUFACTURER = "makerdiary"
55

66
MCU_CHIP = nrf52840
77

8-
INTERNAL_FLASH_FILEYSTEM = 1
8+
INTERNAL_FLASH_FILESYSTEM = 1

ports/nrf/mpconfigport.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,6 @@
146146
#error No space left in flash for firmware after specifying other regions!
147147
#endif
148148

149-
#if CIRCUITPY_FIRMWARE_SIZE < 0
150-
#error No space left in flash for firmware after specifying other regions!
151-
#endif
152-
153149

154150

155151

tools/build_memory_info.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
space = space.split("/*")[0]
6262
space = K_PATTERN.sub(K_REPLACE, space)
6363
space = M_PATTERN.sub(M_REPLACE, space)
64-
regions[region] = eval(space)
64+
regions[region] = int(eval(space))
6565

6666
# TODO Remove check for both FLASH_FIRMWARE and FLASH after all ports are converted to use FLASH_FIRMWARE.
6767
try:

0 commit comments

Comments
 (0)