Skip to content

Commit fe70072

Browse files
authored
Merge branch 'master' into ndbit6
2 parents 4675783 + b3c09e1 commit fe70072

File tree

619 files changed

+23343
-6638
lines changed

Some content is hidden

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

619 files changed

+23343
-6638
lines changed

.github/workflows/build.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ jobs:
7373
fail-fast: false
7474
matrix:
7575
board:
76+
- "aramcon_badge_2019"
7677
- "arduino_mkr1300"
7778
- "arduino_mkrzero"
7879
- "arduino_nano_33_ble"
@@ -84,6 +85,7 @@ jobs:
8485
- "circuitplayground_express"
8586
- "circuitplayground_express_crickit"
8687
- "circuitplayground_express_displayio"
88+
- "clue_nrf52840_express"
8789
- "cp32-m4"
8890
- "datalore_ip_m4"
8991
- "datum_distance"
@@ -101,13 +103,16 @@ jobs:
101103
- "feather_m0_rfm9x"
102104
- "feather_m0_supersized"
103105
- "feather_m4_express"
106+
- "feather_mimxrt1011"
107+
- "feather_mimxrt1062"
104108
- "feather_nrf52840_express"
105109
- "feather_radiofruit_zigbee"
106110
- "feather_stm32f405_express"
107111
- "gemma_m0"
108112
- "grandcentral_m4_express"
109113
- "hallowing_m0_express"
110114
- "hallowing_m4_express"
115+
- "imxrt1010_evk"
111116
- "itsybitsy_m0_express"
112117
- "itsybitsy_m4_express"
113118
- "itsybitsy_nrf52840_express"
@@ -122,6 +127,8 @@ jobs:
122127
- "mini_sam_m4"
123128
- "monster_m4sk"
124129
- "ndgarage_ndbit6"
130+
- "ohs2020_badge"
131+
- "openbook_m4"
125132
- "particle_argon"
126133
- "particle_boron"
127134
- "particle_xenon"
@@ -130,6 +137,7 @@ jobs:
130137
- "pewpew10"
131138
- "pewpew_m4"
132139
- "pirkey_m0"
140+
- "pyb_nano_v2"
133141
- "pybadge"
134142
- "pybadge_airlift"
135143
- "pyboard_v11"
@@ -138,10 +146,11 @@ jobs:
138146
- "pyportal"
139147
- "pyportal_titano"
140148
- "pyruler"
141-
- "robohatmm1_m0"
142149
- "robohatmm1_m4"
143150
- "sam32"
151+
- "seeeduino_xiao"
144152
- "serpente"
153+
- "shirtty"
145154
- "snekboard"
146155
- "sparkfun_lumidrive"
147156
- "sparkfun_nrf52840_mini"
@@ -151,15 +160,19 @@ jobs:
151160
- "sparkfun_samd21_dev"
152161
- "sparkfun_samd21_mini"
153162
- "spresense"
163+
- "stm32f411ce_blackpill"
154164
- "stm32f411ve_discovery"
155165
- "stm32f412zg_discovery"
156166
- "stringcar_m0_express"
167+
- "teknikio_bluebird"
157168
- "trellis_m4_express"
158169
- "trinket_m0"
159170
- "trinket_m0_haxpress"
160171
- "uchip"
161172
- "ugame10"
162173
- "winterbloom_sol"
174+
- "xinabox_cc03"
175+
- "xinabox_cs11"
163176

164177
steps:
165178
- name: Set up Python 3.5
@@ -170,7 +183,8 @@ jobs:
170183
run: |
171184
sudo apt-get install -y gettext
172185
pip install requests sh click setuptools awscli
173-
wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~xenial1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb
186+
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
187+
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
174188
- name: Versions
175189
run: |
176190
gcc --version
@@ -191,7 +205,7 @@ jobs:
191205
name: ${{ matrix.board }}
192206
path: bin/${{ matrix.board }}
193207
- name: Upload to S3
194-
run: aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1
208+
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
195209
env:
196210
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
197211
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
@@ -200,7 +214,7 @@ jobs:
200214
run: |
201215
pip install uritemplate
202216
- name: Upload to Release
203-
run: python3 -u upload_release_files.py
217+
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
204218
working-directory: tools
205219
env:
206220
UPLOAD_URL: ${{ github.event.release.upload_url }}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ TAGS
6565
*~
6666

6767
*.DS_Store
68+
**/*.DS_Store
69+
*.icloud
6870

6971
# POEdit mo files
7072
####################

.gitmodules

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@
7676
[submodule "lib/tinyusb"]
7777
path = lib/tinyusb
7878
url = https://github.com/hathach/tinyusb.git
79-
branch = develop
79+
branch = master
80+
fetchRecurseSubmodules = false
8081
[submodule "tools/huffman"]
8182
path = tools/huffman
8283
url = https://github.com/tannewt/huffman.git
@@ -101,3 +102,12 @@
101102
[submodule "ports/cxd56/spresense-exported-sdk"]
102103
path = ports/cxd56/spresense-exported-sdk
103104
url = https://github.com/sonydevworld/spresense-exported-sdk.git
105+
[submodule "frozen/Adafruit_CircuitPython_SD"]
106+
path = frozen/Adafruit_CircuitPython_SD
107+
url = https://github.com/adafruit/Adafruit_CircuitPython_SD.git
108+
[submodule "lib/mp3"]
109+
path = lib/mp3
110+
url = https://github.com/adafruit/Adafruit_MP3
111+
[submodule "ports/mimxrt10xx/sdk"]
112+
path = ports/mimxrt10xx/sdk
113+
url = https://github.com/arturo182/MIMXRT10xx_SDK

BUILDING.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
2+
# Building CircuitPython
3+
4+
Welcome to CircuitPython!
5+
6+
This document is a quick-start guide only.
7+
8+
Detailed guides on how to build CircuitPython can be found in the Adafruit Learn system at
9+
https://learn.adafruit.com/building-circuitpython/
10+
11+
## Setup
12+
13+
Please ensure you setup your build environment appropriately, as per the guide. You will need:
14+
15+
* Linux: https://learn.adafruit.com/building-circuitpython/linux
16+
* MacOS: https://learn.adafruit.com/building-circuitpython/macos
17+
* Windows Subsystem for Linux (WSL): https://learn.adafruit.com/building-circuitpython/windows-subsystem-for-linux
18+
19+
### Submodules
20+
21+
This project has a bunch of git submodules. You will need to update them regularly.
22+
23+
git submodule sync
24+
git submodule update --init
25+
26+
### mpy-cross
27+
28+
As part of the build process, mpy-cross is needed to compile .py files into .mpy files.
29+
To compile (or recompile) mpy-cross:
30+
31+
make -C mpy-cross
32+
33+
# Building
34+
35+
There a number of ports of CircuitPython! To build for your board, change to the appropriate ports directory and build.
36+
37+
Examples:
38+
39+
cd ports/atmel-samd
40+
make BOARD=circuitplayground_express
41+
42+
cd ports/nrf
43+
make BOARD=circuitplayground_bluefruit
44+
45+
If you aren't sure what boards exist, have a peek in the boards subdirectory of your port.
46+
If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on
47+
a 6-core 12-thread machine.
48+
49+
# Testing
50+
51+
If you are working on changes to the core language, you might find it useful to run the test suite.
52+
The test suite in the top level `tests` directory. It needs the unix port to run.
53+
54+
cd ports/unix
55+
make axtls
56+
make micropython
57+
58+
Then you can run the test suite:
59+
60+
cd ../../tests
61+
./run-tests
62+
63+
A successful run will say something like
64+
65+
676 tests performed (19129 individual testcases)
66+
676 tests passed
67+
30 tests skipped: buffered_writer builtin_help builtin_range_binop class_delattr_setattr cmd_parsetree extra_coverage framebuf1 framebuf16 framebuf2 framebuf4 framebuf8 framebuf_subclass mpy_invalid namedtuple_asdict non_compliant resource_stream schedule sys_getsizeof urandom_extra ure_groups ure_span ure_sub ure_sub_unmatched vfs_basic vfs_fat_fileio1 vfs_fat_fileio2 vfs_fat_more vfs_fat_oldproto vfs_fat_ramdisk vfs_userfs
68+
69+
# Debugging
70+
71+
The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
72+
Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb
73+
74+
If using JLink, you'll need both the `JLinkGDBServer` and `arm-none-eabi-gdb` running.
75+
76+
Example:
77+
78+
JLinkGDBServer -if SWD -device ATSAMD51J19
79+
arm-none-eabi-gdb build-metro_m4_express/firmware.elf -iex "target extended-remote :2331"
80+
81+
If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register
82+
debugging with https://github.com/bnahill/PyCortexMDebug

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ pseudoxml:
204204
all-source:
205205

206206
locale/circuitpython.pot: all-source
207-
find $(TRANSLATE_SOURCES) -iname "*.c" -print0 | (LC_ALL=C sort -z) | xargs -0 xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
207+
find $(TRANSLATE_SOURCES) -iname "*.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
208208

209209
translate: locale/circuitpython.pot
210210
for po in $(shell ls locale/*.po); do msgmerge -U $$po -s --no-fuzzy-matching --add-location=file locale/circuitpython.pot; done

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,13 +94,12 @@ Differences from `MicroPython <https://github.com/micropython/micropython>`__
9494

9595
CircuitPython:
9696

97-
- includes ports for MicroChip SAMD21 (Commonly known as M0 in Adafruit
98-
product names) and SAMD51 (M4).
99-
- supports only SAMD21, SAMD51, and nRF52840 ports.
100-
- tracks MicroPython's releases (not master).
101-
- floats (aka decimals) are enabled for all builds.
102-
- error messages are translated into 10+ languages.
103-
- does not support concurrency within Python (including interrupts and threading). Some concurrency
97+
- Supports native USB on all boards, allowing file editing without special tools.
98+
- Supports only SAMD21, SAMD51, nRF52840, CXD56, STM32F4 and i.MX RT ports.
99+
- Tracks MicroPython's releases (not master).
100+
- Floats (aka decimals) are enabled for all builds.
101+
- Error messages are translated into 10+ languages.
102+
- Does not support concurrency within Python (including interrupts and threading). Some concurrency
104103
is achieved with native modules for tasks that require it such as audio file playback.
105104

106105
Behavior

conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,15 @@
125125
"ports/cc3200",
126126
"ports/cc3200/FreeRTOS",
127127
"ports/cc3200/hal",
128+
"ports/cxd56/mkspk",
128129
"ports/cxd56/spresense-exported-sdk",
129130
"ports/esp32",
130131
"ports/esp8266/boards",
131132
"ports/esp8266/common-hal",
132133
"ports/esp8266/modules",
133134
"ports/minimal",
135+
"ports/mimxrt10xx/peripherals",
136+
"ports/mimxrt10xx/sdk",
134137
"ports/nrf/device",
135138
"ports/nrf/bluetooth",
136139
"ports/nrf/modules",

docs/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ Full Table of Contents
4343

4444
../README
4545
../CONTRIBUTING
46+
../BUILDING
4647
../CODE_OF_CONDUCT
4748
../license.rst
4849

docs/shared_bindings_matrix.py

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

2828

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

3131

3232
def parse_port_config(contents, chip_keyword=None):
@@ -185,7 +185,7 @@ def get_excluded_boards(base):
185185
board_is_excluded = True
186186

187187
# check if module is specifically disabled for this board
188-
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
188+
re_pattern = r"CIRCUITPY_{}\s=\s(\w)".format(module.upper())
189189
find_module = re.search(re_pattern, contents)
190190
if not find_module:
191191
if base[module]["default_value"].isdigit():
@@ -204,9 +204,7 @@ def get_excluded_boards(base):
204204
]):
205205
check_dependent_modules[module] = base[module]["default_value"]
206206
else:
207-
if (find_module.group(1) == "0" and
208-
find_module.group(1) != base[module]["default_value"]):
209-
board_is_excluded = True
207+
board_is_excluded = find_module.group(1) == "0"
210208

211209
if board_is_excluded:
212210
if board_chip in base[module]["excluded"]:

docs/supported_ports.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ and ESP8266.
88
:maxdepth: 2
99

1010
../ports/atmel-samd/README
11+
../ports/mimxrt10xx/README
1112
../ports/nrf/README
1213
../ports/stm32f4/README
1314
../ports/cxd56/README

drivers/wiznet5k/internet/dns/dns.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
#include <string.h>
5454
#include <stdlib.h>
55-
#include "tick.h"
55+
#include "supervisor/shared/tick.h"
5656

5757
//#include "Ethernet/socket.h"
5858
//#include "Internet/DNS/dns.h"
@@ -125,7 +125,7 @@ uint16_t DNS_MSGID; // DNS message ID
125125

126126

127127
uint32_t HAL_GetTick(void) {
128-
return ticks_ms;
128+
return supervisor_ticks_ms32();
129129
}
130130

131131
uint32_t hal_sys_tick;

0 commit comments

Comments
 (0)