From 8182f34584d577da4ff8e26acbe677765cfbca23 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Mon, 28 Jun 2021 12:03:01 -0500 Subject: [PATCH] stm32/main: Call mp_deinit() at end of main. This adds a call to mp_deinit() in the main function of the STM32 port. This enables the use of MICROPY_PORT_DEINIT_FUNC on that port, as well as cleaning up the GIL if threading is enabled. --- ports/stm32/main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/stm32/main.c b/ports/stm32/main.c index c8de2fd868..6df7374cce 100644 --- a/ports/stm32/main.c +++ b/ports/stm32/main.c @@ -662,6 +662,7 @@ soft_reset_exit: MICROPY_BOARD_END_SOFT_RESET(&state); gc_sweep_all(); + mp_deinit(); goto soft_reset; }