Skip to content

Commit 2a75196

Browse files
committed
merge from adafruit/circuitpython
2 parents 4ad004f + 2eb26a6 commit 2a75196

File tree

232 files changed

+10925
-982
lines changed

Some content is hidden

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

232 files changed

+10925
-982
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
- "circuitplayground_express"
8585
- "circuitplayground_express_crickit"
8686
- "circuitplayground_express_displayio"
87+
- "clue_nrf52840_express"
8788
- "cp32-m4"
8889
- "datalore_ip_m4"
8990
- "datum_distance"
@@ -101,13 +102,16 @@ jobs:
101102
- "feather_m0_rfm9x"
102103
- "feather_m0_supersized"
103104
- "feather_m4_express"
105+
- "feather_mimxrt1011"
106+
- "feather_mimxrt1062"
104107
- "feather_nrf52840_express"
105108
- "feather_radiofruit_zigbee"
106109
- "feather_stm32f405_express"
107110
- "gemma_m0"
108111
- "grandcentral_m4_express"
109112
- "hallowing_m0_express"
110113
- "hallowing_m4_express"
114+
- "imxrt1010_evk"
111115
- "itsybitsy_m0_express"
112116
- "itsybitsy_m4_express"
113117
- "itsybitsy_nrf52840_express"
@@ -155,12 +159,15 @@ jobs:
155159
- "stm32f411ve_discovery"
156160
- "stm32f412zg_discovery"
157161
- "stringcar_m0_express"
162+
- "teknikio_bluebird"
158163
- "trellis_m4_express"
159164
- "trinket_m0"
160165
- "trinket_m0_haxpress"
161166
- "uchip"
162167
- "ugame10"
163168
- "winterbloom_sol"
169+
- "xinabox_cc03"
170+
- "xinabox_cs11"
164171

165172
steps:
166173
- name: Set up Python 3.5
@@ -171,7 +178,7 @@ jobs:
171178
run: |
172179
sudo apt-get install -y gettext
173180
pip install requests sh click setuptools awscli
174-
wget https://developer.arm.com/-/media/Files/downloads/gnu-rm/9-2019q4/RC2.1/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
181+
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
175182
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
176183
- name: Versions
177184
run: |

.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: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@
102102
[submodule "ports/cxd56/spresense-exported-sdk"]
103103
path = ports/cxd56/spresense-exported-sdk
104104
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
105108
[submodule "lib/mp3"]
106109
path = lib/mp3
107110
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

conf.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@
131131
"ports/esp8266/common-hal",
132132
"ports/esp8266/modules",
133133
"ports/minimal",
134+
"ports/mimxrt10xx/peripherals",
135+
"ports/mimxrt10xx/sdk",
134136
"ports/nrf/device",
135137
"ports/nrf/bluetooth",
136138
"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: 1 addition & 1 deletion
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):

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

extmod/modbtree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ STATIC mp_obj_t btree_iternext(mp_obj_t self_in) {
247247
}
248248

249249
STATIC mp_obj_t btree_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
250-
mp_obj_btree_t *self = MP_OBJ_TO_PTR(self_in);
250+
mp_obj_btree_t *self = mp_instance_cast_to_native_base(self_in, &btree_type);
251251
if (value == MP_OBJ_NULL) {
252252
// delete
253253
DBT key;

extmod/moductypes.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,8 +518,8 @@ STATIC void uctypes_struct_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest) {
518518
}
519519
}
520520

521-
STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t self_in, mp_obj_t index_in, mp_obj_t value) {
522-
mp_obj_uctypes_struct_t *self = MP_OBJ_TO_PTR(self_in);
521+
STATIC mp_obj_t uctypes_struct_subscr(mp_obj_t base_in, mp_obj_t index_in, mp_obj_t value) {
522+
mp_obj_uctypes_struct_t *self = mp_instance_cast_to_native_base(base_in, &uctypes_struct_type);
523523

524524
if (value == MP_OBJ_NULL) {
525525
// delete

0 commit comments

Comments
 (0)