Skip to content

Commit

Permalink
mimxrt,stm32: Enable MICROPY_PY_USSL_FINALISER.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
dpgeorge committed Jan 7, 2022
1 parent 772058a commit 1892d03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ports/mimxrt/mpconfigport.h
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions ports/stm32/mpconfigport.h
Expand Up @@ -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)
Expand Down

0 comments on commit 1892d03

Please sign in to comment.