Skip to content

Commit 180f5c6

Browse files
committed
Merge remote-tracking branch 'adafruit/master' into ringbuf-fixes
2 parents fbc8719 + 2d7cf4b commit 180f5c6

File tree

147 files changed

+15947
-408
lines changed

Some content is hidden

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

147 files changed

+15947
-408
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"

.gitmodules

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,21 @@
122122
[submodule "lib/protomatter"]
123123
path = lib/protomatter
124124
url = https://github.com/adafruit/Adafruit_Protomatter
125+
[submodule "frozen/Adafruit_CircuitPython_LSM6DS"]
126+
path = frozen/Adafruit_CircuitPython_LSM6DS
127+
url = https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS
128+
[submodule "frozen/Adafruit_CircuitPython_FocalTouch"]
129+
path = frozen/Adafruit_CircuitPython_FocalTouch
130+
url = https://github.com/adafruit/Adafruit_CircuitPython_FocalTouch
131+
[submodule "frozen/Adafruit_CircuitPython_DS3231"]
132+
path = frozen/Adafruit_CircuitPython_DS3231
133+
url = https://github.com/adafruit/Adafruit_CircuitPython_DS3231
134+
[submodule "frozen/Adafruit_CircuitPython_DRV2605"]
135+
path = frozen/Adafruit_CircuitPython_DRV2605
136+
url = https://github.com/adafruit/Adafruit_CircuitPython_DRV2605
137+
[submodule "frozen/Adafruit_CircuitPython_BLE"]
138+
path = frozen/Adafruit_CircuitPython_BLE
139+
url = https://github.com/adafruit/Adafruit_CircuitPython_BLE
140+
[submodule "frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center"]
141+
path = frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center
142+
url = https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center

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)

frozen/Adafruit_CircuitPython_BLE

0 commit comments

Comments
 (0)