Commit Graph

18639 Commits

Author SHA1 Message Date
dependabot[bot] 0d77e539b3 build(deps): bump codecov/codecov-action from 6 to 7
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6 to 7.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-08 19:14:33 +00:00
Damien George af38ee165f samd/mphalport: Run events at least once in mp_hal_delay_ms.
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Per the docs for `time.sleep()` and `time.sleep_ms()`.  This gets the
`tests/micropython/schedule_sleep.py` test working when using the native
emitter.

The structure of `mp_hal_delay_ms()` matches the rp2 port.

Signed-off-by: Damien George <damien@micropython.org>
2026-06-04 23:06:40 +10:00
Damien George 4e32820e9a nrf/mphalport: Run events at least once in mp_hal_delay_ms.
Per the docs for `time.sleep()` and `time.sleep_ms()`.  This gets the
`tests/micropython/schedule_sleep.py` test working when using the native
emitter.

Signed-off-by: Damien George <damien@micropython.org>
2026-06-04 23:06:40 +10:00
Angus Gratton 75555f4826 mimxrt: Mark boards with no TinyUF2 bootloader support.
Check code formatting / code-formatting (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
This was noted in PR description & commit message for e574f68820, but these
boards' deploy.md files still said the bootloader was supported.

Add explicit makefile settings to disable support, with a comment
for the reason, and also add a deploy_mimxrt_nouf2.md file which
contains only the SWD flashing method and notes the lack of
UF2 bootloader support.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-06-04 17:46:06 +10:00
Angus Gratton 3160809989 esp32: Fix espnow crash if falsey value supplied as peer argument.
The _get_peer() result was often provided directly as an argument to
memcpy(), causing a crash on (for example) e.del_peer(b""). Changed to
raise a TypeError instead  (via mp_get_buffer_raise()).

Closes #19296

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-06-04 17:45:17 +10:00
Alessandro Gatti be9a8190b6 esp8266/network_wlan: Allow bytes() objects as MAC address.
Check code formatting / code-formatting (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
This commit fixes a crash occurring when setting the WLAN MAC address
using a bytes() object containing the new MAC address bytes.  This also
fixes cases where the address is put in ROM or is an unaligned slice of
a larger buffer.

The ESP8266's network stack seems to want the MAC address buffer being
in a particular memory area and with a specific alignment, which cannot
be always guaranteed.  Luckily stack-allocated buffers do have the
necessary requirements when it comes to location and alignment, so the
MAC address is first copied into such a buffer and then that's passed to
the network stack.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-06-03 22:53:49 +10:00
Vdragon 3a85a18979 zephyr/boards: Add M0Sense Board.
Add the Sipeed M0Sense board.

Signed-off-by: Vdragon <mail@massdriver.space>
2026-06-03 22:53:26 +10:00
Vdragon fcc8ad8a77 zephyr: Only enable PWM when PWM is enabled.
Gate MPY's PWM with Zephyr's PWM.

Signed-off-by: Vdragon <mail@massdriver.space>
2026-06-03 22:53:26 +10:00
Roman Zeyde 90ce8a1af3 py: Allow mpy-cross to exclude source lines.
This would allow building debug FW without source line data.

Signed-off-by: Roman Zeyde <me@romanzey.de>
2026-06-03 22:24:21 +10:00
Alessandro Gatti 0d8256a499 mpy-cross/main: Simplify integer architecture flag parsing.
This commit simplifies the way architecture flag bits are parsed when
they're in integer form.

The original code would perform a manual integer base detection and then
use MicroPython's own integer parser to perform the string to integer
conversion and use MicroPython's own NLR exception handling mechanism to
handle errors in conversion.

However this causes a build error on Loongarch64 and S390x (where the
NLR handling is performed using setjmp/longjmp), as for some of the
variables in question the compiler could not guarantee their values
would stay consistent in case of error recovery.

To work around that, MicroPython's code is used only for detecting the
argument base and then a C standard library function is used to perform
the string to integer conversion using the detected base.

This fixes #18564.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-06-03 22:19:01 +10:00
Alessandro Gatti 10d4018872 tools/mpy_ld.py: Ignore R_XTENSA_NDIFF32 relocations.
This commit introduces support for the negative counterpart of
`R_XTENSA_PDIFF32`, ignoring the relocation instead of aborting
processing.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-06-03 22:15:28 +10:00
Finn Glas 935881eb18 tools/verifygitlog.py: Fix --pretty filter to inspect each arg.
The list comprehension checked "--pretty" not in args (the entire
argument list) instead of "--pretty" not in arg (the current element),
so the filter could not actually strip a user-supplied --pretty
argument from the call to git log.

Signed-off-by: Finn Glas <finn@finnmglas.com>
2026-06-03 22:14:51 +10:00
Angus Gratton 3e5add395b tools: Formally recommend the micropython-uncrustify package.
Check code formatting / code-formatting (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Has been the unofficial best option for a while, this
updates the docs and pre-commit/CI checks to match.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-06-03 15:52:47 +10:00
Damien George 44a569b637 rp2/CMakeLists.txt: Require boards to define PICO_FLASH_SIZE_BYTES.
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check code formatting / code-formatting (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
This was previously a convenience, to have a default flash size.  But that
leads to more problems than not, eg when the board doesn't use the
`pico_cmake_set_default = ...` definition correctly and the flash size is
not defined.  Then the filesystem gets the incorrect size.

So, just require this symbol to be defined at the cmake level.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George 94b9c363ee rp2/boards/WAVESHARE_RP2040_PLUS: Configure STORAGE_BYTES per variant.
Fixes the FLASH_16M variant to have 15MB of filesystem space.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George a0ae5c51f0 rp2/boards/PIMORONI_TINY2040: Configure FLASH_STORAGE_BYTES per variant.
Fixes the FLASH_8M variant to have 7MB of filesystem space.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George dc3fb1c9dd rp2/boards/PIMORONI_PICOLIPO: Configure FLASH_STORAGE_BYTES per variant.
Fixes the FLASH_16M variant to have 15MB of filesystem space.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George e9cc59205b rp2/boards/WAVESHARE_RP2350B_CORE: Set PICO_FLASH_SIZE_BYTES for cmake.
It needs to be defined at the cmake level for the linker scripts.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George 5ce24ca120 rp2/boards/SIL_RP2040_SHIM: Set PICO_FLASH_SIZE_BYTES at cmake level.
It needs to be defined at the cmake level for the linker scripts.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George 2696d563ef rp2/boards/WEACTSTUDIO: Use board headers from pico-sdk.
Fixes:
- Flash size is now correct for the given variant.
- Filesystem size is adjusted per variant to leave 1MB for application.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George e5a7c7bcde rp2/boards/WEACTSTUDIO_RP2350B_CORE: Use board header from pico-sdk.
Fixes:
- Flash size is 16MB instead of 4MB.
- Now supports RP2350 A2.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
Damien George ff6f2da86b rp2/boards/NULLBITS_BIT_C_PRO: Use board header from pico-sdk.
Fixes:
- Flash size is 4MB instead of 2MB.
- The default I2C instance is now instance 1 instead of 0.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 18:10:21 +10:00
robert-hh 1468ad604e mimxrt/machine_encoder: Fix the numeric values of UP and DOWN.
The values should be 0 for UP and 1 for DOWN to match the documentation.
Instead they were -2 and -3, causing a test with a count direction set
by a Pin to fail, when the symbols were used instead of numbers..

Tested with the machine_encoder.py and machine_counter.py script and
the extended machine_counter.py script from PR #19239.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-29 18:09:52 +10:00
Alessandro Gatti 3ba6eaa76c esp32/network_wlan: Add channel bandwidth configuration parameter.
This commit adds a configuration parameter to set and retrieve the
WiFi channel bandwidth.

The configuration only applies when the adapter is in single-band mode
(ie. either 2.4 GHz or 5 GHz, not both at the same time), which is not an
issue at the moment since there's no provision to put the adapter in
multi-band mode.

Rather than accepting the bandwidth as a raw MHz value, five new
constants are introduced, following the same nomenclature as the ESP-IDF
SDK.  This is required since there's one constant that indicates a
multi-antenna bandwidth setup and therefore not representable as a
single integer value.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-05-29 18:07:28 +10:00
Damien George 4cee4d6c78 nrf/boards: Increase stack to 6k for nRF51x22 boards with 32k RAM.
Increase the stack from 4k to 6k for PCA10028 and PCA10031 boards.

4k stack is not much and that causes some tests crash with a stack-overflow
exception (eg `extmod/vfs_userfs.py` when run with `--via-mpy`).  With the
increased stack size there are no longer any tests that fail due to stack
overflow on PCA10028.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 17:31:41 +10:00
Damien George 3bba83800d webassembly: Support buffer protocol in jsffi.to_js.
This adds support for explicit conversion from bytes/bytearray/memoryview
(and other objects with the buffer protocol) to JavaScript `Uint8Array`.
For example:

    import js, jsffi

    js.console.log(jsffi.to_js(b'1234'))

That now works and prints `Uint8Array[4] [ 49, 50, 51, 52]` in the JS
console. The array contains a copy of the data (ie not a reference).

This matches Pyodide behaviour, eg `pyodide.ffi.to_js(b'1234')` returns the
same `Uint8Array`.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 16:31:44 +10:00
Damien George 44780be7cd webassembly: Simplify proxy_c_to_js_get_type interface.
If the Python object is a known type (tuple, list, dict) then the caller
always wants to follow up with a call to get the associated data for that
object.  So simplify things to just a single call that gets both the type
and object data (if the type is known).

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 16:31:43 +10:00
Damien George b8d43d8dea webassembly: Fix GC tracing of object returned from top-level functions.
This commit makes sure that the GC explicitly traces the Python object
returned from all top-level functions.  Without this, it's possible that a
JsProxy that is created as the return object is freed on the Python side
(and hence the underlying JavaScript object entry set to `undefined`) just
prior to the top-level C function returning.  So when it does return and
control resumes on the JavaScript side, the JavaScript object corresponding
to the JsProxy is gone.

For example, the case covered by the test added here has the return value
(Python object) from `proxy_c_to_js_call()` reclaimed by the Python GC via
`proxy_js_free_obj()` before it can be accessed from the JavaScript side,
and so the JavaScript reference in `proxy_js_ref` is `undefined`,

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 16:25:01 +10:00
Damien George 78fc0b2c90 tools/autobuild: Update example usage of script.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 15:49:59 +10:00
Damien George 5885f6bf0c tools/autobuild: Print consistent msgs for start/pass/fail board build.
Consistent messages are now printed to stdout (along with the main output
of the build process) when the build starts, and when it succeeds or fails.

For example:

    bash: Autobuild started for RPI_PICO
    ...
    ...
    bash: Autobuild succeeded for RPI_PICO

Or in the case of a failure:

    bash: Autobuild started for RPI_PICO
    ...
    ...
    bash: Autobuild failed for RPI_PICO

That helps searching the output logs for the results of all builds.  And if
something failed, it's easy to locate the rest of the build logs for the
failure (they will be above the "Autobuild failed" message).

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 15:49:59 +10:00
Damien George 4d3e2c6401 tools/autobuild: Remove the use of the "id" entry in board.json.
This "id" entry was removed from all `board.json` files in commit
1a99f74063.  Replace its use with the default
value which is the board name.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 15:49:59 +10:00
Damien George d05d988d8b tools/ci.sh: Reorder alif and webassembly CI sections alphabetically.
This commit makes sure the 17 ports CI sections are ordered alphabetically
within the file.

Also adds a heading for the last section of the file that makes the script
easily runnable as a CLI tool.

No functional change, just cosmetic (and makes it easier to maintain).

Signed-off-by: Damien George <damien@micropython.org>
2026-05-29 14:52:45 +10:00
Alessandro Gatti 9c0249cddc tools/mpy-tool.py: Clean up escaped compiled module name.
This commit lets "mpy-tool.py" filter unwanted characters that may end
up in the compiled module name, even after the first encoding pass.

Certain characters are already ASCII-safe but cannot appear in a C
identifier (eg. dots, dashes, etc.).  Those characters, when appearing
in a module name, won't be escaped and will be placed in the output C
source code template when freezing files - leading to an invalid source
file.

Now the code, after the first character encoding pass, will pre-process
the compiled module name to use when filling out the C source code
template.  Every character that is not expected to be part of a C
identifier will be replaced with an underscore.

This closes #3445.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-05-29 14:47:50 +10:00
Angus Gratton 4fd7295703 esp32: Make a generic sdkconfig.flash_qio_80m config snippet.
Check code formatting / code-formatting (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
Replaces the common practice of setting 80MHz & QIO flash in
individual sdkconfig.board files.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-05-28 16:34:33 +10:00
Angus Gratton 9fe2c9d47d esp32: Add generic mpconfigboard_xyz_common.cmake files.
- Move the "generic" mpconfigboard.cmake files to per-chip
  files in the top-level board directory.

- Replace all the copy-paste in other boards' mpconfigboard.cmake
  files to directly include those ones.

- Rename sdkconfig.c3usb config file to sdkconfig.c3 as this file no longer
  contains any USB-specific config settings. This allowed deleting some
  other sdkconfig.board files which were copies of sdkconfig.c3usb.

- Replace using set() to extend a list with CMake list(APPEND ...)

The downside is a bit of extra complexity, and had to use a CMake function
to opt-out of sdkconfig.spiram_sx on S2/S3 boards without SPIRAM.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-05-28 16:34:33 +10:00
iabdalkader 8c577179fc drivers/esp-hosted: Refactor driver to support full-duplex SPI.
Check code formatting / code-formatting (push) Has been cancelled
Build docs / build (push) Has been cancelled
Check examples / embedding (push) Has been cancelled
.mpy file format and tools / test (push) Has been cancelled
Build ports metadata / build (push) Has been cancelled
alif port / build_alif (alif_ae3_build) (push) Has been cancelled
cc3200 port / build (push) Has been cancelled
esp32 port / build_idf (esp32_build_c2_c5_c6, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_cmod_spiram_s2, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.2) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.3) (push) Has been cancelled
esp32 port / build_idf (esp32_build_s3_c3, v5.5.2) (push) Has been cancelled
esp8266 port / build (push) Has been cancelled
mimxrt port / build (push) Has been cancelled
nrf port / build (push) Has been cancelled
powerpc port / build (push) Has been cancelled
qemu port / build_and_test_arm (bigendian) (push) Has been cancelled
qemu port / build_and_test_arm (sabrelite) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_hardfp) (push) Has been cancelled
qemu port / build_and_test_arm (thumb_softfp) (push) Has been cancelled
qemu port / build_and_test_rv32 (push) Has been cancelled
qemu port / build_and_test_rv64 (push) Has been cancelled
renesas-ra port / build_renesas_ra_board (push) Has been cancelled
rp2 port / build (push) Has been cancelled
samd port / build (push) Has been cancelled
stm32 port / build_stm32 (stm32_misc_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_nucleo_build) (push) Has been cancelled
stm32 port / build_stm32 (stm32_pyb_build) (push) Has been cancelled
unix port / minimal (push) Has been cancelled
unix port / reproducible (push) Has been cancelled
unix port / standard (push) Has been cancelled
unix port / standard_v2 (push) Has been cancelled
unix port / coverage (push) Has been cancelled
unix port / coverage_32bit (push) Has been cancelled
unix port / nanbox (push) Has been cancelled
unix port / longlong (push) Has been cancelled
unix port / float (push) Has been cancelled
unix port / gil_enabled (push) Has been cancelled
unix port / stackless_clang (push) Has been cancelled
unix port / float_clang (push) Has been cancelled
unix port / settrace_stackless (push) Has been cancelled
unix port / repr_b (push) Has been cancelled
unix port / macos (push) Has been cancelled
unix port / qemu_mips (push) Has been cancelled
unix port / qemu_arm (push) Has been cancelled
unix port / qemu_riscv64 (push) Has been cancelled
unix port / sanitize_address (push) Has been cancelled
unix port / sanitize_undefined (push) Has been cancelled
webassembly port / build (push) Has been cancelled
windows port / build-vs (Debug, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Debug, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x64, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, dev, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v142, standard, 2019, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, dev, 2022, [17, 18)) (push) Has been cancelled
windows port / build-vs (Release, x86, v143, standard, 2022, [17, 18)) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, dev) (push) Has been cancelled
windows port / build-mingw (i686, mingw32, standard) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, dev) (push) Has been cancelled
windows port / build-mingw (x86_64, mingw64, standard) (push) Has been cancelled
windows port / cross-build-on-linux (push) Has been cancelled
zephyr port / build (push) Has been cancelled
JavaScript code lint and formatting with Biome / eslint (push) Has been cancelled
Check spelling with codespell / codespell (push) Has been cancelled
Package mpremote / build (push) Has been cancelled
Python code lint and formatting with ruff / ruff (push) Has been cancelled
This change refactors the driver to enqueue TX frames into a queue
instead of calling spi_transfer directly. This allows the polling
function to perform full-duplex transfers that send queued TX frames
while simultaneously receiving RX data. This change prevents RX frames
that were already queued by the firmware from being lost during TX-only
transfers.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2026-05-27 16:52:37 +10:00
iabdalkader 02e7bfd3cd drivers/esp-hosted: Use __func__ in logging macros.
Update the logging macros to automatically include the function name
using __func__, removing the need to manually specify it at each call
site.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2026-05-27 16:52:36 +10:00
iabdalkader 0d26a85748 drivers/esp-hosted/bthci_uart: Retry HCI reset on failure.
Newer IDF/ESP seems to send some response after reset that must be
skipped. This change is backward compatible with older firmware.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2026-05-27 16:52:36 +10:00
iabdalkader 4c82b54ef8 drivers/esp-hosted: Add support for the latest firmware.
Add support for esp-hosted v1.0.0.0.0 firmware.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2026-05-27 16:52:36 +10:00
iabdalkader af34856b34 drivers/esp-hosted: Update protobuf protocol to the latest.
This patch updates the protocol to the latest stable
release (v1.0.0.0.0).

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
2026-05-27 16:52:36 +10:00
robert-hh b35383bfca tests/multi_extmod/machine_can_05_tx_prio_cancel.py: Fix startup race.
If instance0 starts too quickly before instance1, it could "babble"
enough messages onto the bus without ACK that it goes into Error
Passive. Once in Error Passive, it has to leave an extra 8 bit times
("Suspend Transmission Time") after each message to allow other nodes
to communicate. This prevents the test from working as designed.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2026-05-27 16:15:43 +10:00
robert-hh 11d554edd0 extmod/machine_can: Add a call to signal that all filters are processed.
That way, a port can do the internal update of the filter set at once.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh b532f967f1 stm32/machine_can: Add an empty function serving filter done.
Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh d8235ee080 mimxrt/machine_can: Split filter setting into collection and activation.
Making it a little bit more efficient with MIMXRT.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh d364b7e706 mimxrt/machine_can: Declare local functions static, use named constants.
- Declare local functions as "static".
- Use named constants for numbers when possible
- Put the IRQ handler into RAM
- Clarify comments

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh 851975678c mimxrt/machine_can: Count and report RX FIFO overflow events.
Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh fc0f3f6ad1 mimxrt/machine_can: Improve the error and state handling.
Make it consistent to the documentation.
The code now counts and the errors when state transitions happen to
a more severe state and triggers an callback if requested.
A state IRQ is to be signalled for every bus state change. Not all
bus state changes cause a dedicated hardware interrupt. In that case
the state change will only be noticed during processing of another
event, like general bus error, RX, TX, ....
Consider the value of CAN_TX_QUEUE_LEN depending on the value of
FSL_FEATURE_FLEXCAN_HAS_ERRATA_5829.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh ab26d54ed3 mimxrt/machine_can: Add IRQ_TX handling and rework the IRQ handler.
Changes:
- Add a TX interrupt.
- Do not enable Warning and overflow interrupts for IRQ_RX, avoiding
  additional calls of the IRQ handler.
- Add flags for bus state interrupts.
- The recv() code is slightly shortened with the assumption, the data
  buffer for a received message is always sufficiently large.
  That applies most likely to send() as well, but it's out of scope
  for machine_can.

Comments:
- The handling of interrupts follows the scheme, that the respective
  interrupt is disabled in the handler, if it was triggered. The flags
  telling which interrupt happened stay enabled, such that they can
  be reported by can.irq().flags().
- Reading a message or defining the trigger (re-)enables the RX IRQ.
- The IRQ_TX interrupt happens when any message have been successfully
  sent. At the moment there is not feedback which message of possibly
  many in the TX queue.
- Call can.irq().flags() repeatedly to get the message indexes of all
  transmitted messages. These are coded in the upper 16 bits of
  the value returned by can.irq().flags() (as documented).
- The IRQ_TX interrupt for a MMB is enabled when sending a message or
  when can.irq().flags() is called.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh 8860d3e004 mimxrt/machine_can: Improve the method to find a free MB.
- The approach does not stop with fail at the first non-empty MB
  with a matching ID, but keeps scanning for a free MB with a higher
  index number and therefore lower priority.
- If CAN_MSG_FLAG_UNORDERED is set, allow to pick the first unused MB
  if the MB with the matching ID is busy.
- Add MACROs to make can_find_txmb() better readable.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00
robert-hh 1373dc0406 tests: Align the CAN tests with the mimxrt port needs.
tests/multi-extmod:
- Test 4: Use a hard IRQ avoiding event loss.
- Test 5: Count the result of can.cancel_send() instead of the
  non-supported IRQ_TX_FAILED event.
- Test 8: Add some dummy print statements expected by the test script
  for situations which cannot be handled by MIMXRT.
  Change irq handler to deal either with RX or TX.

tests/tests/extmod_hardware/machine_can_instances.py:
- Set the mode to CAN.MODE_SILENT_LOOPBACK.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-27 16:15:43 +10:00