py: Remove dependency on printf/fwrite in mp_plat_print.

See issue #1500.
diff --git a/py/mpconfig.h b/py/mpconfig.h
index ad2fe3e..acee5ee 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -806,7 +806,7 @@
 
 // This macro is used to do all output (except when MICROPY_PY_IO is defined)
 #ifndef MP_PLAT_PRINT_STRN
-#define MP_PLAT_PRINT_STRN(str, len) printf("%.*s", (int)len, str)
+#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
 #endif
 
 #ifndef MP_SSIZE_MAX