Verified Commit 251b53f1 authored by Rahix's avatar Rahix
Browse files

fix(pycardium): Ensure printf output is sent to Epicardium API

Previously, printf would output directly to UART, which led to race
conditions.  With removing card10-board from pycardium and implementing
_write() directly, this can be fixed.  Now printf & co will output via
Epicardium API.

Signed-off-by: Rahix's avatarRahix <>
parent d6a66403
......@@ -71,9 +71,9 @@ elf = executable(
include_directories: micropython_includes,
dependencies: [max32665_startup_core1, board_card10, periphdriver, api_caller],
dependencies: [max32665_startup_core1, periphdriver, api_caller],
link_with: upy,
link_whole: [max32665_startup_core1_lib, board_card10_lib],
link_whole: [max32665_startup_core1_lib],
link_args: [
'-Wl,-Map=' + meson.current_build_dir() + '/' + name + '.map',
......@@ -41,6 +41,13 @@ int DEBUG_printf(const char *fmt, ...)
return ret;
/* newlib syscall to allow printf to work */
long _write(int fd, const char *buf, size_t cnt)
epic_uart_write_str(buf, cnt);
return cnt;
bool do_interrupt = false;
/* Timer Interrupt used for control char notification */
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment