From 7c8ed0cc4292346300cbe4e4a8eb02abae667c62 Mon Sep 17 00:00:00 2001 From: Andres Amaya Garcia Date: Tue, 29 Aug 2017 12:05:50 +0100 Subject: [PATCH] Enable MBEDTLS_AES_ROM_TABLES in mbed TLS main conf Enable the compile-time option MBEDTLS_AES_ROM_TABLES in the mbed TLS main config.h file in mbed OS. This option has the effect of labelling the AES tables as 'const' so they are placed in ROM, which saves some RAM space. --- features/mbedtls/importer/adjust-config.sh | 2 ++ features/mbedtls/inc/mbedtls/config.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/features/mbedtls/importer/adjust-config.sh b/features/mbedtls/importer/adjust-config.sh index dc9478bd68..a41cf72dcf 100755 --- a/features/mbedtls/importer/adjust-config.sh +++ b/features/mbedtls/importer/adjust-config.sh @@ -112,6 +112,8 @@ conf unset MBEDTLS_RIPEMD160_C conf unset MBEDTLS_SHA1_C conf unset MBEDTLS_XTEA_C +conf set MBEDTLS_AES_ROM_TABLES + conf unset MBEDTLS_X509_RSASSA_PSS_SUPPORT conf unset MBEDTLS_X509_CSR_PARSE_C diff --git a/features/mbedtls/inc/mbedtls/config.h b/features/mbedtls/inc/mbedtls/config.h index 11a97c31f7..7c8c2fade3 100644 --- a/features/mbedtls/inc/mbedtls/config.h +++ b/features/mbedtls/inc/mbedtls/config.h @@ -435,7 +435,7 @@ * * Uncomment this macro to store the AES tables in ROM. */ -//#define MBEDTLS_AES_ROM_TABLES +#define MBEDTLS_AES_ROM_TABLES /** * \def MBEDTLS_CAMELLIA_SMALL_MEMORY