Skip to content

Commit 80aedd2

Browse files
committed
Move crypto hardware acceleration configuration
The crypto hardware acceleration might require defining a lot of mbed TLS specific macros. Enumerating all of them in `targets.json` creates too much noise, therefore we move it into a target specific mbed TLS header. The target with crypto hardware acceleration has to - indicate its capability in `targets.json` by adding "CRYPTO" to the "device_has" section - has to define his crypto hardware acceleration related macros in an `mbedtls_device.h` header - place the `mbedtls_device.h` file in the `features/mbedtls/targets/TARGET_XXXX` directory specific to the target
1 parent aeabcc9 commit 80aedd2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

features/mbedtls/importer/Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ clean:
9393
rm -f $(TARGET_PREFIX)apache-2.0.txt
9494
rm -f $(TARGET_PREFIX)VERSION.txt
9595
rm -f $(TARGET_PREFIX)AUTHORS.txt
96-
rm -rf $(TARGET_PREFIX)/targets
9796
rm -rf $(TARGET_SRC)
9897
rm -rf $(TARGET_INC)
9998
rm -rf $(MBED_TLS_DIR)

features/mbedtls/platform/inc/platform_mbed.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,7 @@
2020
#if defined(DEVICE_TRNG)
2121
#define MBEDTLS_ENTROPY_HARDWARE_ALT
2222
#endif
23+
24+
#if defined(DEVICE_CRYPTO)
25+
#include "mbedtls_device.h"
26+
#endif

0 commit comments

Comments
 (0)