diff --git a/lib/utils/stdout_helpers.c b/lib/utils/stdout_helpers.c
index 6efe10b92cec3e0ac7f73c970340c6b7ec4e6b7c..5f7a17d32070241b3b84b9204220fa4645aed87f 100644
--- a/lib/utils/stdout_helpers.c
+++ b/lib/utils/stdout_helpers.c
@@ -11,7 +11,7 @@
 
 // Send "cooked" string of given length, where every occurance of
 // LF character is replaced with CR LF.
-void mp_hal_stdout_tx_strn_cooked(const char *str, mp_uint_t len) {
+void mp_hal_stdout_tx_strn_cooked(const char *str, size_t len) {
     while (len--) {
         if (*str == '\n') {
             mp_hal_stdout_tx_strn("\r", 1);