Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8026

SDK • Re: mbedtls PSA crypto errors

$
0
0
Hello.
To run that sample, write mbedtls_config.h as follows so that it builds correctly and works on RP2350:

Code:

#pragma once#define MBEDTLS_AES_C#define MBEDTLS_CTR_DRBG_C#define MBEDTLS_ENTROPY_C#define MBEDTLS_NO_PLATFORM_ENTROPY#define MBEDTLS_PSA_CRYPTO_C#define MBEDTLS_SHA256_C#define MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG
Also, make sure to register the appropriate libraries in your project's CMakeLists.txt:

Code:

cmake_minimum_required(VERSION 3.13...3.27)include(pico_sdk_import.cmake)set(CMAKE_C_STANDARD 11)set(CMAKE_CXX_STANDARD 17)project(example C CXX ASM)pico_sdk_init()add_executable(example example.c)target_include_directories(example PRIVATE ${CMAKE_CURRENT_LIST_DIR})target_link_libraries(example PRIVATE    pico_stdlib    pico_mbedtls_crypto    pico_mbedtls_headers)pico_enable_stdio_usb(example 1)pico_add_extra_outputs(example)

Statistics: Posted by 0yama — Mon Apr 07, 2025 5:29 pm



Viewing all articles
Browse latest Browse all 8026

Trending Articles