Skip to content

Commit 3f25a76

Browse files
committed
Merge branch 'update_micropython_v1.20'
2 parents b9fae5f + fb095f2 commit 3f25a76

File tree

1,587 files changed

+43538
-40821
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,587 files changed

+43538
-40821
lines changed

.git-blame-ignore-revs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#all: Reformat remaining C code that doesn't have a space after a comma.
1+
# top: Update Python formatting to black "2023 stable style".
2+
8b2748269244304854b3462cb8902952b4dcb892
3+
4+
# all: Reformat remaining C code that doesn't have a space after a comma.
25
5b700b0af90591d6b1a2c087bb8de6b7f1bfdd2d
36

47
# ports: Reformat more C and Python source code.

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ assignees: ''
77

88
---
99

10-
* Remove all placeholder text below before submitting.
11-
12-
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
10+
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab or raise a documentation request instead.
1311

1412
* In your issue, please include a clear and concise description of what the bug is, the expected output, and how to replicate it.
1513

@@ -23,3 +21,5 @@ assignees: ''
2321
- firmware file name
2422
- git commit hash and port/board
2523
- version information shown in the REPL (hit Ctrl-B to see the startup message)
24+
25+
* Remove all placeholder text above before submitting.

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
blank_issues_enabled: false
22
contact_links:
3-
- name: MicroPython Forum
4-
url: https://forum.micropython.org/
3+
- name: MicroPython GitHub Discussions
4+
url: https://github.com/orgs/micropython/discussions
55
about: Community discussion about all things MicroPython. This is the best place to start if you have questions about using MicroPython or getting started with MicroPython development.
66
- name: MicroPython Documentation
77
url: https://docs.micropython.org/

.github/ISSUE_TEMPLATE/documentation.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ assignees: ''
77

88
---
99

10-
* Remove all placeholder text below before submitting.
11-
12-
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
10+
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab instead.
1311

1412
* Describe what was missing from the documentation and/or what was incorrect/incomplete.
1513

1614
* If possible, please link to the relevant page on https://docs.micropython.org/
15+
16+
* Remove all placeholder text above before submitting.

.github/ISSUE_TEMPLATE/feature_request.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ assignees: ''
77

88
---
99

10-
* Remove all placeholder text below before submitting.
11-
12-
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, please see the MicroPython Forum -- https://forum.micropython.org/
10+
* Please search existing issues before raising a new issue. For questions about MicroPython or for help using MicroPython, or any sort of "how do I?" requests, please use the Discussions tab or raise a documentation request instead.
1311

1412
* Describe the feature you'd like to see added to MicroPython. In particular, what does this feature enable and why is it useful. MicroPython aims to strike a balance between functionality and code size, so please consider whether this feature can be optionally enabled and whether it can be provided in other ways (e.g. pure-Python library).
1513

@@ -22,3 +20,5 @@ assignees: ''
2220
* For drivers (e.g. for external hardware), please link to datasheets and/or existing drivers from other sources.
2321

2422
* Who do you expect will implement the feature you are requesting? Would you be willing to sponsor this work?
23+
24+
* Remove all placeholder text above before submitting.

.github/ISSUE_TEMPLATE/security.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ assignees: ''
77

88
---
99

10-
* Remove all placeholder text before submitting the new issue.
11-
1210
* If you need to raise this issue privately with the MicroPython team, please email [email protected] instead.
1311

1412
* Include a clear and concise description of what the security issue is.
1513

1614
* What does this issue allow an attacker to do?
15+
16+
* Remove all placeholder text above before submitting.

.github/dependabot.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
updates:
3+
# Maintain dependencies for GitHub Actions
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
name: Code size comment
2+
3+
on:
4+
workflow_run:
5+
workflows: [Check code size]
6+
types: [completed]
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
comment:
14+
runs-on: ubuntu-20.04
15+
steps:
16+
- name: 'Download artifact'
17+
id: download-artifact
18+
uses: actions/github-script@v6
19+
with:
20+
result-encoding: string
21+
script: |
22+
const fs = require('fs');
23+
24+
const allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
25+
owner: context.repo.owner,
26+
repo: context.repo.repo,
27+
run_id: context.payload.workflow_run.id,
28+
});
29+
30+
const matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
31+
return artifact.name == "code-size-report"
32+
});
33+
34+
if (matchArtifact.length === 0) {
35+
console.log('no matching artifact found');
36+
console.log('result: "skip"');
37+
38+
return 'skip';
39+
}
40+
41+
const download = await github.rest.actions.downloadArtifact({
42+
owner: context.repo.owner,
43+
repo: context.repo.repo,
44+
artifact_id: matchArtifact[0].id,
45+
archive_format: 'zip',
46+
});
47+
48+
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/code-size-report.zip`, Buffer.from(download.data));
49+
50+
console.log('artifact downloaded to `code-size-report.zip`');
51+
console.log('result: "ok"');
52+
53+
return 'ok';
54+
- name: 'Unzip artifact'
55+
if: steps.download-artifact.outputs.result == 'ok'
56+
run: unzip code-size-report.zip
57+
- name: Post comment to pull request
58+
if: steps.download-artifact.outputs.result == 'ok'
59+
uses: actions/github-script@v6
60+
with:
61+
github-token: ${{secrets.GITHUB_TOKEN}}
62+
script: |
63+
const fs = require('fs');
64+
65+
const prNumber = Number(fs.readFileSync('pr_number'));
66+
const codeSizeReport = `Code size report:
67+
68+
\`\`\`
69+
${fs.readFileSync('diff')}
70+
\`\`\`
71+
`;
72+
73+
const comments = await github.paginate(
74+
github.rest.issues.listComments,
75+
{
76+
owner: context.repo.owner,
77+
repo: context.repo.repo,
78+
issue_number: prNumber,
79+
}
80+
);
81+
82+
comments.reverse();
83+
84+
const previousComment = comments.find(comment =>
85+
comment.user.login === 'github-actions[bot]'
86+
)
87+
88+
// if github-actions[bot] already made a comment, update it,
89+
// otherwise create a new comment.
90+
91+
if (previousComment) {
92+
await github.rest.issues.updateComment({
93+
owner: context.repo.owner,
94+
repo: context.repo.repo,
95+
comment_id: previousComment.id,
96+
body: codeSizeReport,
97+
});
98+
} else {
99+
await github.rest.issues.createComment({
100+
owner: context.repo.owner,
101+
repo: context.repo.repo,
102+
issue_number: prNumber,
103+
body: codeSizeReport,
104+
});
105+
}

.github/workflows/ports_esp32.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,20 @@ on:
88
- 'tools/**'
99
- 'py/**'
1010
- 'extmod/**'
11+
- 'shared/**'
1112
- 'lib/**'
1213
- 'drivers/**'
1314
- 'ports/esp32/**'
1415

16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
1520
jobs:
1621
build_idf402:
1722
runs-on: ubuntu-20.04
1823
steps:
19-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2025
- name: Initialize lv_bindings submodule
2126
run: git submodule update --init --recursive lib/lv_bindings
2227
- name: Install packages
@@ -27,7 +32,7 @@ jobs:
2732
build_idf44:
2833
runs-on: ubuntu-20.04
2934
steps:
30-
- uses: actions/checkout@v2
35+
- uses: actions/checkout@v3
3136
- name: Initialize lv_bindings submodule
3237
run: git submodule update --init --recursive lib/lv_bindings
3338
- name: Install packages

.github/workflows/unix_port.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
- name: Initialize lv_bindings submodule
2020
run: git submodule update --init --recursive lib/lv_bindings
2121
- name: Update submodules
22-
run: make -C ports/unix VARIANT=dev DEBUG=1 submodules
22+
run: make -C ports/unix DEBUG=1 submodules
2323
- name: Build mpy-cross
2424
run: make -j $(nproc) -C mpy-cross
2525
- name: Build the unix port
26-
run: make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
26+
run: make -j $(nproc) -C ports/unix DEBUG=1
2727
- name: Run tests
2828
run: |
2929
export XDG_RUNTIME_DIR=/tmp

.gitignore

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,31 +39,31 @@ Session.vim
3939
tags
4040
TAGS
4141

42-
# Build directories
4342
######################
43+
# This .gitignore file is intended to be minimal.
44+
#
45+
# If you find that you need additional rules, such as IDE temporary
46+
# files, please do so either via a global .gitignore file (registered
47+
# with core.excludesFile), or by adding private repository-specific
48+
# rules to .git/info/exclude. See https://git-scm.com/docs/gitignore
49+
# for more information.
50+
51+
# Build directories
4452
build/
4553
build-*/
54+
docs/genrst/
4655

4756
# Test failure outputs
48-
######################
4957
tests/results/*
5058

5159
# Python cache files
52-
######################
5360
__pycache__/
54-
*.pyc
5561

5662
# Customized Makefile/project overrides
57-
######################
5863
GNUmakefile
5964
user.props
6065
ports/javascript/node_modules
6166
.vscode/
6267

63-
# Generated rst files
64-
######################
65-
genrst/
66-
6768
# MacOS desktop metadata files
68-
######################
6969
.DS_Store

.gitmodules

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
[submodule "lib/stm32lib"]
1414
path = lib/stm32lib
1515
url = https://github.com/micropython/stm32lib
16-
branch = work-F0-1.9.0+F4-1.16.0+F7-1.7.0+G4-1.3.0+H7-1.6.0+L0-1.11.2+L4-1.17.0+WB-1.10.0+WL-1.1.0
16+
branch = work-F0-1.9.0+F4-1.16.0+F7-1.7.0+G0-1.5.1+G4-1.3.0+H7-1.6.0+L0-1.11.2+L1-1.10.3+L4-1.17.0+WB-1.10.0+WL-1.1.0
1717
[submodule "lib/nrfx"]
1818
path = lib/nrfx
1919
url = https://github.com/NordicSemiconductor/nrfx.git
@@ -53,3 +53,9 @@
5353
url = https://github.com/andrewleech/wiznet_ioLibrary_Driver.git
5454
# Requires https://github.com/Wiznet/ioLibrary_Driver/pull/120
5555
# url = https://github.com/Wiznet/ioLibrary_Driver.git
56+
[submodule "lib/cyw43-driver"]
57+
path = lib/cyw43-driver
58+
url = https://github.com/georgerobotics/cyw43-driver.git
59+
[submodule "lib/micropython-lib"]
60+
path = lib/micropython-lib
61+
url = https://github.com/micropython/micropython-lib.git

.gitpod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ ports:
88
onOpen: ignore
99
tasks:
1010
- init: |
11-
make -C ports/unix VARIANT=dev DEBUG=1 submodules
12-
make -j $(nproc) -C mpy-cross VARIANT=dev DEBUG=1
13-
make -j $(nproc) -C ports/unix VARIANT=dev DEBUG=1
11+
make -C ports/unix DEBUG=1 submodules
12+
make -j $(nproc) -C mpy-cross DEBUG=1
13+
make -j $(nproc) -C ports/unix DEBUG=1
1414
# source tools/ci.sh && ci_esp32_idf44_setup
1515
# source tools/ci.sh && ci_esp32_build
1616
command: |
1717
xrandr --fb 500x500 # Fix resolution for LVGL screens which are smaller
18-
ports/unix/micropython-dev -i lib/lv_bindings/examples/advanced_demo.py
18+
ports/unix/build-standard/micropython -i lib/lv_bindings/examples/advanced_demo.py
1919
vscode:
2020
extensions:
2121
- ms-vscode.cpptools

.pre-commit-config.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
repos:
2+
- repo: local
3+
hooks:
4+
- id: codeformat
5+
name: MicroPython codeformat.py for changed files
6+
entry: tools/codeformat.py -v -f
7+
language: python
8+
- id: verifygitlog
9+
name: MicroPython git commit message format checker
10+
entry: tools/verifygitlog.py --check-file --ignore-rebase
11+
language: python
12+
verbose: true
13+
stages: [commit-msg]

0 commit comments

Comments
 (0)