From 30f40fc0fa476fb2a2c415e290987f0860d1312c Mon Sep 17 00:00:00 2001 From: Steven Cooreman Date: Fri, 12 Jun 2020 19:32:35 +0200 Subject: [PATCH] [efr32] turn off warnings which break certain configurations of mbed TLS (#5091) Detected on EFR32MG21 with hardware acceleration turned on, all inside mbedTLS' library/ecdsa.c: * Turning on ECDSA signing acceleration (MBEDTLS_ECDSA_SIGN_ALT) triggers an unused parameter on rs_ctx in mbedtls_ecdsa_write_signature_restartable * Turning on ECDSA verification acceleration (MBEDTLS_ECDSA_VERIFY_ALT) triggers an unused parameter on rs_ctx in mbedtls_ecdsa_read_signature_restartable * Turning on both ECDSA signing & verification acceleration (MBEDTLS_ECDSA_SIGN_ALT + MBEDTLS_ECDSA_VERIFY_ALT) triggers an unused function error on static function derive_mpi Looking at the latest mbed TLS development branch, it seems this issue will not be resolved soon. Therefore, we're turning off warnings for unused parameters and unused functions inside mbedTLS for the platform which uses this configuration (EFR32MG21). --- examples/Makefile-efr32mg21 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/Makefile-efr32mg21 b/examples/Makefile-efr32mg21 index 20d23eeed..9143283a9 100644 --- a/examples/Makefile-efr32mg21 +++ b/examples/Makefile-efr32mg21 @@ -84,6 +84,8 @@ EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/silabs/gecko_sdk_suit EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls/repo/include EFR32_MBEDTLS_CPPFLAGS += -I$(AbsTopSourceDir)/third_party/mbedtls/repo/include/mbedtls +EFR32_MBEDTLS_CPPFLAGS += -Wno-unused-function +EFR32_MBEDTLS_CPPFLAGS += -Wno-unused-parameter CONFIG_FILE_PATH = $(AbsTopSourceDir)/examples/platforms/efr32mg21/ HAL_CONF_DIR = $(CONFIG_FILE_PATH)/$(shell echo $(BOARD) | tr A-Z a-z)