diff --git a/port/esp32/template/components/btstack/component.mk b/port/esp32/template/components/btstack/component.mk index b92a5f502..57b1933e2 100644 --- a/port/esp32/template/components/btstack/component.mk +++ b/port/esp32/template/components/btstack/component.mk @@ -8,6 +8,9 @@ # BTSTACK_ROOT := ../../../../.. +# micro-ecc of WICED tree used for SECP256R1 in LE Secure Connections +$(NAME)_COMPONENTS += micro-ecc + COMPONENT_ADD_INCLUDEDIRS := \ ${BTSTACK_ROOT}/3rd-party/bluedroid/decoder/include \ ${BTSTACK_ROOT}/3rd-party/bluedroid/encoder/include \ diff --git a/src/ble/sm.c b/src/ble/sm.c index bde35e322..6852e957e 100644 --- a/src/ble/sm.c +++ b/src/ble/sm.c @@ -2900,6 +2900,7 @@ static void sm_handle_random_result(uint8_t * data){ // static version uECC_make_key(ec_q, ec_d); #endif +#endif /* USE_MICROECC_FOR_ECDH */ #ifndef WICED_VERSION // disable rng generator as we don't have any random bits left