Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
9c9252c
Added Board WeAct Studio RP2350B Core
cvmanjoo Sep 28, 2025
c3b6fb3
Added Board WeAct Studio RP2350B Core
cvmanjoo Sep 28, 2025
287adf5
Merge branch 'adafruit:main' into main
cvmanjoo Oct 13, 2025
8b2050a
Merge branch 'adafruit:main' into main
cvmanjoo Dec 22, 2025
ddeef5b
Updated USB_VID and USB_PID from https://pid.codes/1209/DEC1/
cvmanjoo Dec 24, 2025
7a3c9ae
Updated pin names
cvmanjoo Dec 25, 2025
c7e605f
Updated pin names
cvmanjoo Dec 25, 2025
db2d03d
Zephyr fixes
tannewt Mar 30, 2026
5007e8b
Only code partition for feather
tannewt Mar 31, 2026
2a1f56e
Merge pull request #10912 from tannewt/flash_fixes
tannewt Apr 1, 2026
abbd8b0
Add Zephyr board defs for Raspberry Pi Picos
tannewt Mar 30, 2026
d07ee5b
Add audiobusio.I2SOut() support to Zephyr
tannewt Dec 18, 2025
321b0bf
Add NVM support for Zephyr port
tannewt Mar 30, 2026
870cc04
Enable dynamic thread stack alloc
tannewt Apr 1, 2026
1077fb9
Merge pull request #10646 from cvmanjoo/main
dhalbert Apr 1, 2026
57a07fd
Use newer zephyr with uninit fix
tannewt Apr 1, 2026
ee527d3
Free the slab buffer on error
tannewt Apr 1, 2026
3d906c3
Merge pull request #10916 from tannewt/zephyr_audiobusio
dhalbert Apr 2, 2026
fa58309
Update translation files
weblate Apr 2, 2026
3f42d5d
Merge pull request #10920 from weblate/weblate-circuitpython-main
dhalbert Apr 2, 2026
c2a5730
Merge pull request #10918 from tannewt/zephyr_nvm
dhalbert Apr 6, 2026
13a9505
Merge pull request #10917 from tannewt/zephyr_picos
dhalbert Apr 6, 2026
8a115a2
board def for feather rp2040
FoamyGuy Apr 7, 2026
27d9d5e
Merge branch 'main' into zephyr_feather_rp2040_def
FoamyGuy Apr 7, 2026
e9d6e54
update feather rp2040 zephry board autogen for nvm
FoamyGuy Apr 7, 2026
e834f0b
eof newline
FoamyGuy Apr 7, 2026
0243b34
Merge pull request #10925 from FoamyGuy/zephyr_feather_rp2040_def
tannewt Apr 7, 2026
be90f60
enable msgpack in zephyr port and add test for it. fix dict order iss…
FoamyGuy Apr 7, 2026
83749c8
Merge pull request #10927 from FoamyGuy/zephyr_msgpack_and_fix
tannewt Apr 8, 2026
a5cbf06
enable aesio on zephyr port and add test for it. Add Containerfile an…
FoamyGuy Apr 9, 2026
03c641a
add DISABLED_MODULES mechanism for zephyr boards. disable aesio for n…
FoamyGuy Apr 10, 2026
ce39a6a
fix init_container script, fix container file ownership, add containe…
FoamyGuy Apr 10, 2026
f0d6f58
update init_container script usage example
FoamyGuy Apr 10, 2026
2a4ccc2
Merge pull request #10932 from FoamyGuy/zephyr_aesio_
tannewt Apr 10, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Ports

Ports include the code unique to a microcontroller line.

The following ports are available: ``atmel-samd``, ``cxd56``, ``espressif``, ``litex``, ``mimxrt10xx``, ``nordic``, ``raspberrypi``, ``renode``, ``silabs`` (``efr32``), ``stm``, ``unix``.
The following ports are available: ``atmel-samd``, ``cxd56``, ``espressif``, ``litex``, ``mimxrt10xx``, ``nordic``, ``raspberrypi``, ``renode``, ``silabs`` (``efr32``), ``stm``, ``unix``, and ``zephyr-cp``.

However, not all ports are fully functional. Some have limited functionality and known serious bugs.
For details, refer to the **Port status** section in the `latest release <https://github.com/adafruit/circuitpython/releases/latest>`__ notes.
Expand Down
1 change: 1 addition & 0 deletions locale/circuitpython.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2411,6 +2411,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/cs.po
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/el.po
Original file line number Diff line number Diff line change
Expand Up @@ -2439,6 +2439,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/hi.po
Original file line number Diff line number Diff line change
Expand Up @@ -2413,6 +2413,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/ko.po
Original file line number Diff line number Diff line change
Expand Up @@ -2487,6 +2487,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -2472,6 +2472,7 @@ msgstr "Неподдерживаемый тип сокета"
msgid "Update failed"
msgstr "Обновление не удалось"

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
1 change: 1 addition & 0 deletions locale/tr.po
Original file line number Diff line number Diff line change
Expand Up @@ -2435,6 +2435,7 @@ msgstr ""
msgid "Update failed"
msgstr ""

#: ports/zephyr-cp/common-hal/audiobusio/I2SOut.c
#: ports/zephyr-cp/common-hal/busio/I2C.c
#: ports/zephyr-cp/common-hal/busio/SPI.c
#: ports/zephyr-cp/common-hal/busio/UART.c
Expand Down
9 changes: 9 additions & 0 deletions ports/raspberrypi/boards/weact_studio_rp2350b_core/board.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#include "supervisor/board.h"

// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here.
10 changes: 10 additions & 0 deletions ports/raspberrypi/boards/weact_studio_rp2350b_core/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2024 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#define MICROPY_HW_BOARD_NAME "WeAct Studio RP2350B Core"
#define MICROPY_HW_MCU_NAME "rp2350b"

#define CIRCUITPY_PSRAM_CHIP_SELECT (&pin_GPIO0)
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
USB_VID = 0x1209
USB_PID = 0xDEC1
USB_PRODUCT = "RP2350B Core"
USB_MANUFACTURER = "WeAct Studio"

CHIP_VARIANT = RP2350
CHIP_PACKAGE = B
CHIP_FAMILY = rp2

EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ"

CIRCUITPY__EVE = 1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2021 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

// Put board-specific pico-sdk definitions here. This file must exist.
91 changes: 91 additions & 0 deletions ports/raspberrypi/boards/weact_studio_rp2350b_core/pins.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
// This file is part of the CircuitPython project: https://circuitpython.org
//
// SPDX-FileCopyrightText: Copyright (c) 2024 Scott Shawcroft for Adafruit Industries
//
// SPDX-License-Identifier: MIT

#include "shared-bindings/board/__init__.h"

static const mp_rom_map_elem_t board_module_globals_table[] = {
CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS

{ MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) },
{ MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) },
{ MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) },
{ MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) },
{ MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) },
{ MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) },
{ MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) },
{ MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) },
{ MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) },
{ MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) },
{ MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) },
{ MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) },
{ MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) },
{ MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) },
{ MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) },
{ MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) },
{ MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) },

{ MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO23) },

{ MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) },

{ MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) },

{ MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) },
{ MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) },
{ MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) },
{ MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) },
{ MP_ROM_QSTR(MP_QSTR_GP30), MP_ROM_PTR(&pin_GPIO30) },
{ MP_ROM_QSTR(MP_QSTR_GP31), MP_ROM_PTR(&pin_GPIO31) },
{ MP_ROM_QSTR(MP_QSTR_GP32), MP_ROM_PTR(&pin_GPIO32) },
{ MP_ROM_QSTR(MP_QSTR_GP33), MP_ROM_PTR(&pin_GPIO33) },
{ MP_ROM_QSTR(MP_QSTR_GP34), MP_ROM_PTR(&pin_GPIO34) },
{ MP_ROM_QSTR(MP_QSTR_GP35), MP_ROM_PTR(&pin_GPIO35) },
{ MP_ROM_QSTR(MP_QSTR_GP36), MP_ROM_PTR(&pin_GPIO36) },
{ MP_ROM_QSTR(MP_QSTR_GP37), MP_ROM_PTR(&pin_GPIO37) },
{ MP_ROM_QSTR(MP_QSTR_GP38), MP_ROM_PTR(&pin_GPIO38) },
{ MP_ROM_QSTR(MP_QSTR_GP39), MP_ROM_PTR(&pin_GPIO39) },

{ MP_ROM_QSTR(MP_QSTR_GP40), MP_ROM_PTR(&pin_GPIO40) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO40) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP40_A0), MP_ROM_PTR(&pin_GPIO40) },

{ MP_ROM_QSTR(MP_QSTR_GP41), MP_ROM_PTR(&pin_GPIO41) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO41) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP41_A1), MP_ROM_PTR(&pin_GPIO41) },

{ MP_ROM_QSTR(MP_QSTR_GP42), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP42_A2), MP_ROM_PTR(&pin_GPIO42) },

{ MP_ROM_QSTR(MP_QSTR_GP43), MP_ROM_PTR(&pin_GPIO43) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO43) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP43_A3), MP_ROM_PTR(&pin_GPIO43) },

{ MP_ROM_QSTR(MP_QSTR_GP44), MP_ROM_PTR(&pin_GPIO44) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO44) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP44_A4), MP_ROM_PTR(&pin_GPIO44) },

{ MP_ROM_QSTR(MP_QSTR_GP45), MP_ROM_PTR(&pin_GPIO45) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO45) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP45_A5), MP_ROM_PTR(&pin_GPIO45) },

{ MP_ROM_QSTR(MP_QSTR_GP46), MP_ROM_PTR(&pin_GPIO46) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO46) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP46_A6), MP_ROM_PTR(&pin_GPIO46) },

{ MP_ROM_QSTR(MP_QSTR_GP47), MP_ROM_PTR(&pin_GPIO47) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO47) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_GP47_A7), MP_ROM_PTR(&pin_GPIO47) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
11 changes: 9 additions & 2 deletions ports/zephyr-cp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ ifeq ($(DEBUG),1)
WEST_CMAKE_ARGS += -Dzephyr-cp_EXTRA_CONF_FILE=$(DEBUG_CONF_FILE)
endif

.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug debug-jlink debugserver attach run run-sim clean menuconfig all clean-all test fetch-port-submodules
.PHONY: $(BUILD)/zephyr-cp/zephyr/zephyr.elf flash recover debug debug-jlink debugserver attach run run-sim clean menuconfig all clean-all sim clean-sim test fetch-port-submodules

$(BUILD)/zephyr-cp/zephyr/zephyr.elf:
python cptools/pre_zephyr_build_prep.py $(BOARD)
Expand Down Expand Up @@ -68,7 +68,7 @@ run-sim:
echo "Populating build-native_native_sim/flash.bin from ./CIRCUITPY"; \
mcopy -s -i build-native_native_sim/flash.bin CIRCUITPY/* ::; \
fi
build-native_native_sim/firmware.exe --flash=build-native_native_sim/flash.bin --flash_rm -wait_uart -rt
build-native_native_sim/firmware.exe --flash=build-native_native_sim/flash.bin --flash_rm -wait_uart -rt --i2s_capture=build-native_native_sim/i2s_capture.wav

menuconfig:
west build $(WEST_SHIELD_ARGS) --sysbuild -d $(BUILD) -t menuconfig -- $(WEST_CMAKE_ARGS)
Expand All @@ -87,6 +87,13 @@ all:
clean-all:
rm -rf build build-*

# Build all sim boards concurrently using the same jobserver as `make all`.
sim:
+python cptools/build_all_boards.py --vendor native --continue-on-error

clean-sim:
rm -rf $(wildcard build-native_*)

test: build-native_native_sim/zephyr-cp/zephyr/zephyr.exe
pytest cptools/tests
pytest tests/ -v
27 changes: 27 additions & 0 deletions ports/zephyr-cp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,33 @@ make BOARD=nordic_nrf7002dk
This uses Zephyr's cmake to generate Makefiles that then delegate to
`tools/cpbuild/build_circuitpython.py` to build the CircuitPython bits in parallel.

## Native simulator build container

Building the native sim requires `libsdl2-dev:i386` and other 32bit dependencies that
can cause conflicts on 64bit systems resulting in the removal of 64bit versions of critical
software such as the display manager and network manager. A Containerfile and a few scripts
are provided to set up a container to make the native sim build inside without affecting the
host system.

The container automatically mounts this instance of the circuitpython repo inside at
`/home/dev/circuitpython`. Changes made in the repo inside the container and on the host PC
will sync automatically between host and container.

To use the container file:

1. Build the container with `podman build -t zephyr-cp-dev -f native_sim_build_Containerfile .`
2. Run/Start the container by running `./native_sim_build_run_container.sh` on the host PC.
The script will automatically run or start based on whether the container has been run before.
3. Init requirements inside the container with `./native_sim_build_init_container.sh`

To delete the container and cleanup associated files:
```sh
podman ps -a --filter ancestor=zephyr-cp-dev -q | xargs -r podman rm -f
podman rmi zephyr-cp-dev
podman image prune -f
podman rm -f zcp
```

## Running the native simulator

From `ports/zephyr-cp`, run:
Expand Down
19 changes: 2 additions & 17 deletions ports/zephyr-cp/background.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,7 @@
#include "py/runtime.h"
#include "supervisor/port.h"

#if CIRCUITPY_DISPLAYIO
#include "shared-module/displayio/__init__.h"
#endif

#if CIRCUITPY_AUDIOBUSIO
#include "common-hal/audiobusio/I2SOut.h"
#endif

#if CIRCUITPY_AUDIOPWMIO
#include "common-hal/audiopwmio/PWMAudioOut.h"
#endif
#include <zephyr/kernel.h>

void port_start_background_tick(void) {
}
Expand All @@ -28,12 +18,7 @@ void port_finish_background_tick(void) {
}

void port_background_tick(void) {
#if CIRCUITPY_AUDIOPWMIO
audiopwmout_background();
#endif
#if CIRCUITPY_AUDIOBUSIO
i2s_background();
#endif
// No, ticks. We use Zephyr threads instead.
}

void port_background_task(void) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ _pixelmap = false
_stage = false
adafruit_bus_device = false
adafruit_pixelbuf = false
aesio = false
aesio = true
alarm = false
analogbufio = false
analogio = false
Expand Down Expand Up @@ -63,17 +63,17 @@ keypad = false
keypad_demux = false
locale = false
lvfontio = true # Zephyr board has busio
math = false
math = true
max3421e = false
mcp4822 = false
mdns = false
memorymap = false
memorymonitor = false
microcontroller = true
mipidsi = false
msgpack = false
msgpack = true
neopixel_write = false
nvm = false
nvm = true # Zephyr board has nvm
onewireio = false
os = true
paralleldisplaybus = false
Expand Down
Loading
Loading