From 65fbee1d330d7d6e374060c4faf3556e41c7854c Mon Sep 17 00:00:00 2001 From: Hugues Kamba Date: Sun, 22 Dec 2019 23:22:41 +0000 Subject: [PATCH] NRF52840_DK: Fix baremetal linker error Compile in the inclusion of cryptocell310 only if the library is included in the build --- TESTS/configs/baremetal.json | 3 ++- features/cryptocell/FEATURE_CRYPTOCELL310/mbed_lib.json | 6 ++++++ targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 features/cryptocell/FEATURE_CRYPTOCELL310/mbed_lib.json diff --git a/TESTS/configs/baremetal.json b/TESTS/configs/baremetal.json index bec2fd801b..ef04375e2b 100644 --- a/TESTS/configs/baremetal.json +++ b/TESTS/configs/baremetal.json @@ -32,7 +32,8 @@ "events", "kv-global-api", "sd", - "qspif" + "qspif", + "cryptocell310" ], "target_overrides": { "*": { diff --git a/features/cryptocell/FEATURE_CRYPTOCELL310/mbed_lib.json b/features/cryptocell/FEATURE_CRYPTOCELL310/mbed_lib.json new file mode 100644 index 0000000000..607e4dff72 --- /dev/null +++ b/features/cryptocell/FEATURE_CRYPTOCELL310/mbed_lib.json @@ -0,0 +1,6 @@ +{ + "name": "cryptocell310", + "config": { + "present": 1 + } +} diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h index d048efe1d7..2d6af753b4 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/objects.h @@ -54,7 +54,7 @@ extern "C" { #include "nrf_uart.h" -#if defined(FEATURE_CRYPTOCELL310) +#if MBED_CONF_CRYPTOCELL310_PRESENT #include "objects_cryptocell.h" #else struct trng_s {