10000 Merge pull request #1 from adafruit/master · adafruit/circuitpython@ba83a4a · GitHub
[go: up one dir, main page]

Skip to content

Commit ba83a4a

Browse files
author
Joe Bakalor
authored
Merge pull request #1 from adafruit/master
Update base
2 parents 8ab3ef4 + 01bf932 commit ba83a4a

File tree

1,114 files changed

+9834
-218796
lines changed

Some content is hidden

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

1,114 files changed

+9834
-218796
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build CI
22

3-
on: [push, pull_request, release]
3+
on:
4+
push:
5+
pull_request:
6+
release:
7+
types: [published]
8+
check_suite:
9+
types: [rerequested]
410

511
jobs:
612
test:
@@ -10,9 +16,6 @@ jobs:
1016
env:
1117
GITHUB_CONTEXT: ${{ toJson(github) }}
1218
run: echo "$GITHUB_CONTEXT"
13-
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
14-
run: exit 1
15-
if: github.event_name == 'release' && (github.event.action != 'published' && github.event.action != 'rerequested')
1619
- name: Set up Python 3.5
1720
uses: actions/setup-python@v1
1821
with:
@@ -49,9 +52,6 @@ jobs:
4952
done
5053
working-directory: tests
5154
if: failure()
52-
- name: Test threads
53-
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread
54-
working-directory: tests
5555
- name: Native Tests
5656
run: MICROPY_CPYTHON3=python3.5 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native
5757
working-directory: tests
@@ -75,6 +75,7 @@ jobs:
7575
board:
7676
- "arduino_mkr1300"
7777
- "arduino_mkrzero"
78+
- "arduino_nano_33_ble"
7879
- "arduino_zero"
7980
- "bast_pro_mini_m0"
8081
- "capablerobot_usbhub"
@@ -102,12 +103,14 @@ jobs:
102103
- "feather_m4_express"
103104
- "feather_nrf52840_express"
104105
- "feather_radiofruit_zigbee"
106+
- "feather_stm32f405_express"
105107
- "gemma_m0"
106108
- "grandcentral_m4_express"
107109
- "hallowing_m0_express"
108110
- "hallowing_m4_express"
109111
- "itsybitsy_m0_express"
110112
- "itsybitsy_m4_express"
113+
- "itsybitsy_nrf52840_express"
111114
- "kicksat-sprite"
112115
- "makerdiary_nrf52840_mdk"
113116
- "makerdiary_nrf52840_mdk_usb_dongle"
@@ -128,6 +131,7 @@ jobs:
128131
- "pirkey_m0"
129132
- "pybadge"
130133
- "pybadge_airlift"
134+
- "pyboard_v11"
131135
- "pygamer"
132136
- "pygamer_advance"
133137
- "pyportal"
@@ -140,16 +144,21 @@ jobs:
140144
- "snekboard"
141145
- "sparkfun_lumidrive"
142146
- "sparkfun_nrf52840_mini"
147+
- "sparkfun_qwiic_micro_no_flash"
148+
- "sparkfun_qwiic_micro_with_flash"
143149
- "sparkfun_redboard_turbo"
144150
- "sparkfun_samd21_dev"
145151
- "sparkfun_samd21_mini"
152+
- "spresense"
146153
- "stm32f411ve_discovery"
147154
- "stm32f412zg_discovery"
155+
- "stringcar_m0_express"
148156
- "trellis_m4_express"
149157
- "trinket_m0"
150158
- "trinket_m0_haxpress"
151159
- "uchip"
152160
- "ugame10"
161+
- "winterbloom_sol"
153162

154163
steps:
155164
- name: Set up Python 3.5

.github/workflows/create_website_pr.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
name: Update CircuitPython.org
22

3-
on: release
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
68
website:
@@ -10,9 +12,6 @@ jobs:
1012
env:
1113
GITHUB_CONTEXT: ${{ toJson(github) }}
1214
run: echo "$GITHUB_CONTEXT"
13-
- name: Fail if not a release publish # workaround has `on` doesn't have this filter
14-
run: exit 1
15-
if: github.event.action != 'published'
1615
- name: Set up Python 3.5
1716
uses: actions/setup-python@v1
1817
with:

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,6 @@
9898
[submodule "ports/stm32f4/stm32f4"]
9999
path = ports/stm32f4/stm32f4
100100
url = https://github.com/adafruit/stm32f4.git
101+
[submodule "ports/cxd56/spresense-exported-sdk"]
102+
path = ports/cxd56/spresense-exported-sdk
103+
url = https://github.com/sonydevworld/spresense-exported-sdk.git

conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"ports/cc3200",
126126
"ports/cc3200/FreeRTOS",
127127
"ports/cc3200/hal",
128+
"ports/cxd56/spresense-exported-sdk",
128129
"ports/esp32",
129130
"ports/esp8266/boards",
130131
"ports/esp8266/common-hal",
@@ -139,7 +140,6 @@
139140
"ports/stm32f4/stm32f4",
140141
"ports/stm32f4/peripherals",
141142
"ports/stm32f4/ref",
142-
"ports/stm32f4/README.md",
143143
"ports/pic16bit",
144144
"ports/qemu-arm",
145145
"ports/stm32",

docs/shared_bindings_matrix.py

Lines changed: 55 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ def read_mpconfig():
8787
def build_module_map():
8888
""" Establish the base of the JSON file, based on the contents from
8989
`configs`. Base will contain module names, if they're part of
90-
the `FULL_BUILD`, or their default value (0 | 1).
90+
the `FULL_BUILD`, or their default value (0, 1, or a list of
91+
modules that determine default [see audiocore, audiomixer, etc.]).
9192
9293
"""
9394
base = dict()
@@ -98,23 +99,25 @@ def build_module_map():
9899
full_name = module
99100
search_name = module.lstrip("_")
100101
re_pattern = "CIRCUITPY_{}\s=\s(.+)".format(search_name.upper())
101-
find_config = re.search(re_pattern, configs)
102-
#print(module, "|", find_config)
102+
find_config = re.findall(re_pattern, configs)
103103
if not find_config:
104104
continue
105-
full_build = int("FULL_BUILD" in find_config.group(0))
106-
#print(find_config[1])
105+
find_config = ", ".join([x.strip("$()") for x in find_config])
106+
107+
full_build = int("CIRCUITPY_FULL_BUILD" in find_config)
107108
if not full_build:
108-
default_val = find_config.group(1)
109+
default_val = find_config
109110
else:
110111
default_val = "None"
112+
111113
base[search_name] = {
112114
"name": full_name,
113115
"full_build": str(full_build),
114116
"default_value": default_val,
115117
"excluded": {}
116118
}
117119

120+
#print(base)
118121
return base
119122

120123

@@ -166,21 +169,40 @@ def get_excluded_boards(base):
166169
if board_chip in port_config:
167170
contents += "\n" + "\n".join(port_config[board_chip])
168171

172+
check_dependent_modules = dict()
169173
for module in modules:
170174
board_is_excluded = False
171175
# check if board uses `SMALL_BUILD`. if yes, and current
172176
# module is marked as `FULL_BUILD`, board is excluded
173177
small_build = re.search("CIRCUITPY_SMALL_BUILD = 1", contents)
174178
if small_build and base[module]["full_build"] == "1":
175179
board_is_excluded = True
180+
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+
176187
# check if module is specifically disabled for this board
177188
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
178189
find_module = re.search(re_pattern, contents)
179190
if not find_module:
180-
# check if default inclusion is off ('0'). if the board doesn't
181-
# have it explicitly enabled, its excluded.
182-
if base[module]["default_value"] == "0":
183-
board_is_excluded = True
191+
if base[module]["default_value"].isdigit():
192+
# check if default inclusion is off ('0'). if the board doesn't
193+
# have it explicitly enabled, its excluded.
194+
if base[module]["default_value"] == "0":
195+
board_is_excluded = True
196+
else:
197+
# this module is dependent on another module. add it
198+
# to the list to check after processing all other modules.
199+
# only need to check exclusion if it isn't already excluded.
200+
if (not board_is_excluded and
201+
base[module]["default_value"] not in [
202+
"None",
203+
"CIRCUITPY_DEFAULT_BUILD"
204+
]):
205+
check_dependent_modules[module] = base[module]["default_value"]
184206
else:
185207
if (find_module.group(1) == "0" and
186208
find_module.group(1) != base[module]["default_value"]):
@@ -191,6 +213,29 @@ def get_excluded_boards(base):
191213
base[module]["excluded"][board_chip].append(entry.name)
192214
else:
193215
base[module]["excluded"][board_chip] = [entry.name]
216+
217+
for module in check_dependent_modules:
218+
depend_results = set()
219+
220+
parents = check_dependent_modules[module].split("CIRCUITPY_")
221+
parents = [item.strip(", ").lower() for item in parents if item]
222+
223+
for parent in parents:
224+
if parent in base:
225+
if (board_chip in base[parent]["excluded"] and
226+
entry.name in base[parent]["excluded"][board_chip]):
227+
depend_results.add(False)
228+
else:
229+
depend_results.add(True)
230+
231+
# only exclude the module if there were zero parents enabled
232+
# as determined by the 'depend_results' set.
233+
if not any(depend_results):
234+
if board_chip in base[module]["excluded"]:
235+
base[module]["excluded"][board_chip].append(entry.name)
236+
else:
237+
base[module]["excluded"][board_chip] = [entry.name]
238+
194239
#print(json.dumps(base, indent=2))
195240
return base
196241

docs/supported_ports.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ and ESP8266.
88
:maxdepth: 2
99

1010
../ports/atmel-samd/README
11-
../ports/esp8266/README
1211
../ports/nrf/README
12+
../ports/stm32f4/README
13+
../ports/cxd56/README
File renamed without changes.

extmod/modframebuf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
#if MICROPY_PY_FRAMEBUF
3333

34-
#include "ports/stm32/font_petme128_8x8.h"
34+
#include "font_petme128_8x8.h"
3535

3636
typedef struct _mp_obj_framebuf_t {
3737
mp_obj_base_t base;

lib/stm32lib

Submodule stm32lib deleted from d2bcfda

lib/tinyusb

Submodule tinyusb updated 230 files

lib/utils/interrupt_char.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ void mp_keyboard_interrupt(void) {
4949

5050
// Check to see if we've been CTRL-C'ed by autoreload or the user.
5151
bool mp_hal_is_interrupted(void) {
52-
return MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
52+
return MP_STATE_VM(mp_pending_exception) != NULL;
5353
}
5454

5555
#endif

0 commit comments

Comments
 (0)
0