summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2022-01-08 00:02:04 +1100
committerDamien George <damien@micropython.org>2022-01-08 00:02:04 +1100
commit1892d037409a95511ce9f38782a7fafab95052c4 (patch)
treef076c721f2b630b6d70fbdf4238a8fc9b2599ff4
parent772058a6bd7f19866f5123f0f708440207eb5b93 (diff)
mimxrt,stm32: Enable MICROPY_PY_USSL_FINALISER.
This is needed because these ports allocate mbedtls data on the MicroPython heap, and SSL socket objects must be fully cleaned up when they are garbage collected, to free this memory allocated by mbedtls. As part of this, gc_sweep_all() will now ensure that the MP_STATE_PORT(mbedtls_memory) linked-list is fully deallocated on soft reset. Signed-off-by: Damien George <damien@micropython.org>
-rw-r--r--ports/mimxrt/mpconfigport.h1
-rw-r--r--ports/stm32/mpconfigport.h1
2 files changed, 2 insertions, 0 deletions
diff --git a/ports/mimxrt/mpconfigport.h b/ports/mimxrt/mpconfigport.h
index 967482dc7..e650579e6 100644
--- a/ports/mimxrt/mpconfigport.h
+++ b/ports/mimxrt/mpconfigport.h
@@ -116,6 +116,7 @@ uint32_t trng_random_u32(void);
#define MICROPY_PY_URE_MATCH_GROUPS (1)
#define MICROPY_PY_URE_MATCH_SPAN_START_END (1)
#define MICROPY_PY_URE_SUB (1)
+#define MICROPY_PY_USSL_FINALISER (MICROPY_PY_USSL)
#define MICROPY_PY_UHASHLIB (1)
#define MICROPY_PY_UBINASCII (1)
#define MICROPY_PY_UBINASCII_CRC32 (1)
diff --git a/ports/stm32/mpconfigport.h b/ports/stm32/mpconfigport.h
index b1a38713d..6bca5dfd9 100644
--- a/ports/stm32/mpconfigport.h
+++ b/ports/stm32/mpconfigport.h
@@ -91,6 +91,7 @@
#endif
// extended modules
+#define MICROPY_PY_USSL_FINALISER (MICROPY_PY_USSL)
#define MICROPY_PY_UHASHLIB_MD5 (MICROPY_PY_USSL)
#define MICROPY_PY_UHASHLIB_SHA1 (MICROPY_PY_USSL)
#define MICROPY_PY_UCRYPTOLIB (MICROPY_PY_USSL)