Skip to content

Commit 7198056

Browse files
authored
Merge pull request #2 from adafruit/5.0.x
5.0.x
2 parents 6d4ffc6 + ba0c14f commit 7198056

File tree

803 files changed

+35710
-6746
lines changed

Some content is hidden

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

803 files changed

+35710
-6746
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ jobs:
2222
python-version: 3.5
2323
- name: Install deps
2424
run: |
25-
sudo apt-get install -y gettext librsvg2-bin
25+
sudo apt-get install -y eatmydata
26+
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64
2627
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
2728
- name: Versions
2829
run: |
@@ -66,24 +67,77 @@ jobs:
6667
run: python3 -u ci_new_boards_check.py
6768
working-directory: tools
6869

70+
- name: Build mpy-cross.static-raspbian
71+
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
72+
- uses: actions/[email protected]
73+
with:
74+
name: mpy-cross.static-raspbian
75+
path: mpy-cross/mpy-cross.static-raspbian
76+
77+
- name: Build mpy-cross.static
78+
run: make -C mpy-cross -j2 -f Makefile.static
79+
- uses: actions/[email protected]
80+
with:
81+
name: mpy-cross.static-amd64-linux
82+
path: mpy-cross/mpy-cross.static
83+
84+
- name: Build mpy-cross.static-mingw
85+
run: make -C mpy-cross -j2 -f Makefile.static-mingw
86+
- uses: actions/[email protected]
87+
with:
88+
name: mpy-cross.static-x64-windows
89+
path: mpy-cross/mpy-cross.static.exe
90+
91+
mpy-cross-mac:
92+
runs-on: macos-latest
93+
steps:
94+
- name: Dump GitHub context
95+
env:
96+
GITHUB_CONTEXT: ${{ toJson(github) }}
97+
run: echo "$GITHUB_CONTEXT"
98+
- name: Install deps
99+
run: |
100+
brew link --force gettext
101+
- name: Versions
102+
run: |
103+
gcc --version
104+
python3 --version
105+
msgfmt --version
106+
- uses: actions/checkout@v1
107+
with:
108+
submodules: true
109+
- name: CircuitPython version
110+
run: git describe --dirty --always --tags
111+
- name: Build mpy-cross
112+
run: make -C mpy-cross -j2
113+
- uses: actions/[email protected]
114+
with:
115+
name: mpy-cross-macos-catalina
116+
path: mpy-cross/mpy-cross
117+
69118
build-arm:
70119
runs-on: ubuntu-16.04
71120
needs: test
72121
strategy:
73122
fail-fast: false
74123
matrix:
75124
board:
125+
- "aramcon_badge_2019"
76126
- "arduino_mkr1300"
77127
- "arduino_mkrzero"
78128
- "arduino_nano_33_ble"
129+
- "arduino_nano_33_iot"
79130
- "arduino_zero"
80131
- "bast_pro_mini_m0"
81132
- "capablerobot_usbhub"
82133
- "catwan_usbstick"
134+
- "circuitbrains_basic_m0"
135+
- "circuitbrains_deluxe_m4"
83136
- "circuitplayground_bluefruit"
84137
- "circuitplayground_express"
85138
- "circuitplayground_express_crickit"
86139
- "circuitplayground_express_displayio"
140+
- "clue_nrf52840_express"
87141
- "cp32-m4"
88142
- "datalore_ip_m4"
89143
- "datum_distance"
@@ -93,6 +147,9 @@ jobs:
93147
- "electronut_labs_blip"
94148
- "electronut_labs_papyr"
95149
- "escornabot_makech"
150+
- "espruino_pico"
151+
- "espruino_wifi"
152+
- "feather_bluefruit_sense"
96153
- "feather_m0_adalogger"
97154
- "feather_m0_basic"
98155
- "feather_m0_express"
@@ -101,26 +158,36 @@ jobs:
101158
- "feather_m0_rfm9x"
102159
- "feather_m0_supersized"
103160
- "feather_m4_express"
161+
- "feather_m7_1011"
162+
- "feather_mimxrt1011"
163+
- "feather_mimxrt1062"
104164
- "feather_nrf52840_express"
105165
- "feather_radiofruit_zigbee"
106166
- "feather_stm32f405_express"
107167
- "gemma_m0"
108168
- "grandcentral_m4_express"
109169
- "hallowing_m0_express"
110170
- "hallowing_m4_express"
171+
- "imxrt1010_evk"
172+
- "imxrt1020_evk"
173+
- "imxrt1060_evk"
111174
- "itsybitsy_m0_express"
112175
- "itsybitsy_m4_express"
113176
- "itsybitsy_nrf52840_express"
114177
- "kicksat-sprite"
115178
- "makerdiary_nrf52840_mdk"
116179
- "makerdiary_nrf52840_mdk_usb_dongle"
180+
- "meowbit_v121"
117181
- "meowmeow"
118182
- "metro_m0_express"
119183
- "metro_m4_airlift_lite"
120184
- "metro_m4_express"
121185
- "metro_nrf52840_express"
122186
- "mini_sam_m4"
123187
- "monster_m4sk"
188+
- "ndgarage_ndbit6"
189+
- "ohs2020_badge"
190+
- "openbook_m4"
124191
- "particle_argon"
125192
- "particle_boron"
126193
- "particle_xenon"
@@ -129,17 +196,21 @@ jobs:
129196
- "pewpew10"
130197
- "pewpew_m4"
131198
- "pirkey_m0"
199+
- "pyb_nano_v2"
132200
- "pybadge"
133201
- "pybadge_airlift"
134202
- "pyboard_v11"
203+
- "pycubed"
135204
- "pygamer"
136205
- "pygamer_advance"
137206
- "pyportal"
138207
- "pyportal_titano"
139208
- "pyruler"
140209
- "robohatmm1_m4"
141210
- "sam32"
211+
- "seeeduino_xiao"
142212
- "serpente"
213+
- "shirtty"
143214
- "snekboard"
144215
- "sparkfun_lumidrive"
145216
- "sparkfun_nrf52840_mini"
@@ -148,16 +219,23 @@ jobs:
148219
- "sparkfun_redboard_turbo"
149220
- "sparkfun_samd21_dev"
150221
- "sparkfun_samd21_mini"
222+
- "sparkfun_samd51_thing_plus"
151223
- "spresense"
224+
- "stm32f411ce_blackpill"
152225
- "stm32f411ve_discovery"
153226
- "stm32f412zg_discovery"
227+
- "stm32f4_discovery"
154228
- "stringcar_m0_express"
229+
- "teensy40"
230+
- "teknikio_bluebird"
155231
- "trellis_m4_express"
156232
- "trinket_m0"
157233
- "trinket_m0_haxpress"
158234
- "uchip"
159235
- "ugame10"
160236
- "winterbloom_sol"
237+
- "xinabox_cc03"
238+
- "xinabox_cs11"
161239

162240
steps:
163241
- name: Set up Python 3.5
@@ -168,7 +246,8 @@ jobs:
168246
run: |
169247
sudo apt-get install -y gettext
170248
pip install requests sh click setuptools awscli
171-
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
249+
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
250+
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
172251
- name: Versions
173252
run: |
174253
gcc --version
@@ -194,13 +273,3 @@ jobs:
194273
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
195274
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
196275
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
197-
- name: Install upload deps
198-
run: |
199-
pip install uritemplate
200-
- name: Upload to Release
201-
run: "[ -z \"$ADABOT_GITHUB_ACCESS_TOKEN\" ] || python3 -u upload_release_files.py"
202-
working-directory: tools
203-
env:
204-
UPLOAD_URL: ${{ github.event.release.upload_url }}
205-
ADABOT_GITHUB_ACCESS_TOKEN: ${{ secrets.BLINKA_GITHUB_ACCESS_TOKEN }}
206-
if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')

.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: 20 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,21 @@
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/adafruit/MIMXRT10xx_SDK
114+
[submodule "frozen/Adafruit_CircuitPython_Register"]
115+
path = frozen/Adafruit_CircuitPython_Register
116+
url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git
117+
[submodule "frozen/Adafruit_CircuitPython_ESP32SPI"]
118+
path = frozen/Adafruit_CircuitPython_ESP32SPI
119+
url = https://github.com/adafruit/Adafruit_CircuitPython_ESP32SPI
120+
[submodule "frozen/Adafruit_CircuitPython_Requests"]
121+
path = frozen/Adafruit_CircuitPython_Requests
122+
url = https://github.com/adafruit/Adafruit_CircuitPython_Requests

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
@@ -36,7 +36,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
3636
# the i18n builder cannot share the environment and doctrees with the others
3737
I18NSPHINXOPTS = $(BASEOPTS)
3838

39-
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/nrf py shared-bindings shared-module supervisor
39+
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/mimxrt10xx ports/nrf ports/stm32f4 py shared-bindings shared-module supervisor
4040

4141
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
4242

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

0 commit comments

Comments
 (0)