Skip to content

Conversation

@nzmichaelh
Copy link
Contributor

The QingKe V2A, V2C, and V4C have a Debug Module with two data registers data0 and data1. These can be used with SDI compatible debuggers such as minichlink to send console data to the host.

Add a console driver that buffers up to three characters in data0, communicates with the host, and fails gracefully if the driver is enabled but the debugger is not connected. The buffering is particularly important on hosts that use USB passthrough such as Chrome OS.

Compared to the UART console, the debug console uses 916 bytes less flash and frees up a UART.

Tested on the ch32v003evt and ch32v006evt. To test, add &debug { status = "okay"; }; to the board Devicetree, set zephyr,console = &debug, and enable the driver.

@nzmichaelh nzmichaelh self-assigned this May 14, 2025
The QingKe V2A, V2C, and V4C have a Debug Module with two data
registers `data0` and `data1`. These can be used with SDI compatible
debuggers such as `minichlink` to send console data to the host.

Add a console driver that buffers up to three characters in data0,
communicates with the host, and fails gracefully if the driver is
enabled but the debugger is not connected. The buffering is
particularly important on hosts that use USB passthrough such as
Chrome OS.

Compared to the UART console, the debug console uses 916 bytes less
flash and frees up a UART.

Tested on the ch32v003evt and ch32v006evt. To test, add `&debug
{ status = "okay"; };` to the board Devicetree, set `zephyr,console =
&debug`, and enable the driver.

Signed-off-by: Michael Hope <michaelh@juju.nz>
@sonarqubecloud
Copy link

@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

@github-actions github-actions bot added the Stale label Aug 21, 2025
@github-actions github-actions bot closed this Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant