Skip to content

Add the Adafruit Metro CH32V407 and CH32V467 to zephyr-cp - #11900

Merged
dhalbert merged 5 commits into
adafruit:mainfrom
mikeysklar:metro-ch32v4x7-pr3
Nov 18, 2026
Merged

dhalbert merged 5 commits into
adafruit:mainfrom
mikeysklar:metro-ch32v4x7-pr3

Conversation

@mikeysklar

Copy link
Copy Markdown
Collaborator

What

Adds two new boards to the Zephyr port: the Adafruit Metro CH32V407 and Metro CH32V467.

Why

These are the first WCH RISC-V boards to run CircuitPython.

Dependencies

PR What
adafruit/zephyr#21 Chips, USB driver and Zephyr boards. west.yml pins it.
adafruit/adaboot#19 Bootloader layouts. west.yml pins it.

Board details

Metro CH32V407 Metro CH32V467
USB VID:PID 239A:817E 239A:8180
Firmware adaboot app slot, 892 KB same
CIRCUITPY 4 MB SPI flash same
REPL USB. D0/D1 stay free for busio.UART. same

Change for all zephyr-cp boards

supervisor/flash.c used an array before setting it, so a flash device could be skipped and CIRCUITPY not created.

It is its own commit.

Testing

Rev A boards, built from this branch with the two PRs above.

Test V407 V467
UF2 copied to ADABOOT boots pass, 21 s pass, 21 s
USB REPL and CIRCUITPY drive pass pass
ulab 6.12.1: sum, mean, std, det, inv, fft pass pass
gifio and jpegio import, zlib decompress pass pass
autogen_board_info.toml matches a fresh build pass pass

Not tested with this build: GPIO, I2C, SPI and UART pins, the NeoPixel, the microSD slot.

Board definitions and testing by Claude, reviewed by me.

mikeysklar and others added 3 commits November 16, 2026 19:02
covered_by_areas is a variable length array, so it starts with whatever
is on the stack. fa_cb only ever sets entries to true. A stray true
marks a flash device as covered by a flash area, and
supervisor_flash_init() then skips it, so CIRCUITPY is not created on
that device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Two WCH RISC-V Metro boards that ship with adaboot. CircuitPython links
into adaboot's 892 KB app slot, and CIRCUITPY lives on the SPI NOR.

- boards: board.conf, board.overlay, console.overlay, circuitpython.toml
  and autogen_board_info.toml for each board, plus a pins binding for
  the named pins that are not on the Arduino header.
- compat2driver.py: wch_esig (hwinfo) and wch_usbhs2 (usb/udc). Both
  match gen_compat2driver.py run against the adafruit/zephyr fork; a full
  regeneration would add about 900 unrelated lines.
- west.yml: stop blocking hal_wch.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pin the adafruit/zephyr and adafruit/adaboot branches that add the CH32V407 and CH32V467. Move both to the merge commits once they land.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
The Metro CH32V407 and CH32V467 are the first RISC-V boards in the port. CI only installed arm-zephyr-eabi, so their builds stopped at "riscv64-zephyr-elf-gcc not found".

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>

@dhalbert dhalbert left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

I have merged the CH32-relevant PR's in adaboot and adafruit/zephyr, so update the pins here to the absolute newest commits for those repos. Then we can approve and merge.

adafruit/zephyr#21 and adafruit/adaboot#19 are merged. Point the pins
at their merge commits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mikeysklar
mikeysklar requested a review from dhalbert November 18, 2026 14:52
@dhalbert
dhalbert merged commit 796a66d into adafruit:main Nov 18, 2026
63 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants