Skip to content

Commit 8f0e72c

Browse files
committed
Merge remote-tracking branch 'origin/main' into feather-esp32-s23-reverse-tft
2 parents 12545fb + 037bfb3 commit 8f0e72c

File tree

359 files changed

+9921
-5880
lines changed

Some content is hidden

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

359 files changed

+9921
-5880
lines changed

.devcontainer/Readme.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Build CircuitPython in a Github-Devcontainer
2+
============================================
3+
4+
To build CircuitPython within a Github-Devcontainer, you need to perform
5+
the following steps.
6+
7+
1. checkout the code to a devcontainer
8+
9+
- click on the green "<> Code"-button
10+
- select the Codespaces-tab
11+
- choose "+ new with options..." from the "..."-menu
12+
- in the following screen select the branch and then
13+
- select ".devcontainer/cortex-m/devcontainer.json" instead
14+
of "Default Codespaces configuration"
15+
- update region as necessary
16+
- finally, click on the green "Create codespace" button
17+
18+
2. Your codespace is created. Cloning the images is quite fast, but
19+
preparing it for CircuitPython-development takes about 10 minutes.
20+
Note that this is a one-time task.
21+
22+
3. During creation, you can run the command
23+
`tail -f /workspaces/.codespaces/.persistedshare/creation.log`
24+
to see what is going on.
25+
26+
4. To actually build CircuitPython, run
27+
28+
cd ports/raspberrypi
29+
make -j $(nproc) BOARD=whatever TRANSLATION=xx_XX
30+
31+
This takes about 2m40s.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/universal
3+
{
4+
"name": "CircuitPython Cortex-M Build-Environment (base: Default Linux Universal)",
5+
"image": "mcr.microsoft.com/devcontainers/universal:2-linux",
6+
"postCreateCommand": ".devcontainer/cortex-m/on-create.sh",
7+
"remoteEnv": { "PATH": "/workspaces/gcc-arm-none-eabi/bin:${containerEnv:PATH}" }
8+
9+
// Features to add to the dev container. More info: https://containers.dev/features.
10+
// "features": {},
11+
12+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
13+
// "forwardPorts": [],
14+
15+
// Use 'postCreateCommand' to run commands after the container is created.
16+
// "postCreateCommand": "uname -a",
17+
18+
// Configure tool-specific properties.
19+
// "customizations": {},
20+
21+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
22+
// "remoteUser": "root"
23+
}

.devcontainer/cortex-m/on-create.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# -----------------------------------------------------------------------------
3+
# on-create.sh: postCreateCommand-hook for devcontainer.json (Cortex-M build)
4+
#
5+
# Author: Bernhard Bablok
6+
#
7+
# -----------------------------------------------------------------------------
8+
9+
echo -e "[on-create.sh] downloading and installing gcc-arm-non-eabi toolchain"
10+
cd /workspaces
11+
wget -qO gcc-arm-none-eabi.tar.bz2 https://adafru.it/Pid
12+
tar -xjf gcc-arm-none-eabi.tar.bz2
13+
ln -s gcc-arm-none-eabi-10-2020-q4-major gcc-arm-none-eabi
14+
rm -f /workspaces/gcc-arm-none-eabi.tar.bz2
15+
export PATH=/workspaces/gcc-arm-none-eabi/bin:$PATH
16+
17+
# add repository and install tools
18+
echo -e "[on-create.sh] adding pybricks/ppa"
19+
sudo add-apt-repository -y ppa:pybricks/ppa
20+
echo -e "[on-create.sh] installing uncrustify and mtools"
21+
sudo apt-get -y install uncrustify mtools
22+
23+
# dosfstools >= 4.2 needed, standard repo only has 4.1
24+
echo -e "[on-create.sh] downloading and installing dosfstools"
25+
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
26+
tar -xzf dosfstools-4.2.tar.gz
27+
cd dosfstools-4.2/
28+
./configure
29+
make -j $(nproc)
30+
sudo make install
31+
cd /workspaces
32+
rm -fr /workspaces/dosfstools-4.2 /workspaces/dosfstools-4.2.tar.gz
33+
34+
# prepare source-code tree
35+
cd /workspaces/circuitpython/
36+
echo -e "[on-create.sh] fetching submodules"
37+
make fetch-submodules
38+
echo -e "[on-create.sh] fetching tags"
39+
git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD
40+
41+
# additional python requirements
42+
echo -e "[on-create.sh] pip-installing requirements"
43+
pip install --upgrade -r requirements-dev.txt
44+
pip install --upgrade -r requirements-doc.txt
45+
46+
# add pre-commit
47+
echo -e "[on-create.sh] installing pre-commit"
48+
pre-commit install
49+
50+
# create cross-compiler
51+
echo -e "[on-create.sh] building mpy-cross"
52+
make -j $(nproc) -C mpy-cross # time: about 36 sec
53+
54+
# that's it!
55+
echo -e "[on-create.sh] setup complete"
56+
57+
#commands to actually build CP:
58+
#cd ports/raspberrypi
59+
#time make -j $(nproc) BOARD=pimoroni_tufty2040 TRANSLATION=de_DE

.github/workflows/build.yml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Set up Python 3
3838
uses: actions/setup-python@v4
3939
with:
40-
python-version: "3.10"
40+
python-version: "3.x"
4141
- name: Get CP deps
4242
run: python tools/ci_fetch_deps.py test ${{ github.sha }}
4343
- name: CircuitPython version
@@ -125,20 +125,30 @@ jobs:
125125
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
126126
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
127127
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
128-
- name: "Get changes"
128+
- name: Get last commit with checks
129+
id: get-last-commit-with-checks
129130
if: github.event_name == 'pull_request'
130-
uses: dorny/paths-filter@v2
131-
id: filter
132-
with:
133-
list-files: json
134-
filters: |
135-
changed:
136-
- '**'
137-
- name: "Set matrix"
131+
working-directory: tools
132+
env:
133+
REPO: ${{ github.repository }}
134+
PULL: ${{ github.event.number }}
135+
GITHUB_TOKEN: ${{ github.token }}
136+
EXCLUDE_COMMIT: ${{ github.event.after }}
137+
run: python3 -u ci_changes_per_commit.py
138+
- name: Get changes
139+
id: get-changes
140+
if: github.event_name == 'pull_request'
141+
uses: tj-actions/changed-files@v34
142+
with:
143+
json: true
144+
sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }}
145+
base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }}
146+
- name: Set matrix
138147
id: set-matrix
139148
working-directory: tools
140149
env:
141-
CHANGED_FILES: ${{ steps.filter.outputs.changed_files }}
150+
CHANGED_FILES: ${{ steps.get-changes.outputs.all_changed_and_modified_files }}
151+
LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }}
142152
run: python3 -u ci_set_matrix.py
143153

144154

.github/workflows/create_website_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Python 3
2424
uses: actions/setup-python@v4
2525
with:
26-
python-version: "3.10"
26+
python-version: "3.x"
2727
- name: Get CP deps
2828
run: python tools/ci_fetch_deps.py website ${{ github.sha }}
2929
- name: Install deps

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Set up Python 3
2121
uses: actions/setup-python@v4
2222
with:
23-
python-version: "3.10"
23+
python-version: "3.x"
2424
- name: Install deps
2525
run: |
2626
sudo apt-get install -y gettext uncrustify

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
!atmel-samd/asf/**/*.a
1010
*.elf
1111
*.bin
12+
!*.toml.bin
1213
*.map
1314
*.hex
1415
*.dis

.gitmodules

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@
146146
[submodule "ports/espressif/esp-idf"]
147147
path = ports/espressif/esp-idf
148148
url = https://github.com/adafruit/esp-idf.git
149-
branch = circuitpython8
149+
branch = release/v4.4-circuitpython
150150
[submodule "ports/espressif/certificates/nina-fw"]
151151
path = lib/certificates/nina-fw
152152
url = https://github.com/adafruit/nina-fw.git
@@ -310,12 +310,15 @@
310310
[submodule "ports/espressif/esp32-camera"]
311311
path = ports/espressif/esp32-camera
312312
url = https://github.com/adafruit/esp32-camera/
313+
branch = circuitpython
313314
[submodule "ports/raspberrypi/lib/cyw43-driver"]
314315
path = ports/raspberrypi/lib/cyw43-driver
315-
url = https://github.com/georgerobotics/cyw43-driver.git
316+
url = https://github.com/adafruit/cyw43-driver.git
317+
branch = circuitpython8
316318
[submodule "ports/raspberrypi/lib/lwip"]
317319
path = ports/raspberrypi/lib/lwip
318-
url = https://github.com/lwip-tcpip/lwip.git
320+
url = https://github.com/adafruit/lwip.git
321+
branch = circuitpython8
319322
[submodule "lib/mbedtls"]
320323
path = lib/mbedtls
321324
url = https://github.com/ARMmbed/mbedtls.git

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ clean:
9090
rm -rf autoapi
9191
rm -rf $(STUBDIR) $(DISTDIR) *.egg-info
9292

93-
html: stubs
93+
html:
9494
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
9595
@echo
9696
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ def autoapi_prepare_jinja_env(jinja_env):
171171
".env",
172172
".venv",
173173
".direnv",
174+
".devcontainer/Readme.md",
174175
"data",
175176
"docs/autoapi",
176177
"docs/README.md",

0 commit comments

Comments
 (0)