Skip to content

Commit d6f94b0

Browse files
committed
tessera: Merge branch 'manifest_c_module'.
Add c_module() manifest function for user C modules MBM-PR: 18229 MBM-URL: micropython#18229 Signed-off-by: Andrew Leech <[email protected]>
2 parents f354f14 + 61f4ad3 commit d6f94b0

656 files changed

Lines changed: 8189 additions & 56071 deletions

File tree

Some content is hidden

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

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# all: Apply code formatting to new paths.
2+
48c7daaa3d7068c127c5bc395ffa72029ab9bba1
3+
14
# all: Prune trailing whitespace.
25
dda9b9c6da5d3c31fa8769e581a753e95a270803
36

.github/workflows/code_size.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
echo "IDF_VER="$(yq .env.IDF_NEWEST_VER < .github/workflows/ports_esp32.yml) \
3939
| tee "${GITHUB_OUTPUT}"
4040
41+
# The reference and current commit may be configured for different ESP-IDF versions
42+
# but we use the same ESP-IDF version to build both, so disable the
43+
# MICROPY_MAINTAINER_BUILD check (it'll be verified on the normal esp32 CI).
44+
- name: Disable extra checks for older ESP-IDF
45+
run: echo "MICROPY_MAINTAINER_BUILD=0" >> ${GITHUB_ENV}
46+
4147
- name: Setup ESP-IDF
4248
uses: ./.github/actions/setup_esp32
4349
with:

.github/workflows/ports_esp32.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020
env:
2121
# Oldest and newest supported ESP-IDF versions, should match ports/esp32/README.md
2222
IDF_OLDEST_VER: &oldest "v5.3"
23-
IDF_NEWEST_VER: &newest "v5.5.1"
23+
IDF_NEWEST_VER: &newest "v5.5.2"
2424

2525
jobs:
2626
build_idf:

.github/workflows/ports_stm32.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
matrix:
2525
ci_func: # names are functions in ci.sh
2626
- stm32_pyb_build
27+
- stm32_build_cmod
2728
- stm32_nucleo_build
2829
- stm32_misc_build
2930
runs-on: ubuntu-22.04

.github/workflows/ports_unix.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,18 @@ jobs:
6767
if: failure()
6868
run: tests/run-tests.py --print-failures
6969

70+
standard_terse:
71+
runs-on: ubuntu-latest
72+
steps:
73+
- uses: actions/checkout@v6
74+
- name: Build
75+
run: tools/ci.sh unix_standard_terse_build
76+
- name: Run main test suite
77+
run: tools/ci.sh unix_standard_terse_run_tests
78+
- name: Print failures
79+
if: failure()
80+
run: tests/run-tests.py --print-failures
81+
7082
coverage:
7183
runs-on: ubuntu-latest
7284
steps:
@@ -93,7 +105,7 @@ jobs:
93105
(cd ports/unix && gcov -o build-coverage/py ../../py/*.c || true)
94106
(cd ports/unix && gcov -o build-coverage/extmod ../../extmod/*.c || true)
95107
- name: Upload coverage to Codecov
96-
uses: codecov/codecov-action@v6
108+
uses: codecov/codecov-action@v7
97109
with:
98110
# Only fail the job on error if a token is set, or we're running against upstream repo.
99111
# This avoids the annoying situation of the job failing on every push to a fork (if no token is set).
@@ -327,6 +339,25 @@ jobs:
327339
if: failure()
328340
run: tests/run-tests.py --print-failures
329341

342+
qemu_loong64:
343+
runs-on: ubuntu-latest
344+
steps:
345+
- uses: actions/checkout@v6
346+
- uses: actions/setup-python@v6
347+
# Python 3.12 is the default for ubuntu-24.04, but that has compatibility issues with settrace tests.
348+
# Can remove this step when ubuntu-latest uses a more recent Python 3.x as the default.
349+
with:
350+
python-version: '3.11'
351+
- name: Install packages
352+
run: tools/ci.sh unix_qemu_loong64_setup
353+
- name: Build
354+
run: tools/ci.sh unix_qemu_loong64_build
355+
- name: Run main test suite
356+
run: tools/ci.sh unix_qemu_loong64_run_tests
357+
- name: Print failures
358+
if: failure()
359+
run: tests/run-tests.py --print-failures
360+
330361
sanitize_address:
331362
runs-on: ubuntu-latest
332363
steps:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
build/
1111
build-*/
1212
docs/genrst/
13+
.mpy_ld_cache-*/
1314

1415
# Test failure outputs and intermediate artefacts
1516
tests/results/*

.gitmodules

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,9 @@
7474
[submodule "lib/alif-security-toolkit"]
7575
path = lib/alif-security-toolkit
7676
url = https://github.com/micropython/alif-security-toolkit.git
77+
[submodule "lib/CMSIS_5"]
78+
path = lib/CMSIS_5
79+
url = https://github.com/ARM-software/CMSIS_5.git
80+
[submodule "lib/CMSIS_6"]
81+
path = lib/CMSIS_6
82+
url = https://github.com/ARM-software/CMSIS_6.git

.pre-commit-config.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ repos:
55
name: MicroPython codeformat.py for changed C files
66
entry: tools/codeformat.py -v -c -f
77
language: python
8+
additional_dependencies:
9+
- micropython-uncrustify==1.0.0.post1
810
- id: verifygitlog
911
name: MicroPython git commit message format checker
1012
entry: tools/verifygitlog.py --check-file --ignore-rebase

CODECONVENTIONS.md

Lines changed: 15 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -72,36 +72,28 @@ be used for MicroPython. Different uncrustify versions produce slightly
7272
different formatting, and the configuration file formats are often
7373
incompatible. v0.73 or newer *will not work*.
7474

75-
Depending on your operating system version, it may be possible to install a pre-compiled
76-
uncrustify version:
75+
Depending on your operating system version, it may be possible to install a
76+
compatible pre-compiled uncrustify version. Otherwise, a compatible version is
77+
available via the PyPI package archive:
7778

78-
Ubuntu, Debian
79-
--------------
80-
81-
Ubuntu versions 21.10 or 22.04LTS, and Debian versions bullseye or bookworm all
82-
include v0.72 so can be installed directly:
79+
Pip
80+
---
8381

8482
```
85-
$ apt install uncrustify
83+
pip install micropython-uncrustify
8684
```
8785

88-
Arch Linux
89-
----------
90-
91-
The current Arch uncrustify version is too new. There is an [old Arch package
92-
for v0.72](https://archive.archlinux.org/packages/u/uncrustify/) that can be
93-
installed from the Arch Linux archive ([more
94-
information](https://wiki.archlinux.org/title/Downgrading_packages#Arch_Linux_Archive)). Use
95-
the [IgnorePkg feature](https://wiki.archlinux.org/title/Pacman#Skip_package_from_being_upgraded)
96-
to prevent it re-updating.
86+
This installs a native compiled uncrustify binary as a Python executable, so it
87+
can be installed into a virtualenv.
9788

98-
Brew
89+
Pipx
9990
----
10091

101-
This command may work, please raise a new Issue if it doesn't:
92+
It's also possible to install via [pipx](https://pipx.pypa.io/) if not using a
93+
virtualenv:
10294

10395
```
104-
curl -L https://github.com/Homebrew/homebrew-core/raw/2b07d8192623365078a8b855a164ebcdf81494a6/Formula/uncrustify.rb > uncrustify.rb && brew install uncrustify.rb && rm uncrustify.rb
96+
pipx install micropython-uncrustify
10597
```
10698

10799
Code spell checking
@@ -127,6 +119,9 @@ To have code formatting and commit message conventions automatically checked,
127119
a configuration file is provided for the [pre-commit](https://pre-commit.com/)
128120
tool.
129121

122+
Pre-commit will automatically install the correct version of dependencies
123+
such as codespell, uncrustify, etc.
124+
130125
First install `pre-commit`, either from your system package manager or via
131126
`pip`. When installing `pre-commit` via pip, it is recommended to use a
132127
virtual environment. Other sources, such as Brew are also available, see
@@ -139,10 +134,6 @@ $ brew install pre-commit # Brew
139134
$ pip install pre-commit # PyPI
140135
```
141136

142-
Next, install [uncrustify (see above)](#uncrustify). Other dependencies are managed by
143-
pre-commit automatically, but uncrustify needs to be installed and available on
144-
the PATH.
145-
146137
Then, inside the MicroPython repository, register the git hooks for pre-commit
147138
by running:
148139

LICENSE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ used during the build process and is not part of the compiled source code.
3737
/drivers
3838
/cc3100 (BSD-3-clause)
3939
/lib
40+
/CMSIS_5 (Apache-2.0)
41+
/CMSIS_6 (Apache-2.0)
4042
/asf4 (Apache-2.0)
4143
/axtls (BSD-3-clause)
4244
/config
@@ -45,7 +47,6 @@ used during the build process and is not part of the compiled source code.
4547
/Rules.mak (GPL-2.0)
4648
/berkeley-db-1xx (BSD-4-clause)
4749
/btstack (See btstack/LICENSE)
48-
/cmsis (BSD-3-clause)
4950
/crypto-algorithms (NONE)
5051
/libhydrogen (ISC)
5152
/libmetal (BSD-3-clause)

0 commit comments

Comments
 (0)