diff --git a/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.cpp b/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.cpp index 4aedf85c1c..8d044bb904 100644 --- a/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.cpp +++ b/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.cpp @@ -30,6 +30,8 @@ #include "platform/PlatformMutex.h" #include "hal/trng_api.h" +#if defined(MBEDTLS_CONFIG_HW_SUPPORT) + /* Consideration for choosing proper synchronization mechanism * * We choose mutex to synchronize access to crypto ACC. We can guarantee: @@ -461,3 +463,5 @@ extern "C" void CRPT_IRQHandler() RSA_CLR_INT_FLAG(CRPT); } } + +#endif /* #if defined(MBEDTLS_CONFIG_HW_SUPPORT) */ diff --git a/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.h b/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.h index 0bb145fc76..4ccf03cc66 100644 --- a/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.h +++ b/targets/TARGET_NUVOTON/TARGET_M460/crypto/crypto-misc.h @@ -21,6 +21,8 @@ #include +#if defined(MBEDTLS_CONFIG_HW_SUPPORT) + #ifdef __cplusplus extern "C" { #endif @@ -100,4 +102,6 @@ bool crypto_dma_buffs_overlap(const void *in_buff, size_t in_buff_size, const vo } #endif +#endif /* #if defined(MBEDTLS_CONFIG_HW_SUPPORT) */ + #endif