Skip to content

Commit 362018d

Browse files
authored
Merge branch 'main' into picow-ap
2 parents b40facd + 2f5ec1c commit 362018d

File tree

115 files changed

+2152
-1283
lines changed

Some content is hidden

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

115 files changed

+2152
-1283
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-mq/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: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.gitmodules

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,10 +312,12 @@
312312
url = https://github.com/adafruit/esp32-camera/
313313
[submodule "ports/raspberrypi/lib/cyw43-driver"]
314314
path = ports/raspberrypi/lib/cyw43-driver
315-
url = https://github.com/georgerobotics/cyw43-driver.git
315+
url = https://github.com/adafruit/cyw43-driver.git
316+
branch = circuitpython8
316317
[submodule "ports/raspberrypi/lib/lwip"]
317318
path = ports/raspberrypi/lib/lwip
318-
url = https://github.com/lwip-tcpip/lwip.git
319+
url = https://github.com/adafruit/lwip.git
320+
branch = circuitpython8
319321
[submodule "lib/mbedtls"]
320322
path = lib/mbedtls
321323
url = https://github.com/ARMmbed/mbedtls.git

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",

locale/ID.po

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ msgstr "%q gagal: %d"
112112
msgid "%q in use"
113113
msgstr "%q sedang digunakan"
114114

115-
#: py/obj.c py/objstr.c py/objstrunicode.c
115+
#: py/objstr.c py/objstrunicode.c
116116
msgid "%q index out of range"
117117
msgstr "%q indeks di luar batas"
118118

@@ -177,7 +177,7 @@ msgstr "%q harus berupa string"
177177
msgid "%q must be an int"
178178
msgstr ""
179179

180-
#: py/argcheck.c
180+
#: py/argcheck.c py/obj.c
181181
msgid "%q must be of type %q"
182182
msgstr "%q harus bertipe %q"
183183

@@ -1683,6 +1683,10 @@ msgstr ""
16831683
msgid "Operation timed out"
16841684
msgstr "Waktu habis"
16851685

1686+
#: ports/raspberrypi/common-hal/mdns/Server.c
1687+
msgid "Out of MDNS service slots"
1688+
msgstr ""
1689+
16861690
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
16871691
msgid "Out of memory"
16881692
msgstr "Kehabisan memori"
@@ -2221,6 +2225,7 @@ msgid "Unable to read color palette data"
22212225
msgstr "Tidak dapat membaca data palet warna"
22222226

22232227
#: ports/espressif/common-hal/mdns/Server.c
2228+
#: ports/raspberrypi/common-hal/mdns/Server.c
22242229
msgid "Unable to start mDNS query"
22252230
msgstr ""
22262231

@@ -3184,7 +3189,7 @@ msgid "index is out of bounds"
31843189
msgstr ""
31853190

31863191
#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c
3187-
#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c
3192+
#: ports/espressif/common-hal/pulseio/PulseIn.c
31883193
#: shared-bindings/bitmaptools/__init__.c
31893194
msgid "index out of range"
31903195
msgstr "index keluar dari jangkauan"
@@ -3436,10 +3441,12 @@ msgid "loopback + silent mode not supported by peripheral"
34363441
msgstr ""
34373442

34383443
#: ports/espressif/common-hal/mdns/Server.c
3444+
#: ports/raspberrypi/common-hal/mdns/Server.c
34393445
msgid "mDNS already initialized"
34403446
msgstr ""
34413447

34423448
#: ports/espressif/common-hal/mdns/Server.c
3449+
#: ports/raspberrypi/common-hal/mdns/Server.c
34433450
msgid "mDNS only works with built-in WiFi"
34443451
msgstr ""
34453452

locale/circuitpython.pot

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ msgstr ""
175175
msgid "%q must be of type %q"
176176
msgstr ""
177177

178-
#: shared-bindings/digitalio/Pull.c
178+
#: py/objexcept.c shared-bindings/digitalio/Pull.c
179179
msgid "%q must be of type %q or None"
180180
msgstr ""
181181

@@ -894,6 +894,10 @@ msgstr ""
894894
msgid "Drive mode not used when direction is input."
895895
msgstr ""
896896

897+
#: py/obj.c
898+
msgid "During handling of the above exception, another exception occurred:"
899+
msgstr ""
900+
897901
#: shared-bindings/aesio/aes.c
898902
msgid "ECB only operates on 16 bytes at a time"
899903
msgstr ""
@@ -1663,6 +1667,10 @@ msgstr ""
16631667
msgid "Operation timed out"
16641668
msgstr ""
16651669

1670+
#: ports/raspberrypi/common-hal/mdns/Server.c
1671+
msgid "Out of MDNS service slots"
1672+
msgstr ""
1673+
16661674
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
16671675
msgid "Out of memory"
16681676
msgstr ""
@@ -2011,6 +2019,10 @@ msgid ""
20112019
"exit safe mode."
20122020
msgstr ""
20132021

2022+
#: py/obj.c
2023+
msgid "The above exception was the direct cause of the following exception:"
2024+
msgstr ""
2025+
20142026
#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h
20152027
msgid "The central button was pressed at start up.\n"
20162028
msgstr ""
@@ -2196,6 +2208,7 @@ msgid "Unable to read color palette data"
21962208
msgstr ""
21972209

21982210
#: ports/espressif/common-hal/mdns/Server.c
2211+
#: ports/raspberrypi/common-hal/mdns/Server.c
21992212
msgid "Unable to start mDNS query"
22002213
msgstr ""
22012214

@@ -3352,10 +3365,6 @@ msgstr ""
33523365
msgid "invalid syntax for number"
33533366
msgstr ""
33543367

3355-
#: py/objexcept.c
3356-
msgid "invalid traceback"
3357-
msgstr ""
3358-
33593368
#: py/objtype.c
33603369
msgid "issubclass() arg 1 must be a class"
33613370
msgstr ""
@@ -3421,10 +3430,12 @@ msgid "loopback + silent mode not supported by peripheral"
34213430
msgstr ""
34223431

34233432
#: ports/espressif/common-hal/mdns/Server.c
3433+
#: ports/raspberrypi/common-hal/mdns/Server.c
34243434
msgid "mDNS already initialized"
34253435
msgstr ""
34263436

34273437
#: ports/espressif/common-hal/mdns/Server.c
3438+
#: ports/raspberrypi/common-hal/mdns/Server.c
34283439
msgid "mDNS only works with built-in WiFi"
34293440
msgstr ""
34303441

locale/cs.po

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ msgstr "%q: selhání %d"
113113
msgid "%q in use"
114114
msgstr "%q se právě používá"
115115

116-
#: py/obj.c py/objstr.c py/objstrunicode.c
116+
#: py/objstr.c py/objstrunicode.c
117117
msgid "%q index out of range"
118118
msgstr "Index %q je mimo rozsah"
119119

@@ -178,7 +178,7 @@ msgstr "%q musí být string"
178178
msgid "%q must be an int"
179179
msgstr "%q musí být int"
180180

181-
#: py/argcheck.c
181+
#: py/argcheck.c py/obj.c
182182
msgid "%q must be of type %q"
183183
msgstr "%q musí být typu %q"
184184

@@ -1679,6 +1679,10 @@ msgstr ""
16791679
msgid "Operation timed out"
16801680
msgstr ""
16811681

1682+
#: ports/raspberrypi/common-hal/mdns/Server.c
1683+
msgid "Out of MDNS service slots"
1684+
msgstr ""
1685+
16821686
#: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c
16831687
msgid "Out of memory"
16841688
msgstr ""
@@ -2210,6 +2214,7 @@ msgid "Unable to read color palette data"
22102214
msgstr ""
22112215

22122216
#: ports/espressif/common-hal/mdns/Server.c
2217+
#: ports/raspberrypi/common-hal/mdns/Server.c
22132218
msgid "Unable to start mDNS query"
22142219
msgstr ""
22152220

@@ -3171,7 +3176,7 @@ msgid "index is out of bounds"
31713176
msgstr ""
31723177

31733178
#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c
3174-
#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c
3179+
#: ports/espressif/common-hal/pulseio/PulseIn.c
31753180
#: shared-bindings/bitmaptools/__init__.c
31763181
msgid "index out of range"
31773182
msgstr ""
@@ -3423,10 +3428,12 @@ msgid "loopback + silent mode not supported by peripheral"
34233428
msgstr ""
34243429

34253430
#: ports/espressif/common-hal/mdns/Server.c
3431+
#: ports/raspberrypi/common-hal/mdns/Server.c
34263432
msgid "mDNS already initialized"
34273433
msgstr ""
34283434

34293435
#: ports/espressif/common-hal/mdns/Server.c
3436+
#: ports/raspberrypi/common-hal/mdns/Server.c
34303437
msgid "mDNS only works with built-in WiFi"
34313438
msgstr ""
34323439

0 commit comments

Comments
 (0)