From 1bf323c36789e7c1a9273ca7ae5f3ad221fcbef5 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Fri, 13 Sep 2024 08:47:32 +0200 Subject: [PATCH] Fix build. Signed-off-by: Pol Henarejos --- config/rp2350/alt/sha256_alt.c | 2 +- pico_keys_sdk_import.cmake | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/config/rp2350/alt/sha256_alt.c b/config/rp2350/alt/sha256_alt.c index 66ba8bb..f987b85 100644 --- a/config/rp2350/alt/sha256_alt.c +++ b/config/rp2350/alt/sha256_alt.c @@ -233,7 +233,7 @@ int mbedtls_sha256_update(mbedtls_sha256_context *ctx, const unsigned char *inpu return 0; } -int mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char output[32]) { +int mbedtls_sha256_finish(mbedtls_sha256_context *ctx, unsigned char *output) { if (ctx->is224) { int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED; uint32_t used; diff --git a/pico_keys_sdk_import.cmake b/pico_keys_sdk_import.cmake index 21df5ce..6b28180 100644 --- a/pico_keys_sdk_import.cmake +++ b/pico_keys_sdk_import.cmake @@ -270,13 +270,12 @@ endif() set(LIBRARIES pico_stdlib pico_multicore + pico_rand + pico_aon_timer hardware_flash - hardware_sync - hardware_adc pico_unique_id tinyusb_device tinyusb_board - hardware_pio ) if(PICO_BOARD STREQUAL "pico_w") @@ -371,6 +370,7 @@ if(PICO_RP2350) set(SOURCES ${SOURCES} ${CMAKE_CURRENT_LIST_DIR}/config/rp2350/alt/sha256_alt.c ) + set(LIBRARIES ${LIBRARIES} pico_sha256) endif() set(INTERNAL_SOURCES ${SOURCES}) set(SOURCES ${SOURCES} ${EXTERNAL_SOURCES}) @@ -381,7 +381,7 @@ if(NOT TARGET pico_keys_sdk) pico_add_library(pico_keys_sdk) pico_add_extra_outputs(${CMAKE_PROJECT_NAME}) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE pico_keys_sdk pico_stdlib pico_multicore pico_rand hardware_flash pico_unique_id pico_aon_timer pico_sha256 tinyusb_device tinyusb_board) + target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE ${LIBRARIES}) endif() target_sources(pico_keys_sdk INTERFACE ${SOURCES}) target_include_directories(pico_keys_sdk INTERFACE ${INCLUDES})