implement requested changes

This commit is contained in:
Lucian Copeland 2020-04-23 13:33:41 -04:00
parent d0a2106547
commit 8791ca6af3
41 changed files with 57 additions and 60 deletions

View File

@ -50,7 +50,7 @@ as a natural "TODO" list. An example minimal build list is shown below:
.. code-block:: makefile .. code-block:: makefile
# Items requiring ports/<port>/common-hal implementation: # These modules are implemented in ports/<port>/common-hal:
CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create
CIRCUITPY_DIGITALIO = 0 # Typically the second module to create CIRCUITPY_DIGITALIO = 0 # Typically the second module to create
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0
@ -67,10 +67,11 @@ as a natural "TODO" list. An example minimal build list is shown below:
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok) CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok)
# Modules with no common-hal implementation, but depend on something else # These modules are implemented in shared-module/ - they can be included in
# any port once their prerequisites in common-hal are complete.
CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO
CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO
CIRCUITPY_PIXELBUF = 0 # Does nothing without a neopixel or dotstar CIRCUITPY_PIXELBUF = 0 # Requires neopixel_write or SPI (dotstar)
CIRCUITPY_RANDOM = 0 # Requires OS CIRCUITPY_RANDOM = 0 # Requires OS
CIRCUITPY_STORAGE = 0 # Requires OS, filesystem CIRCUITPY_STORAGE = 0 # Requires OS, filesystem
CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller

View File

@ -139,9 +139,9 @@ def get_excluded_boards(base):
re_board_chip = re.compile("CHIP_FAMILY\s=\s(\w+)") re_board_chip = re.compile("CHIP_FAMILY\s=\s(\w+)")
chip_keyword = "CHIP_FAMILY" chip_keyword = "CHIP_FAMILY"
elif port in ["nrf"]: elif port in ["nrf"]:
re_board_chip = re.compile("MCU_VARIANT\s=\s(\w+)") re_board_chip = re.compile(r"MCU_VARIANT\s=\s(\w+)")
elif port in ["stm"]: elif port in ["stm"]:
re_board_chip = re.compile("MCU_SERIES\s*=\s*(\w+)") re_board_chip = re.compile(r"MCU_SERIES\s*=\s*(\w+)")
chip_keyword = "MCU_SERIES" chip_keyword = "MCU_SERIES"
port_dir = "ports/{}".format(port) port_dir = "ports/{}".format(port)
@ -175,9 +175,9 @@ def get_excluded_boards(base):
check_dependent_modules = dict() check_dependent_modules = dict()
for module in modules: for module in modules:
board_is_excluded = False board_is_excluded = False
# check if board uses `SMALL_BUILD`. if yes, and current # check if board turns off `FULL_BUILD`. if yes, and current
# module is marked as `FULL_BUILD`, board is excluded # module is marked as `FULL_BUILD`, board is excluded
small_build = re.search("CIRCUITPY_SMALL_BUILD = 1", contents) small_build = re.search("CIRCUITPY_FULL_BUILD = 0", contents)
if small_build and base[module]["full_build"] == "1": if small_build and base[module]["full_build"] == "1":
board_is_excluded = True board_is_excluded = True

View File

@ -114,7 +114,7 @@ else
# Do a default shrink for small builds. # Do a default shrink for small builds.
ifndef CFLAGS_INLINE_LIMIT ifndef CFLAGS_INLINE_LIMIT
ifeq ($(CIRCUITPY_SMALL_BUILD),1) ifeq ($(CIRCUITPY_FULL_BUILD),0)
CFLAGS_INLINE_LIMIT = 50 CFLAGS_INLINE_LIMIT = 50
endif endif
endif endif
@ -125,7 +125,7 @@ else
CFLAGS += -flto -flto-partition=none CFLAGS += -flto -flto-partition=none
ifeq ($(CIRCUITPY_SMALL_BUILD),1) ifeq ($(CIRCUITPY_FULL_BUILD),0)
CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20 CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
endif endif

View File

@ -13,7 +13,7 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ" EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ"
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,5 +8,5 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,4 +8,4 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0

View File

@ -8,4 +8,4 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -9,7 +9,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -11,4 +11,4 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "GD25Q16C" EXTERNAL_FLASH_DEVICES = "GD25Q16C"
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0

View File

@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
CIRCUITPY_PEW = 1 CIRCUITPY_PEW = 1
CIRCUITPY_ANALOGIO = 1 CIRCUITPY_ANALOGIO = 1

View File

@ -9,7 +9,7 @@ CHIP_FAMILY = samd51
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
# TODO: Turn off analogio for now for space reasons, but restore it # TODO: Turn off analogio for now for space reasons, but restore it
# when frozen module gets smaller. # when frozen module gets smaller.
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0

View File

@ -20,7 +20,7 @@ CIRCUITPY_RTC = 0
CIRCUITPY_SAMD = 0 CIRCUITPY_SAMD = 0
CIRCUITPY_USB_MIDI = 1 CIRCUITPY_USB_MIDI = 1
CIRCUITPY_TOUCHIO = 0 CIRCUITPY_TOUCHIO = 0
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
# Make more room. # Make more room.
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
CIRCUITPY_I2CSLAVE = 1 CIRCUITPY_I2CSLAVE = 1
CIRCUITPY_TOUCHIO = 0 CIRCUITPY_TOUCHIO = 0

View File

@ -9,5 +9,5 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -11,5 +11,5 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "W25Q32FV" EXTERNAL_FLASH_DEVICES = "W25Q32FV"
LONGINT_IMPL = MPZ LONGINT_IMPL = MPZ
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -8,4 +8,4 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0

View File

@ -9,7 +9,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ LONGINT_IMPL = MPZ
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -9,7 +9,7 @@ CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1 INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = MPZ LONGINT_IMPL = MPZ
CIRCUITPY_SMALL_BUILD = 1 CIRCUITPY_FULL_BUILD = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0

View File

@ -65,19 +65,19 @@ CIRCUITPY_SAMD = 1
endif endif
ifndef CIRCUITPY_ULAB ifndef CIRCUITPY_ULAB
ifneq ($(CIRCUITPY_SMALL_BUILD),1) ifneq ($(CIRCUITPY_FULL_BUILD),0)
CIRCUITPY_ULAB = 1 CIRCUITPY_ULAB = 1
endif endif
endif endif
ifndef CIRCUITPY_PROTOMATTER ifndef CIRCUITPY_PROTOMATTER
ifneq ($(CIRCUITPY_SMALL_BUILD),1) ifneq ($(CIRCUITPY_FULL_BUILD),0)
CIRCUITPY_PROTOMATTER = 1 CIRCUITPY_PROTOMATTER = 1
endif endif
endif endif
ifndef CIRCUITPY_FRAMEBUFFERIO ifndef CIRCUITPY_FRAMEBUFFERIO
ifneq ($(CIRCUITPY_SMALL_BUILD),1) ifneq ($(CIRCUITPY_FULL_BUILD),0)
CIRCUITPY_FRAMEBUFFERIO = 1 CIRCUITPY_FRAMEBUFFERIO = 1
endif endif
endif endif

View File

@ -4,7 +4,7 @@ INTERNAL_LIBM = 1
USB_SERIAL_NUMBER_LENGTH = 24 USB_SERIAL_NUMBER_LENGTH = 24
ifeq ($(MCU_SERIES),F4) ifeq ($(MCU_SERIES),F4)
# Items requiring common-hal implementation: # Not yet implemented common-hal modules:
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0 CIRCUITPY_AUDIOIO = 0
CIRCUITPY_ROTARYIO = 0 CIRCUITPY_ROTARYIO = 0
@ -18,7 +18,7 @@ ifeq ($(MCU_SERIES),F4)
endif endif
ifeq ($(MCU_SERIES),H7) ifeq ($(MCU_SERIES),H7)
# Items requiring common-hal implementation: # Not yet implemented common-hal modules:
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 0 CIRCUITPY_PULSEIO = 0
@ -30,14 +30,14 @@ ifeq ($(MCU_SERIES),H7)
CIRCUITPY_RTC = 0 CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
# Modules with no common-hal implementation that depend on something else # shared-module modules that still need prerequisites filled
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO, and common-hal module (stub ok) CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO, and common-hal module (stub ok)
CIRCUITPY_RANDOM = 0 # Requires OS CIRCUITPY_RANDOM = 0 # Requires OS
CIRCUITPY_STORAGE = 0 # Requires OS, filesystem CIRCUITPY_STORAGE = 0 # Requires OS, filesystem
endif endif
ifeq ($(MCU_SERIES),F7) ifeq ($(MCU_SERIES),F7)
# Items requiring common-hal implementation: # Not yet implemented common-hal modules:
CIRCUITPY_ANALOGIO = 0 CIRCUITPY_ANALOGIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_PULSEIO = 0 CIRCUITPY_PULSEIO = 0
@ -49,7 +49,7 @@ ifeq ($(MCU_SERIES),F7)
CIRCUITPY_RTC = 0 CIRCUITPY_RTC = 0
CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
# Modules with no common-hal implementation that depend on something else # shared-module modules that still need prerequisites filled
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO, and common-hal module (stub ok) CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO, and common-hal module (stub ok)
CIRCUITPY_RANDOM = 0 # Requires OS CIRCUITPY_RANDOM = 0 # Requires OS
CIRCUITPY_STORAGE = 0 # Requires OS, filesystem CIRCUITPY_STORAGE = 0 # Requires OS, filesystem

View File

@ -179,8 +179,7 @@ typedef long mp_off_t;
// board-specific definitions, which control and may override definitions below. // board-specific definitions, which control and may override definitions below.
#include "mpconfigboard.h" #include "mpconfigboard.h"
// CIRCUITPY_FULL_BUILD is defined in py/circuitpy_mpconfig.mk // Turning off FULL_BUILD removes some functionality to reduce flash size on tiny SAMD21s
// Remove some lesser-used functionality to make small builds fit.
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD) #define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD) #define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
#define MICROPY_COMP_FSTRING_LITERAL (MICROPY_CPYTHON_COMPAT) #define MICROPY_COMP_FSTRING_LITERAL (MICROPY_CPYTHON_COMPAT)

View File

@ -26,18 +26,15 @@
# Boards default to all modules enabled (with exceptions) # Boards default to all modules enabled (with exceptions)
# Manually disable by overriding in #mpconfigboard.mk # Manually disable by overriding in #mpconfigboard.mk
# Smaller builds can be forced for resource constrained chips, typically SAMD21s # Smaller builds can be forced for resource constrained chips (typically SAMD21s
# without external flash. Avoid using this for incomplete ports, as it changes # without external flash) by setting CIRCUITPY_FULL_BUILD=0. Avoid using this
# settings in other files. # for merely incomplete ports, as it changes settings in other files.
ifndef CIRCUITPY_FULL_BUILD ifndef CIRCUITPY_FULL_BUILD
ifeq ($(CIRCUITPY_SMALL_BUILD),1)
CIRCUITPY_FULL_BUILD = 0
else
CIRCUITPY_FULL_BUILD = 1 CIRCUITPY_FULL_BUILD = 1
endif endif
endif
CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_FULL_BUILD=$(CIRCUITPY_FULL_BUILD)
ifndef CIRCUITPY_ANALOGIO ifndef CIRCUITPY_ANALOGIO
CIRCUITPY_ANALOGIO = 1 CIRCUITPY_ANALOGIO = 1
endif endif