Skip to content

Commit 755d404

Browse files
committed
Merge remote-tracking branch 'adafruit/master' into lower_power
2 parents f13de32 + faa50df commit 755d404

File tree

139 files changed

+16248
-395
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+16248
-395
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,16 @@ jobs:
9494
path: mpy-cross/mpy-cross.static.exe
9595

9696
mpy-cross-mac:
97-
runs-on: macos-latest
97+
runs-on: macos-10.15
9898
steps:
9999
- name: Dump GitHub context
100100
env:
101101
GITHUB_CONTEXT: ${{ toJson(github) }}
102102
run: echo "$GITHUB_CONTEXT"
103-
- name: Install deps
103+
- name: Make gettext programs available
104104
run: |
105-
brew link --force gettext
105+
brew install gettext
106+
echo "::set-env name=PATH::/usr/local/opt/gettext/bin:$PATH"
106107
- name: Versions
107108
run: |
108109
gcc --version
@@ -200,6 +201,7 @@ jobs:
200201
- "monster_m4sk"
201202
- "ndgarage_ndbit6"
202203
- "nfc_copy_cat"
204+
- "nucleo_f746zg"
203205
- "nucleo_f767zi"
204206
- "nucleo_h743zi_2"
205207
- "ohs2020_badge"
@@ -241,6 +243,7 @@ jobs:
241243
- "stm32f411ve_discovery"
242244
- "stm32f412zg_discovery"
243245
- "stm32f4_discovery"
246+
- "stm32f746g_disco"
244247
- "stringcar_m0_express"
245248
- "teensy40"
246249
- "teknikio_bluebird"

docs/porting.rst

Lines changed: 40 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
We love CircuitPython and would love to see it come to more microcontroller
2-
platforms. With 3.0 we've reworked CircuitPython to make it easier than ever to
2+
platforms. Since 3.0 we've reworked CircuitPython to make it easier than ever to
33
add support. While there are some major differences between ports, this page
44
covers the similarities that make CircuitPython what it is and how that core
55
fits into a variety of microcontrollers.
@@ -19,7 +19,7 @@ prepping file systems and automatically running user code on boot. In
1919
CircuitPython we've dubbed this component the supervisor because it monitors
2020
and facilitates the VMs which run user Python code. Porting involves the
2121
supervisor because many of the tasks it does while interfacing with the
22-
hardware. Once its going though, the REPL works and debugging can migrate to a
22+
hardware. Once complete, the REPL works and debugging can migrate to a
2323
Python based approach rather than C.
2424

2525
The third core piece is the plethora of low level APIs that CircuitPython
@@ -42,6 +42,44 @@ to the port's directory (in the top level until the ``ports`` directory is
4242
present). This includes the Makefile and any C library resources. Make sure
4343
these resources are compatible with the MIT License of the rest of the code!
4444

45+
Circuitpython has a number of modules enabled by default in
46+
``py/circuitpy_mpconfig.mk``. Most of these modules will need to be disabled in
47+
``mpconfigboard.mk`` during the early stages of a port in order for it to
48+
compile. As the port progresses in module support, this list can be pruned down
49+
as a natural "TODO" list. An example minimal build list is shown below:
50+
51+
.. code-block:: makefile
52+
53+
# These modules are implemented in ports/<port>/common-hal:
54+
CIRCUITPY_MICROCONTROLLER = 0 # Typically the first module to create
55+
CIRCUITPY_DIGITALIO = 0 # Typically the second module to create
56+
CIRCUITPY_ANALOGIO = 0
57+
CIRCUITPY_BUSIO = 0
58+
CIRCUITPY_NEOPIXEL_WRITE = 0
59+
CIRCUITPY_PULSEIO = 0
60+
CIRCUITPY_OS = 0
61+
CIRCUITPY_NVM = 0
62+
CIRCUITPY_AUDIOBUSIO = 0
63+
CIRCUITPY_AUDIOIO = 0
64+
CIRCUITPY_ROTARYIO = 0
65+
CIRCUITPY_RTC = 0
66+
CIRCUITPY_FREQUENCYIO = 0
67+
CIRCUITPY_I2CSLAVE = 0
68+
CIRCUITPY_DISPLAYIO = 0 # Requires SPI, PulseIO (stub ok)
69+
70+
# These modules are implemented in shared-module/ - they can be included in
71+
# any port once their prerequisites in common-hal are complete.
72+
CIRCUITPY_BITBANGIO = 0 # Requires DigitalIO
73+
CIRCUITPY_GAMEPAD = 0 # Requires DigitalIO
74+
CIRCUITPY_PIXELBUF = 0 # Requires neopixel_write or SPI (dotstar)
75+
CIRCUITPY_RANDOM = 0 # Requires OS
76+
CIRCUITPY_STORAGE = 0 # Requires OS, filesystem
77+
CIRCUITPY_TOUCHIO = 0 # Requires Microcontroller
78+
CIRCUITPY_USB_HID = 0 # Requires USB
79+
CIRCUITPY_USB_MIDI = 0 # Requires USB
80+
CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 # Does nothing without I2C
81+
CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash
82+
4583
Step 2: Init
4684
--------------
4785
Once your build is setup, the next step should be to get your clocks going as

docs/shared_bindings_matrix.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import re
2727

2828

29-
SUPPORTED_PORTS = ["atmel-samd", "nrf", "mimxrt10xx"]
29+
SUPPORTED_PORTS = ["atmel-samd", "nrf", "stm", "mimxrt10xx"]
3030

3131

3232
def parse_port_config(contents, chip_keyword=None):
@@ -139,7 +139,10 @@ def get_excluded_boards(base):
139139
re_board_chip = re.compile("CHIP_FAMILY\s=\s(\w+)")
140140
chip_keyword = "CHIP_FAMILY"
141141
elif port in ["nrf"]:
142-
re_board_chip = re.compile("MCU_VARIANT\s=\s(\w+)")
142+
re_board_chip = re.compile(r"MCU_VARIANT\s=\s(\w+)")
143+
elif port in ["stm"]:
144+
re_board_chip = re.compile(r"MCU_SERIES\s*=\s*(\w+)")
145+
chip_keyword = "MCU_SERIES"
143146

144147
port_dir = "ports/{}".format(port)
145148

@@ -158,10 +161,10 @@ def get_excluded_boards(base):
158161
contents = board.read()
159162

160163
board_chip = re_board_chip.search(contents)
161-
#print(entry.name, board_chip.group(1))
162164
if not board_chip:
163165
board_chip = "Unknown Chip"
164166
else:
167+
#print(entry.name, board_chip.group(1))
165168
board_chip = board_chip.group(1)
166169

167170
# add port_config results to contents
@@ -172,18 +175,12 @@ def get_excluded_boards(base):
172175
check_dependent_modules = dict()
173176
for module in modules:
174177
board_is_excluded = False
175-
# check if board uses `SMALL_BUILD`. if yes, and current
178+
# check if board turns off `FULL_BUILD`. if yes, and current
176179
# module is marked as `FULL_BUILD`, board is excluded
177-
small_build = re.search("CIRCUITPY_SMALL_BUILD = 1", contents)
180+
small_build = re.search("CIRCUITPY_FULL_BUILD = 0", contents)
178181
if small_build and base[module]["full_build"] == "1":
179182
board_is_excluded = True
180183

181-
# check if board uses `MINIMAL_BUILD`. if yes, and current
182-
# module is marked as `DEFAULT_BUILD`, board is excluded
183-
min_build = re.search("CIRCUITPY_MINIMAL_BUILD = 1", contents)
184-
if min_build and base[module]["default_value"] == "CIRCUITPY_DEFAULT_BUILD":
185-
board_is_excluded = True
186-
187184
# check if module is specifically disabled for this board
188185
re_pattern = r"CIRCUITPY_{}\s=\s(\w)".format(module.upper())
189186
find_module = re.search(re_pattern, contents)

lib/tinyusb

Submodule tinyusb updated 400 files

ports/atmel-samd/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ else
114114

115115
# Do a default shrink for small builds.
116116
ifndef CFLAGS_INLINE_LIMIT
117-
ifeq ($(CIRCUITPY_SMALL_BUILD),1)
117+
ifeq ($(CIRCUITPY_FULL_BUILD),0)
118118
CFLAGS_INLINE_LIMIT = 50
119119
endif
120120
endif
@@ -125,7 +125,7 @@ else
125125

126126
CFLAGS += -flto -flto-partition=none
127127

128-
ifeq ($(CIRCUITPY_SMALL_BUILD),1)
128+
ifeq ($(CIRCUITPY_FULL_BUILD),0)
129129
CFLAGS += --param inline-unit-growth=15 --param max-inline-insns-auto=20
130130
endif
131131

ports/atmel-samd/boards/8086_commander/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
1313
EXTERNAL_FLASH_DEVICES = "W25Q128JV_SQ"
1414

1515
LONGINT_IMPL = NONE
16-
CIRCUITPY_SMALL_BUILD = 1
16+
CIRCUITPY_FULL_BUILD = 0
1717

1818
SUPEROPT_GC = 0
1919

ports/atmel-samd/boards/arduino_mkr1300/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212
SUPEROPT_GC = 0

ports/atmel-samd/boards/arduino_mkrzero/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/arduino_zero/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/bast_pro_mini_m0/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0

ports/atmel-samd/boards/catwan_usbstick/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0

ports/atmel-samd/boards/datum_distance/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/datum_imu/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/datum_light/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/datum_weather/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/escornabot_makech/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/feather_m0_adalogger/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/feather_m0_basic/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/gemma_m0/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/meowmeow/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/ndgarage_ndbit6/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CHIP_FAMILY = samd21
99

1010
INTERNAL_FLASH_FILESYSTEM = 1
1111
LONGINT_IMPL = NONE
12-
CIRCUITPY_SMALL_BUILD = 1
12+
CIRCUITPY_FULL_BUILD = 0
1313

1414
SUPEROPT_GC = 0
1515

ports/atmel-samd/boards/nfc_copy_cat/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
1111
EXTERNAL_FLASH_DEVICES = "GD25Q16C"
1212
LONGINT_IMPL = NONE
1313

14-
CIRCUITPY_SMALL_BUILD = 1
14+
CIRCUITPY_FULL_BUILD = 0

ports/atmel-samd/boards/pewpew10/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
CIRCUITPY_PEW = 1
1414
CIRCUITPY_ANALOGIO = 1

ports/atmel-samd/boards/pewpew_m4/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ CHIP_FAMILY = samd51
99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
1111

12-
CIRCUITPY_SMALL_BUILD = 1
12+
CIRCUITPY_FULL_BUILD = 0
1313
# TODO: Turn off analogio for now for space reasons, but restore it
1414
# when frozen module gets smaller.
1515
CIRCUITPY_ANALOGIO = 0

ports/atmel-samd/boards/pirkey_m0/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ CIRCUITPY_RTC = 0
2020
CIRCUITPY_SAMD = 0
2121
CIRCUITPY_USB_MIDI = 1
2222
CIRCUITPY_TOUCHIO = 0
23-
CIRCUITPY_SMALL_BUILD = 1
23+
CIRCUITPY_FULL_BUILD = 0
2424
# Make more room.
2525
SUPEROPT_GC = 0
2626

ports/atmel-samd/boards/pyruler/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0
1414

ports/atmel-samd/boards/seeeduino_xiao/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212

1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/shirtty/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CHIP_FAMILY = samd21
88

99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
11-
CIRCUITPY_SMALL_BUILD = 1
11+
CIRCUITPY_FULL_BUILD = 0
1212
CIRCUITPY_I2CSLAVE = 1
1313
CIRCUITPY_TOUCHIO = 0
1414

ports/atmel-samd/boards/sparkfun_qwiic_micro_no_flash/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ CHIP_FAMILY = samd21
99
INTERNAL_FLASH_FILESYSTEM = 1
1010
LONGINT_IMPL = NONE
1111

12-
CIRCUITPY_SMALL_BUILD = 1
12+
CIRCUITPY_FULL_BUILD = 0
1313
SUPEROPT_GC = 0

ports/atmel-samd/boards/sparkfun_qwiic_micro_with_flash/mpconfigboard.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
1111
EXTERNAL_FLASH_DEVICES = "W25Q32FV"
1212
LONGINT_IMPL = MPZ
1313

14-
CIRCUITPY_SMALL_BUILD = 1
14+
CIRCUITPY_FULL_BUILD = 0
1515
SUPEROPT_GC = 0

0 commit comments

Comments
 (0)