Skip to content

Commit

Permalink
Merge pull request #1 from adafruit/master
Browse files Browse the repository at this point in the history
add in 5.0rc changes
  • Loading branch information
TG-Techie authored Feb 28, 2020
2 parents c000567 + 1b33cd1 commit 75aea6b
Show file tree
Hide file tree
Showing 800 changed files with 35,680 additions and 6,698 deletions.
83 changes: 81 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ jobs:
python-version: 3.5
- name: Install deps
run: |
sudo apt-get install -y gettext librsvg2-bin
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64
pip install requests sh click setuptools cpp-coveralls Sphinx sphinx-rtd-theme recommonmark sphinxcontrib-svg2pdfconverter polib pyyaml
- name: Versions
run: |
Expand Down Expand Up @@ -66,24 +67,77 @@ jobs:
run: python3 -u ci_new_boards_check.py
working-directory: tools

- name: Build mpy-cross.static-raspbian
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-raspbian
path: mpy-cross/mpy-cross.static-raspbian

- name: Build mpy-cross.static
run: make -C mpy-cross -j2 -f Makefile.static
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-amd64-linux
path: mpy-cross/mpy-cross.static

- name: Build mpy-cross.static-mingw
run: make -C mpy-cross -j2 -f Makefile.static-mingw
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross.static-x64-windows
path: mpy-cross/mpy-cross.static.exe

mpy-cross-mac:
runs-on: macos-latest
steps:
- name: Dump GitHub context
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: echo "$GITHUB_CONTEXT"
- name: Install deps
run: |
brew link --force gettext
- name: Versions
run: |
gcc --version
python3 --version
msgfmt --version
- uses: actions/checkout@v1
with:
submodules: true
- name: CircuitPython version
run: git describe --dirty --always --tags
- name: Build mpy-cross
run: make -C mpy-cross -j2
- uses: actions/upload-artifact@v1.0.0
with:
name: mpy-cross-macos-catalina
path: mpy-cross/mpy-cross

build-arm:
runs-on: ubuntu-16.04
needs: test
strategy:
fail-fast: false
matrix:
board:
- "aramcon_badge_2019"
- "arduino_mkr1300"
- "arduino_mkrzero"
- "arduino_nano_33_ble"
- "arduino_nano_33_iot"
- "arduino_zero"
- "bast_pro_mini_m0"
- "capablerobot_usbhub"
- "catwan_usbstick"
- "circuitbrains_basic_m0"
- "circuitbrains_deluxe_m4"
- "circuitplayground_bluefruit"
- "circuitplayground_express"
- "circuitplayground_express_crickit"
- "circuitplayground_express_displayio"
- "clue_nrf52840_express"
- "cp32-m4"
- "datalore_ip_m4"
- "datum_distance"
Expand All @@ -93,6 +147,9 @@ jobs:
- "electronut_labs_blip"
- "electronut_labs_papyr"
- "escornabot_makech"
- "espruino_pico"
- "espruino_wifi"
- "feather_bluefruit_sense"
- "feather_m0_adalogger"
- "feather_m0_basic"
- "feather_m0_express"
Expand All @@ -101,26 +158,36 @@ jobs:
- "feather_m0_rfm9x"
- "feather_m0_supersized"
- "feather_m4_express"
- "feather_m7_1011"
- "feather_mimxrt1011"
- "feather_mimxrt1062"
- "feather_nrf52840_express"
- "feather_radiofruit_zigbee"
- "feather_stm32f405_express"
- "gemma_m0"
- "grandcentral_m4_express"
- "hallowing_m0_express"
- "hallowing_m4_express"
- "imxrt1010_evk"
- "imxrt1020_evk"
- "imxrt1060_evk"
- "itsybitsy_m0_express"
- "itsybitsy_m4_express"
- "itsybitsy_nrf52840_express"
- "kicksat-sprite"
- "makerdiary_nrf52840_mdk"
- "makerdiary_nrf52840_mdk_usb_dongle"
- "meowbit_v121"
- "meowmeow"
- "metro_m0_express"
- "metro_m4_airlift_lite"
- "metro_m4_express"
- "metro_nrf52840_express"
- "mini_sam_m4"
- "monster_m4sk"
- "ndgarage_ndbit6"
- "ohs2020_badge"
- "openbook_m4"
- "particle_argon"
- "particle_boron"
- "particle_xenon"
Expand All @@ -129,17 +196,21 @@ jobs:
- "pewpew10"
- "pewpew_m4"
- "pirkey_m0"
- "pyb_nano_v2"
- "pybadge"
- "pybadge_airlift"
- "pyboard_v11"
- "pycubed"
- "pygamer"
- "pygamer_advance"
- "pyportal"
- "pyportal_titano"
- "pyruler"
- "robohatmm1_m4"
- "sam32"
- "seeeduino_xiao"
- "serpente"
- "shirtty"
- "snekboard"
- "sparkfun_lumidrive"
- "sparkfun_nrf52840_mini"
Expand All @@ -148,16 +219,23 @@ jobs:
- "sparkfun_redboard_turbo"
- "sparkfun_samd21_dev"
- "sparkfun_samd21_mini"
- "sparkfun_samd51_thing_plus"
- "spresense"
- "stm32f411ce_blackpill"
- "stm32f411ve_discovery"
- "stm32f412zg_discovery"
- "stm32f4_discovery"
- "stringcar_m0_express"
- "teensy40"
- "teknikio_bluebird"
- "trellis_m4_express"
- "trinket_m0"
- "trinket_m0_haxpress"
- "uchip"
- "ugame10"
- "winterbloom_sol"
- "xinabox_cc03"
- "xinabox_cs11"

steps:
- name: Set up Python 3.5
Expand All @@ -168,7 +246,8 @@ jobs:
run: |
sudo apt-get install -y gettext
pip install requests sh click setuptools awscli
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
wget https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-x86_64-linux.tar.bz2
- name: Versions
run: |
gcc --version
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ TAGS
*~

*.DS_Store
**/*.DS_Store
*.icloud

# POEdit mo files
####################
Expand Down
15 changes: 14 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
[submodule "lib/tinyusb"]
path = lib/tinyusb
url = https://github.com/hathach/tinyusb.git
branch = develop
branch = master
fetchRecurseSubmodules = false
[submodule "tools/huffman"]
path = tools/huffman
url = https://github.com/tannewt/huffman.git
Expand All @@ -101,3 +102,15 @@
[submodule "ports/cxd56/spresense-exported-sdk"]
path = ports/cxd56/spresense-exported-sdk
url = https://github.com/sonydevworld/spresense-exported-sdk.git
[submodule "frozen/Adafruit_CircuitPython_SD"]
path = frozen/Adafruit_CircuitPython_SD
url = https://github.com/adafruit/Adafruit_CircuitPython_SD.git
[submodule "lib/mp3"]
path = lib/mp3
url = https://github.com/adafruit/Adafruit_MP3
[submodule "ports/mimxrt10xx/sdk"]
path = ports/mimxrt10xx/sdk
url = https://github.com/adafruit/MIMXRT10xx_SDK
[submodule "frozen/Adafruit_CircuitPython_Register"]
path = frozen/Adafruit_CircuitPython_Register
url = https://github.com/adafruit/Adafruit_CircuitPython_Register.git
82 changes: 82 additions & 0 deletions BUILDING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@

# Building CircuitPython

Welcome to CircuitPython!

This document is a quick-start guide only.

Detailed guides on how to build CircuitPython can be found in the Adafruit Learn system at
https://learn.adafruit.com/building-circuitpython/

## Setup

Please ensure you setup your build environment appropriately, as per the guide. You will need:

* Linux: https://learn.adafruit.com/building-circuitpython/linux
* MacOS: https://learn.adafruit.com/building-circuitpython/macos
* Windows Subsystem for Linux (WSL): https://learn.adafruit.com/building-circuitpython/windows-subsystem-for-linux

### Submodules

This project has a bunch of git submodules. You will need to update them regularly.

git submodule sync
git submodule update --init

### mpy-cross

As part of the build process, mpy-cross is needed to compile .py files into .mpy files.
To compile (or recompile) mpy-cross:

make -C mpy-cross

# Building

There a number of ports of CircuitPython! To build for your board, change to the appropriate ports directory and build.

Examples:

cd ports/atmel-samd
make BOARD=circuitplayground_express

cd ports/nrf
make BOARD=circuitplayground_bluefruit

If you aren't sure what boards exist, have a peek in the boards subdirectory of your port.
If you have a fast computer with many cores, consider adding `-j` to your build flags, such as `-j17` on
a 6-core 12-thread machine.

# Testing

If you are working on changes to the core language, you might find it useful to run the test suite.
The test suite in the top level `tests` directory. It needs the unix port to run.

cd ports/unix
make axtls
make micropython

Then you can run the test suite:

cd ../../tests
./run-tests

A successful run will say something like

676 tests performed (19129 individual testcases)
676 tests passed
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

# Debugging

The easiest way to debug CircuitPython on hardware is with a JLink device, JLinkGDBServer, and an appropriate GDB.
Instructions can be found at https://learn.adafruit.com/debugging-the-samd21-with-gdb

If using JLink, you'll need both the `JLinkGDBServer` and `arm-none-eabi-gdb` running.

Example:

JLinkGDBServer -if SWD -device ATSAMD51J19
arm-none-eabi-gdb build-metro_m4_express/firmware.elf -iex "target extended-remote :2331"

If your port/build includes `arm-none-eabi-gdb-py`, consider using it instead, as it can be used for better register
debugging with https://github.com/bnahill/PyCortexMDebug
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(BASEOPTS)

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

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

Expand Down
13 changes: 6 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ Differences from `MicroPython <https://github.com/micropython/micropython>`__

CircuitPython:

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

Behavior
Expand Down
3 changes: 3 additions & 0 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,15 @@
"ports/cc3200",
"ports/cc3200/FreeRTOS",
"ports/cc3200/hal",
"ports/cxd56/mkspk",
"ports/cxd56/spresense-exported-sdk",
"ports/esp32",
"ports/esp8266/boards",
"ports/esp8266/common-hal",
"ports/esp8266/modules",
"ports/minimal",
"ports/mimxrt10xx/peripherals",
"ports/mimxrt10xx/sdk",
"ports/nrf/device",
"ports/nrf/bluetooth",
"ports/nrf/modules",
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ Full Table of Contents

../README
../CONTRIBUTING
../BUILDING
../CODE_OF_CONDUCT
../license.rst

Expand Down
8 changes: 3 additions & 5 deletions docs/shared_bindings_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import re


SUPPORTED_PORTS = ["atmel-samd", "nrf"]
SUPPORTED_PORTS = ["atmel-samd", "nrf", "mimxrt10xx"]


def parse_port_config(contents, chip_keyword=None):
Expand Down Expand Up @@ -185,7 +185,7 @@ def get_excluded_boards(base):
board_is_excluded = True

# check if module is specifically disabled for this board
re_pattern = "CIRCUITPY_{}\s=\s(\w)".format(module.upper())
re_pattern = r"CIRCUITPY_{}\s=\s(\w)".format(module.upper())
find_module = re.search(re_pattern, contents)
if not find_module:
if base[module]["default_value"].isdigit():
Expand All @@ -204,9 +204,7 @@ def get_excluded_boards(base):
]):
check_dependent_modules[module] = base[module]["default_value"]
else:
if (find_module.group(1) == "0" and
find_module.group(1) != base[module]["default_value"]):
board_is_excluded = True
board_is_excluded = find_module.group(1) == "0"

if board_is_excluded:
if board_chip in base[module]["excluded"]:
Expand Down
1 change: 1 addition & 0 deletions docs/supported_ports.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and ESP8266.
:maxdepth: 2

../ports/atmel-samd/README
../ports/mimxrt10xx/README
../ports/nrf/README
../ports/stm32f4/README
../ports/cxd56/README
Loading

0 comments on commit 75aea6b

Please sign in to comment.