From 86e6744ff59ed5b882436d14359cfd6e0b055157 Mon Sep 17 00:00:00 2001 From: Damien George Date: Fri, 1 Apr 2022 10:22:00 +1100 Subject: [PATCH] rp2: Enable ucryptolib, using mbedtls for backend functions. Signed-off-by: Damien George --- ports/rp2/CMakeLists.txt | 1 + ports/rp2/mpconfigport.h | 2 ++ tools/ci.sh | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ports/rp2/CMakeLists.txt b/ports/rp2/CMakeLists.txt index bf3a51be9..d58fb5687 100644 --- a/ports/rp2/CMakeLists.txt +++ b/ports/rp2/CMakeLists.txt @@ -236,6 +236,7 @@ target_sources(${MICROPY_TARGET} PRIVATE ${MICROPY_SOURCE_PORT} ) +target_link_libraries(${MICROPY_TARGET} micropy_lib_mbedtls) target_link_libraries(${MICROPY_TARGET} usermod) target_include_directories(${MICROPY_TARGET} PRIVATE diff --git a/ports/rp2/mpconfigport.h b/ports/rp2/mpconfigport.h index 2919ed018..98e58dee9 100644 --- a/ports/rp2/mpconfigport.h +++ b/ports/rp2/mpconfigport.h @@ -88,6 +88,7 @@ #define MICROPY_PY_UOS_URANDOM (1) #define MICROPY_PY_URE_MATCH_GROUPS (1) #define MICROPY_PY_URE_MATCH_SPAN_START_END (1) +#define MICROPY_PY_UCRYPTOLIB (1) #define MICROPY_PY_UTIME_MP_HAL (1) #define MICROPY_PY_URANDOM_SEED_INIT_FUNC (rosc_random_u32()) #define MICROPY_PY_MACHINE (1) @@ -107,6 +108,7 @@ #define MICROPY_VFS (1) #define MICROPY_VFS_LFS2 (1) #define MICROPY_VFS_FAT (1) +#define MICROPY_SSL_MBEDTLS (1) // fatfs configuration #define MICROPY_FATFS_ENABLE_LFN (1) diff --git a/tools/ci.sh b/tools/ci.sh index 5aed8a7df..98c95465c 100755 --- a/tools/ci.sh +++ b/tools/ci.sh @@ -256,7 +256,7 @@ function ci_rp2_setup { function ci_rp2_build { make ${MAKEOPTS} -C mpy-cross - git submodule update --init lib/pico-sdk lib/tinyusb + git submodule update --init lib/mbedtls lib/pico-sdk lib/tinyusb make ${MAKEOPTS} -C ports/rp2 make ${MAKEOPTS} -C ports/rp2 clean make ${MAKEOPTS} -C ports/rp2 USER_C_MODULES=../../examples/usercmodule/micropython.cmake