Skip to content

Commit 0f9fb33

Browse files
authored
Merge branch 'main' into rp2040_cpu_frequency
2 parents e2ab7a4 + 09c2c5e commit 0f9fb33

File tree

1,082 files changed

+36653
-9801
lines changed

Some content is hidden

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

1,082 files changed

+36653
-9801
lines changed

.codespell/exclude-file.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#define MICROPY_HW_BOARD_NAME "BLOK"
2+
USB_PRODUCT = "BLOK"
3+
uint32_t THI = (*(uint32_t *)FUSES_HOT_TEMP_VAL_INT_ADDR & FUSES_HOT_TEMP_VAL_INT_Msk) >> FUSES_HOT_TEMP_VAL_INT_Pos;
4+
float TH = THI + convert_dec_to_frac(THD);
5+
print(binascii.b2a_base64(b"fo"))
6+
# again, neither will "there" or "wither", since they have "the"
7+
i1Qb$TE"rl

.codespell/ignore-words.txt

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
ans
2+
ure
3+
clen
4+
ser
5+
endianess
6+
pris
7+
synopsys
8+
reenable
9+
dout
10+
inout
11+
wel
12+
iput
13+
hsi
14+
astroid
15+
busses
16+
cyphertext
17+
dum
18+
deque
19+
deques
20+
extint
21+
shs
22+
pass-thru

.codespellrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
# In the event of a false positive, add the problematic word, in all lowercase, to 'ignore-words.txt' (one word per line).
4+
# Or copy & paste the whole problematic line to 'exclude-file.txt'
5+
ignore-words = .codespell/ignore-words.txt
6+
exclude-file = .codespell/exclude-file.txt
7+
check-filenames =
8+
check-hidden =
9+
count =
10+
skip = .cproject,.git,./lib,./locale,ACKNOWLEDGEMENTS

.github/ISSUE_TEMPLATE/bug_report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ body:
66
- type: markdown
77
attributes:
88
value: >-
9-
Thanks! for testing out CircuitPython. Now that you have encountered a
9+
Thanks for testing out CircuitPython! Now that you have encountered a
1010
bug... you can file a report for it.
1111
- type: textarea
1212
id: firmware
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Fetch external deps
2+
3+
inputs:
4+
action:
5+
required: false
6+
default: restore
7+
type: choice
8+
options:
9+
- cache
10+
- restore
11+
12+
port:
13+
required: false
14+
default: none
15+
type: string
16+
17+
runs:
18+
using: composite
19+
steps:
20+
# arm
21+
- name: Get arm toolchain
22+
if: >-
23+
inputs.port != 'none' &&
24+
inputs.port != 'litex' &&
25+
inputs.port != 'espressif'
26+
uses: carlosperate/arm-none-eabi-gcc-action@v1
27+
with:
28+
release: '10-2020-q4'
29+
30+
# espressif
31+
- name: Get espressif toolchain
32+
if: inputs.port == 'espressif'
33+
run: |
34+
sudo apt-get update
35+
sudo apt-get install -y ninja-build
36+
shell: bash
37+
- name: Install IDF tools
38+
if: inputs.port == 'espressif'
39+
run: |
40+
echo "Installing ESP-IDF tools"
41+
$IDF_PATH/tools/idf_tools.py --non-interactive install required
42+
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
43+
echo "Installing Python environment and packages"
44+
$IDF_PATH/tools/idf_tools.py --non-interactive install-python-env
45+
rm -rf $IDF_TOOLS_PATH/dist
46+
shell: bash
47+
- name: Set environment
48+
if: inputs.port == 'espressif'
49+
run: |
50+
source $IDF_PATH/export.sh
51+
echo >> $GITHUB_ENV "IDF_PYTHON_ENV_PATH=$IDF_PYTHON_ENV_PATH"
52+
echo >> $GITHUB_PATH "$PATH"
53+
shell: bash
54+
55+
# common
56+
- name: Cache python dependencies
57+
if: inputs.port != 'espressif'
58+
uses: ./.github/actions/deps/python
59+
with:
60+
action: ${{ inputs.action }}
61+
- name: Install python dependencies
62+
run: pip install -r requirements-dev.txt
63+
shell: bash

.github/actions/deps/ports/action.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Fetch port deps
2+
3+
inputs:
4+
board:
5+
required: true
6+
type: string
7+
8+
outputs:
9+
port:
10+
value: ${{ steps.board-to-port.outputs.port }}
11+
12+
runs:
13+
using: composite
14+
steps:
15+
- name: Board to port
16+
id: board-to-port
17+
run: |
18+
PORT=$(find ports/*/boards/ -type d -name ${{ inputs.board }} | sed 's/^ports\///g;s/\/boards.*//g')
19+
if [ -z $PORT ]; then (exit 1); else echo >> $GITHUB_OUTPUT "port=$PORT"; fi
20+
shell: bash
21+
22+
- name: Set up broadcom
23+
if: steps.board-to-port.outputs.port == 'broadcom'
24+
uses: ./.github/actions/deps/ports/broadcom
25+
26+
- name: Set up espressif
27+
if: steps.board-to-port.outputs.port == 'espressif'
28+
uses: ./.github/actions/deps/ports/espressif
29+
30+
- name: Set up litex
31+
if: steps.board-to-port.outputs.port == 'litex'
32+
uses: ./.github/actions/deps/ports/litex
33+
34+
- name: Set up nrf
35+
if: steps.board-to-port.outputs.port == 'nrf'
36+
uses: ./.github/actions/deps/ports/nrf
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Fetch broadcom port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get broadcom toolchain
7+
run: |
8+
wget --no-verbose https://adafruit-circuit-python.s3.amazonaws.com/gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
9+
sudo tar -C /usr --strip-components=1 -xaf gcc-arm-10.3-2021.07-x86_64-aarch64-none-elf.tar.xz
10+
sudo apt-get update
11+
sudo apt-get install -y mtools
12+
shell: bash
13+
- name: Install mkfs.fat
14+
run: |
15+
wget https://github.com/dosfstools/dosfstools/releases/download/v4.2/dosfstools-4.2.tar.gz
16+
tar -xaf dosfstools-4.2.tar.gz
17+
cd dosfstools-4.2
18+
./configure
19+
make -j 2
20+
cd src
21+
echo >> $GITHUB_PATH $(pwd)
22+
shell: bash
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Fetch espressif port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Set IDF env
7+
run: |
8+
echo >> $GITHUB_ENV "IDF_PATH=$GITHUB_WORKSPACE/ports/espressif/esp-idf"
9+
echo >> $GITHUB_ENV "IDF_TOOLS_PATH=$GITHUB_WORKSPACE/.idf_tools"
10+
shell: bash
11+
12+
- name: Get IDF commit
13+
id: idf-commit
14+
run: |
15+
COMMIT=$(git submodule status ports/espressif/esp-idf | grep -o -P '(?<=^-).*(?= )')
16+
echo "$COMMIT"
17+
echo "commit=$COMMIT" >> $GITHUB_OUTPUT
18+
shell: bash
19+
20+
- name: Cache IDF submodules
21+
uses: actions/cache@v3
22+
with:
23+
path: |
24+
.git/modules/ports/espressif/esp-idf
25+
ports/espressif/esp-idf
26+
key: submodules-idf-${{ steps.idf-commit.outputs.commit }}
27+
28+
- name: Cache IDF tools
29+
uses: actions/cache@v3
30+
with:
31+
path: ${{ env.IDF_TOOLS_PATH }}
32+
key: ${{ runner.os }}-${{ env.pythonLocation }}-tools-idf-${{ steps.idf-commit.outputs.commit }}
33+
34+
- name: Initialize IDF submodules
35+
run: git submodule update --init --depth=1 --recursive $IDF_PATH
36+
shell: bash
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Fetch litex port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get litex toolchain
7+
run: |
8+
wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
9+
sudo tar -C /usr --strip-components=1 -xaf riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-linux-centos6.tar.gz
10+
shell: bash
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Fetch nrf port deps
2+
3+
runs:
4+
using: composite
5+
steps:
6+
- name: Get nrfutil 7+
7+
run: |
8+
wget https://developer.nordicsemi.com/.pc-tools/nrfutil/x64-linux/nrfutil
9+
chmod +x nrfutil
10+
./nrfutil install nrf5sdk-tools
11+
mkdir -p $HOME/.local/bin
12+
mv nrfutil $HOME/.local/bin
13+
echo "$HOME/.local/bin" >> $GITHUB_PATH
14+
shell: bash
15+
- name: Print nrfutil version
16+
run: nrfutil -V
17+
shell: bash
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: Fetch python deps
2+
3+
inputs:
4+
action:
5+
description: The cache action to use
6+
required: false
7+
default: restore
8+
type: choice
9+
options:
10+
- cache
11+
- restore
12+
13+
runs:
14+
using: composite
15+
steps:
16+
- name: Cache python dependencies
17+
id: cache-python-deps
18+
if: inputs.action == 'cache'
19+
uses: actions/cache@v3
20+
with:
21+
path: .cp_tools
22+
key: ${{ runner.os }}-${{ env.pythonLocation }}-tools-cp-${{ hashFiles('requirements-dev.txt') }}
23+
24+
- name: Restore python dependencies
25+
id: restore-python-deps
26+
if: inputs.action == 'restore'
27+
uses: actions/cache/restore@v3
28+
with:
29+
path: .cp_tools
30+
key: ${{ runner.os }}-${{ env.pythonLocation }}-tools-cp-${{ hashFiles('requirements-dev.txt') }}
31+
32+
- name: Set up venv
33+
if: inputs.action == 'cache' && !steps.cache-python-deps.outputs.cache-hit
34+
run: python -m venv .cp_tools
35+
shell: bash
36+
37+
- name: Activate venv
38+
if: inputs.action == 'cache' || (inputs.action == 'restore' && steps.restore-python-deps.outputs.cache-hit)
39+
run: |
40+
source .cp_tools/bin/activate
41+
echo >> $GITHUB_PATH "$PATH"
42+
shell: bash
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: 'Fetch Submodules'
2+
3+
inputs:
4+
target:
5+
description: 'The target for ci_fetch_deps'
6+
required: false
7+
type: string
8+
9+
submodules:
10+
description: 'The submodules to cache'
11+
required: false
12+
default: '["extmod/ulab", "lib/", "tools/"]'
13+
type: string
14+
15+
action:
16+
description: 'The cache action to use'
17+
required: false
18+
default: 'restore'
19+
type: choice
20+
options:
21+
- cache
22+
- restore
23+
24+
version:
25+
description: 'Whether to generate CP version'
26+
required: false
27+
default: false
28+
type: boolean
29+
30+
outputs:
31+
frozen:
32+
description: 'Whether frozen submodules were fetched'
33+
value: ${{ steps.cp-deps.outputs.frozen_tags }}
34+
35+
version:
36+
description: 'The CP version'
37+
value: ${{ steps.cp-version.outputs.cp-version }}
38+
39+
runs:
40+
using: "composite"
41+
steps:
42+
- name: Create submodule status
43+
id: create-submodule-status
44+
run: |
45+
git submodule status ${{ join(fromJSON(inputs.submodules), ' ') }} >> submodule_status
46+
echo $(cut -d ' ' -f 2 submodule_status) | echo "submodules=[\"$(sed "s/ /\", \"/g")\"]" >> $GITHUB_OUTPUT
47+
shell: bash
48+
49+
- name: Cache submodules
50+
if: ${{ inputs.action == 'cache' }}
51+
uses: actions/cache@v3
52+
with:
53+
path: ".git/modules/\n${{ join(fromJSON(steps.create-submodule-status.outputs.submodules), '\n') }}"
54+
key: submodules-common-${{ hashFiles('submodule_status') }}
55+
enableCrossOsArchive: true
56+
57+
- name: Restore submodules
58+
if: ${{ inputs.action == 'restore' }}
59+
uses: actions/cache/restore@v3
60+
with:
61+
path: ".git/modules/\n${{ join(fromJSON(steps.create-submodule-status.outputs.submodules), '\n') }}"
62+
key: submodules-common-${{ hashFiles('submodule_status') }}
63+
enableCrossOsArchive: true
64+
65+
- name: Remove submodule status
66+
run: rm submodule_status
67+
shell: bash
68+
69+
- name: CircuitPython dependencies
70+
id: cp-deps
71+
run: python tools/ci_fetch_deps.py ${{ inputs.target || matrix.board || github.job }}
72+
shell: bash
73+
74+
- name: CircuitPython version
75+
id: cp-version
76+
if: ${{ inputs.version == 'true' }}
77+
run: |
78+
echo "::group::Fetch history and tags"
79+
git fetch --no-recurse-submodules --shallow-since="2021-07-01" --tags https://github.com/adafruit/circuitpython HEAD
80+
git fetch --no-recurse-submodules --shallow-since="2021-07-01" origin $GITHUB_SHA
81+
git repack -d
82+
echo "::endgroup::"
83+
CP_VERSION=$(tools/describe)
84+
echo "$CP_VERSION"
85+
echo "CP_VERSION=$CP_VERSION" >> $GITHUB_ENV
86+
echo "cp-version=$CP_VERSION" >> $GITHUB_OUTPUT
87+
shell: bash

0 commit comments

Comments
 (0)