diff --git a/qemu-arm/Makefile b/qemu-arm/Makefile
index 31ba6baa26d597156951f0641c1de64cde33cc98..6a25eb9311e3982ad0300c7777139b3edcfea5f0 100644
--- a/qemu-arm/Makefile
+++ b/qemu-arm/Makefile
@@ -40,19 +40,28 @@ SRC_C = \
 SRC_TEST_C = \
 	test_main.c \
 
+STM_SRC_C = $(addprefix stmhal/,\
+	pybstdio.c \
+	)
+
 SRC_S = \
 
 OBJ =
 OBJ += $(PY_O)
 OBJ += $(addprefix $(BUILD)/, $(SRC_C:.c=.o))
 OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
+OBJ += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o))
 
 OBJ_TEST =
 OBJ_TEST += $(PY_O)
 OBJ_TEST += $(addprefix $(BUILD)/, $(SRC_TEST_C:.c=.o))
 OBJ_TEST += $(addprefix $(BUILD)/, $(SRC_S:.s=.o))
+OBJ_TEST += $(addprefix $(BUILD)/, $(STM_SRC_C:.c=.o))
 OBJ_TEST += $(BUILD)/tinytest.o
 
+# List of sources for qstr extraction
+SRC_QSTR += $(SRC_C) $(SRC_TEST_C) $(STM_SRC_C)
+
 all: run
 
 run: $(BUILD)/firmware.elf
diff --git a/qemu-arm/memory.h b/qemu-arm/memory.h
new file mode 100644
index 0000000000000000000000000000000000000000..f3777b0e3962f8f633ebe20927aaa7afc42dd859
--- /dev/null
+++ b/qemu-arm/memory.h
@@ -0,0 +1,2 @@
+// this is needed for extmod/crypto-algorithms/sha256.c
+#include <string.h>
diff --git a/qemu-arm/mpconfigport.h b/qemu-arm/mpconfigport.h
index 1f23148c2acd6a422b744e6e2f6b02d5f5958e42..b8806405bc25483b1cf2be06b8221858083e4d49 100644
--- a/qemu-arm/mpconfigport.h
+++ b/qemu-arm/mpconfigport.h
@@ -20,9 +20,18 @@
 #define MICROPY_PY_ARRAY_SLICE_ASSIGN (1)
 #define MICROPY_PY_BUILTINS_FROZENSET (1)
 #define MICROPY_PY_BUILTINS_MEMORYVIEW (1)
-#define MICROPY_PY_IO               (0)
+#define MICROPY_PY_IO               (1)
 #define MICROPY_PY_SYS_EXIT         (1)
 #define MICROPY_PY_SYS_MAXSIZE      (1)
+#define MICROPY_PY_UERRNO           (1)
+#define MICROPY_PY_UBINASCII        (1)
+#define MICROPY_PY_URANDOM          (1)
+#define MICROPY_PY_UCTYPES          (1)
+#define MICROPY_PY_UZLIB            (1)
+#define MICROPY_PY_UJSON            (1)
+#define MICROPY_PY_URE              (1)
+#define MICROPY_PY_UHEAPQ           (1)
+#define MICROPY_PY_UHASHLIB         (1)
 #define MICROPY_USE_INTERNAL_PRINTF (0)
 
 // type definitions for the specific machine
diff --git a/qemu-arm/mphalport.h b/qemu-arm/mphalport.h
index 4bd8276f349276147c911ae2c08b37e7b8811544..d996402ae4ac4bb8fb5d661d4ca136481d16ac00 100644
--- a/qemu-arm/mphalport.h
+++ b/qemu-arm/mphalport.h
@@ -1 +1,2 @@
-// empty file
+#define mp_hal_stdin_rx_chr() (0)
+#define mp_hal_stdout_tx_strn_cooked(s, l) write(1, (s), (l))
diff --git a/tools/tinytest-codegen.py b/tools/tinytest-codegen.py
index 091c1b065fbf65fba37037827318953bd2f18fef..bab937135f3277bb738cbf4655a61a435a8240dc 100755
--- a/tools/tinytest-codegen.py
+++ b/tools/tinytest-codegen.py
@@ -46,8 +46,15 @@ testgroup_member = (
 
 ## XXX: may be we could have `--without <groups>` argument...
 # currently these tests are selected because they pass on qemu-arm
-test_dirs = ('basics', 'micropython', 'inlineasm') # 'float', 'import', 'io', 'misc')
-exclude_tests = ('inlineasm/asmfpaddsub.py', 'inlineasm/asmfpcmp.py', 'inlineasm/asmfpldrstr.py', 'inlineasm/asmfpmuldiv.py', 'inlineasm/asmfpsqrt.py',)
+test_dirs = ('basics', 'micropython', 'extmod', 'inlineasm') # 'float', 'import', 'io', 'misc')
+exclude_tests = (
+    'inlineasm/asmfpaddsub.py', 'inlineasm/asmfpcmp.py', 'inlineasm/asmfpldrstr.py', 'inlineasm/asmfpmuldiv.py', 'inlineasm/asmfpsqrt.py',
+    'extmod/time_ms_us.py',
+    'extmod/ujson_dumps_float.py', 'extmod/ujson_loads_float.py',
+    'extmod/uctypes_native_float.py', 'extmod/uctypes_le_float.py',
+    'extmod/machine_pinbase.py', 'extmod/machine_pulse.py',
+    'extmod/vfs_fat_ramdisk.py',
+)
 
 output = []