Commit Graph

18425 Commits

Author SHA1 Message Date
Jeff Epler a254bbca79 py/nlrx86: Fix nlr_push to build with Clang 19.
This version is believed to work from Clang 3.0 to 22.1.0
(all versions on godbolt at the time of writing).

Clang rejects the `(void)x;` notation for a used variable
in a naked asm function, so do this only conditionally.

Introduces use of `__builtin_unreachable()` with gcc.
This saves 1 byte by causing gcc not to emit an `ud2` opcode
at the end. However, the unreachable sanitizer (enabled by
default(!) on Ubuntu 24.04 with gcc version 13.3.0) corrupts
the ebx register, so it must be disabled.

Clang does not accept `__builtin_unreachable`
or `return 0;` here, UNREACHABLE must expand to nothing.

Closes: #17415

Signed-off-by: Jeff Epler <jepler@unpythonic.net>
2026-05-07 23:18:31 +10:00
Damien George d6a1d37156 py/obj: Add assert that float isn't used with mp_obj_is_type.
Some object representations have floats as literal objects (ie not heap
allocated) and in such a case using `mp_obj_is_type(t, &mp_type_float)`
will always return false.  So add a compile-time assertion to force the
correct usage.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-07 23:16:03 +10:00
Damien George 416eadf962 ports: Use mp_obj_is_float instead of mp_obj_is_type.
`mp_obj_is_float` must be used in case the object representation is C or D.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-07 23:16:03 +10:00
Dryw Wade 234bac45d3 py/mkrules.mk: Change LIB to LIBS.
Same in ports/windows/Makefile to be consistent with other ports.

Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
2026-05-07 23:14:22 +10:00
Dryw Wade 01df5a1f05 py/py.mk: Add LIBS_USERMOD to LIBS.
This enables C++ modules to correctly postion -l linker flags at the end of
the flags instead of at the start.  Updated the example C++ micropython.mk
accordingly.

Signed-off-by: Dryw Wade <dryw.wade@sparkfun.com>
2026-05-07 23:13:59 +10:00
Damien George 05fcc8c580 tests/basics: Add coverage for bytes find/index with out-of-bounds arg.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-07 22:54:24 +10:00
Jim Mussared b7e32206b1 tests/basics: Add tests for bytes/bytearray.find/index(int).
Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2026-05-07 22:54:14 +10:00
Jim Mussared f5af52985c py/objstr: Add support for bytes.find(int).
This adds support for `bytes.find(x)` where x is an integer value.  It also
extends to `bytearray` as well as the methods `.rfind()`, `.index()` and
`.rindex()`.

This allows existing Python code that uses integers like this to "just
work" (i.e. CPython compatibility is always good).  The Python alternative
is a bit awkward, i.e. given a byte value, to use find/index you have to
make it into a single-element bytes, e.g. `b.find(chr(n).encode())`.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
2026-05-07 22:50:22 +10:00
robert-hh 21b3a51aae samd/machine_adc: Fix the configuration with averaging enabled.
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.1) (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.1) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.1) (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.1) (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
When averaging is selected, the resolution is fixed to 12 bit.
The configuration has to be changed to cater for the result shifts.

Side change: Remove a duplicated code line in init().

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:08:36 +10:00
robert-hh 92201f8e92 samd/machine_adc: Factor out machine.adc_timed() to extmod code.
After machine.ADC has been moved to extmod/machine_adc.c.
Adding adc.read_timed() and adc.busy() to extmod/machine_adc.c with
a corresponding flag to enable them.
ADC/DAC timed are by default enabled only at all SAMD51 devices and
at SAMD21 devices with an external flash for the file system.

Add class constants for the reference voltage source.
As far as possible the STM32 names are used, except where they should
match common board silkscreen labels.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:08:36 +10:00
robert-hh 285b737e44 samd: Fix init and deinit for adc_timed() and dac_timed().
Fixes:
- Leave no half-initialized device if init fails.
- Fix dac_deinit_channel(). Perform deinit only for channels that
  had been initilized.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:01:54 +10:00
robert-hh e029a9a071 samd: Make adc.read_timed() and dac.write_timed() configurable.
Both together require ~1.9k of flash space, including the DMA-manager
and the TC-manager. adc.read_timed() uses ~700 bytes, dac.write_timed()
~600 bytes.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:01:54 +10:00
robert-hh e4a06097a4 samd/machine_dac: Rework the DAC deinit() semantics.
Since the two channels of a SAMD51 are not completely independent,
dac.deinit() now clears both channels, and both channels have to
be re-instantiated after a deinit().

Side change:
- rearrange some code lines.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:01:54 +10:00
robert-hh cc42bf9007 docs/samd: Document the extensions to DAC and ADC.
Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:01:54 +10:00
robert-hh 490d63aa7e samd: Add new adc.busy() and dac.busy() methods.
These return True, while a timed action is ongoing.

Side change:
Reorder some code in machine_dac.c and do not reset DAC twice.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 15:01:45 +10:00
robert-hh 0214d9392d samd/machine_adc: Add a callback keyword option to machine.ADC().
Enabling a callback that will be called when a adc.read_timed_into() run
is finished. That's especially useful with slow sampling rates and/or
many samples, avoiding to guess the sampling time.
Raise an error is adc.read_u16() is called while a read_timed_into()
is active.

Other ADC changes:
- SAMD51: use ADC1 if both ADC1 and ADC0 are available at a Pin.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:51:58 +10:00
robert-hh ac2f4520d8 samd/machine_dac: Add a callback keyword option to machine.DAC().
The callback is called when a dac_timed() sequence finishes. It will be
reset with callback=None or omitting the callback option in the
constructor.

Side change: Set the clock freq. to 48Mhz.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:51:58 +10:00
robert-hh 8b4dd110aa samd/machine_adc: Add adc.read_timed() method.
Used as:

    adc.read_timed(buffer, freq)

Buffer must be preallocated. The size determines the number of 16 bit
words to be read. The numeric range of the results is that of the raw
ADC. The call returns immediately, and the data transfer is done by DMA.
The caller must wait sufficiently long until the data is sampled
and can be noticed by a callback. No internal checks are made for
a too-high freq value.

Read speeds depends on Average and bit length setting:

    SAMD21: Max. 350kS/s (8 bit, Average 1)
    SAMD51: Max. 1 MS/s (8 bit, Average 1)

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:51:57 +10:00
robert-hh f4b3b5802b samd/machine_dac: Add dac.write_timed() method.
Used as:

    dac.write_timed(data, freq [, count])
    dac.deinit()

Working range for dac_timed():

    SAMD21: 1 Hz - 100 kHz (1 MHz clock, 10 bit)
    SAMD51: 1 Hz - ~500 kHz (8 MHz clock, 12 bit)

The buffer has to be a byte array or a halfword array,
and the data is sent once.

The default for count is 1. If set to a value > 0, the data will be
transmitted count times. If set to 0 or  < 0, the date will be
transmitted until deliberately stopped. The playback
can be stopped with dac.deinit().

dac.deinit() just releases the timer and DMA channel needed by
dac_timed(). The DAC object itself does not have to be released.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:51:54 +10:00
robert-hh 6853cfbcee samd/tc_manager: Add a tc_manager function set.
These functions are use to allocate, free and configure a set
of TC counter instances. The SAMxx MCU have between 3 to 5 (SAMD21) and
4 to 8 (SAMD51) TC instances. Two of them are used for the µs counter,
the remaining 1 - 6 instances are administered here for use by
various functions, like timed DMA transfers.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:49:54 +10:00
robert-hh 7466e2293c samd/dma_manager: Add a DMA manager.
Used for allocation of DMA channels. It will be needed for planned
modules and methods like adc_timed(), dac_timed(), I2S.

It includes management code for DMA IRQ handlers, similar to what
was made for Sercom.

Signed-off-by: robert-hh <robert@hammelrath.com>
2026-05-05 14:49:52 +10:00
Yanfeng Liu 9f396bba8d docs/develop/porting: Update session log for example port.
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.1) (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.1) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.1) (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.1) (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 updates session log to be in line with behavior of latest
ports/minimal.

Signed-off-by: Yanfeng Liu <yfliu2008@qq.com>
2026-05-01 15:59:48 +10:00
Andrew Leech 586ad0dd70 docs/library/io: Add documentation for the io.IOBase class.
Document the three methods that IOBase subclasses implement (readinto,
write, ioctl) and the common ioctl operations. Includes a simple write-only
stream example and a pollable ring buffer example.

IOBase docs are inline in io.rst before StringIO/BytesIO, following
CPython's structure.

Also fix a statement in io.rst that incorrectly claimed streams cannot be
subclassed in pure Python.

Signed-off-by: Andrew Leech <andrew.leech@planet-innovation.com>
2026-05-01 15:54:33 +10:00
Damien George 7f7adad6ca mimxrt/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-05-01 14:30:07 +10:00
Damien George eaa7ca6d6c mimxrt/systick: Clean up header file includes.
`systick.h` and `pendsv.h` both use MICROPY-level configuration macros, so
must include `py/mpconfig.h`.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:30:07 +10:00
Damien George 829d770e3f mimxrt/mphalport: Remove unused uwTick macro definition.
The config option `MICROPY_SOFT_TIMER_TICKS_MS` is used instead.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:30:07 +10:00
Damien George 42141e94fe mimxrt/systick: Remove unused systick helper functions.
These legacy functions were copied verbatim from the stm32 port and never
used.  And the use of WFI in `systick_wait_at_least()` is probably wrong.

And correct the comment in SysTick_Handler, which was also copied from
stm32.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:30:06 +10:00
Damien George bad1c60953 tools/ci.sh: Build user C example modules as part of alif CI.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:25:10 +10:00
Damien George b5e1974f96 alif: Add support for building C++ user modules.
This allows alif boards to build and run `examples/usercmodule`.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:25:10 +10:00
Damien George 65399bc36e alif/mphalport: Use DWT->CYCCNT for CPU tick if SysTick/LPTIMER is used.
Using CYCCNT gives much higher resolution, at 400MHz.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:23:32 +10:00
Damien George b3806c5edb alif/system_tick: Add system_tick_get_ms_fast when SysTick is enabled.
This function gives direct access to the 32-bit SysTick millisecond
counter.  And then use it to implement `mp_hal_ticks_ms()`.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:23:32 +10:00
Damien George 953773c350 alif/system_tick: Document differences between SysTick/LPTIMER/UTIMER.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 14:23:32 +10:00
rmouro_QCOM 7515a495a0 zephyr/boards/arduino_uno_q: Add board config for Arduino UNO Q.
Add board configuration files for the Arduino UNO Q, enabling MicroPython
on its STM32U585 (Cortex-M33) microcontroller.

arduino_uno_q.overlay:
- Redirects zephyr,console from &usart1
- Adds a 256 KB storage_partition at 0xF0000 for littlefs /flash

arduino_uno_q.conf:
- Enables serial console, GPIO, flash, and littlefs filesystem

Signed-off-by: rmouro_QCOM <rmouro@qti.qualcomm.com>
2026-05-01 14:19:10 +10:00
Calin Faja 4814df9b75 zephyr/machine_uart: Fix stop bits config and swapped buffer defaults.
Fix three bugs in the Zephyr UART init:

1. Stop bits variable typo: `data_bits = UART_CFG_STOP_BITS_2` assigned to
   the wrong variable, corrupting data_bits and leaving stop_bits
   uninitialized when stop=2 is requested.

2. Config struct used raw `args[ARG_stop].u_int` (e.g. integer 2) instead
   of the computed `stop_bits` enum (e.g. `UART_CFG_STOP_BITS_2 = 3`),
   resulting in `UART_CFG_STOP_BITS_1_5` being configured instead of
   `UART_CFG_STOP_BITS_2`.

3. Swapped default values for txbuf/rxbuf arguments: `MP_QSTR_txbuf`
   defaulted to `UART_RX_RING_BUF_DEF_SIZE` and vice versa (latent since
   both are 128 today).

Signed-off-by: Calin Faja <calinfaja@gmail.com>
2026-05-01 14:17:55 +10:00
Damien George c7187da689 zephyr: Convert port to use new event waiting functions.
This commit converts the zephyr port to use the new event waiting
mechanism, with the `MICROPY_INTERNAL_WFE` macro.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 13:04:58 +10:00
Damien George 37399d5bcf zephyr/mphalport: Allow mp_hal_wait_sem() to exit early when signalled.
A new argument is added to this function to select whether it exits early
when signalled via `mp_hal_signal_event()`, so it can be used to wait for
general events (rather than just a specific semaphore).

And rename this function to `mp_hal_wait_event()` to better match its new
semantics.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 13:04:58 +10:00
Damien George 9d10e2945d zephyr/mpconfigport_minimal: Configure MICROPY_STACK_CHECK_MARGIN.
Stack checking is enabled with the minimal configuration, so this margin
configuration must be set or else the stack can easily overflow when
running the recursive stress tests.

Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 13:04:58 +10:00
Fin Maaß 56b168b086 zephyr/machine_i2c: Rework I2C driver to make continuous transactions.
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.1) (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.1) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.1) (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.1) (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
Stop using `mp_machine_i2c_transfer_adaptor` and instead implement support
for `MP_MACHINE_I2C_FLAG_WRITE1`.  That allows combined write-read
transactions like `I2C.readfrom_mem()` to work properly with a RESTART,
instead of being split into a separate write-with-STOP followed by a
read-with-STOP (many I2C controllers in zephyr don't support incomplete
transactions).

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2026-05-01 12:46:15 +10:00
Vdragon 00c5968b35 zephyr/boards: Add some Bouffalolab-based boards.
Finally those have all basic features, add them.

Signed-off-by: Vdragon <mail@massdriver.space>
2026-05-01 12:11:33 +10:00
Damien George 35d09a7b19 zephyr/boards/xiao_ble_nrf52840_sense: Use conf to select feature level.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 11:56:31 +10:00
Damien George 0657a804bc zephyr/boards/mimxrt1020_evk: Use conf file to select feature level.
Signed-off-by: Damien George <damien@micropython.org>
2026-05-01 11:55:45 +10:00
Vdragon 8f1a8d4ffa zephyr: Enable FULL feature level for rp2.
Enables all features for RP2 boards.

Signed-off-by: Vdragon <mail@massdriver.space>
2026-05-01 11:46:34 +10:00
Vdragon cfe9048693 zephyr: Add ability to set feature level in conf file.
Adds the ability to set feature level in board.conf.

Signed-off-by: Vdragon <mail@massdriver.space>
2026-05-01 11:46:34 +10:00
Jon Nordby 02d2e9fb74 zephyr/CMakeLists.txt: Add support for USER_C_MODULES.
Fixes issue #17878.

Signed-off-by: Jon Nordby <jononor@gmail.com>
2026-05-01 11:41:27 +10:00
Alessandro Gatti 70bb728c09 tools/ci.sh: Let QEMU try to build with a user module.
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.1) (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.1) (push) Has been cancelled
esp32 port / build_idf (esp32_build_p4, v5.5.1) (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.1) (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 brings the QEMU port in line with other ports when it comes
to making sure the port builds with a user module to be part of the main
interpreter.

To not impact too much on the build time, only the `MPS2_AN385` board
does this as there'd be just too many targets to test, for not much
gain.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00
Alessandro Gatti 1ff9f9e3de qemu/mcu/arm/startup: Add an implementation for "abort".
This commit adds a naive implementation of the "abort" standard C
library, that is needed by certain C++ runtimes let code link.

Although the Arm toolchain used in the CI image does not need this,
newer or different toolchains may actually need this (eg. the Arm EABI
toolchain provided by Arch Linux).  Given the limited scope of the QEMU
port, the function simply spins forever.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00
Alessandro Gatti 65dabf8d1f qemu/mcu/arm/stm32.ld: Fix C++ linking.
This commit expands the linkerscript for STM32-series boards to let C++
code link with the interpreter core.

The linkerscript now contains all necessary sections for C++ code that
uses exceptions to be part of a user module inside the MicroPython
image.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00
Alessandro Gatti 086534a873 qemu/mcu/arm/nrf51.ld: Fix C++ linking.
This commit expands the linkerscript for nRF51-series boards to let C++
code link with the interpreter core.

The linkerscript now contains all necessary sections for C++ code that
uses exceptions to be part of a user module inside the MicroPython
image.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00
Alessandro Gatti dbd3eaaa4c qemu/mcu/arm/mps3.ld: Fix C++ linking.
This commit expands the linkerscript for MPS3-series boards to let C++
code link with the interpreter core.

The linkerscript now contains all necessary sections for C++ code that
uses exceptions to be part of a user module inside the MicroPython
image.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00
Alessandro Gatti 2f52e1d6ad qemu/mcu/arm/mps2.ld: Fix C++ linking.
This commit expands the linkerscript for MPS2-series boards to let C++
code link with the interpreter core.

The linkerscript now contains all necessary sections for C++ code that
uses exceptions to be part of a user module inside the MicroPython
image.

Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
2026-04-30 23:39:42 +10:00