Hello,
I’m trying to get bluetooth development going on my SparkFun Pro nRF52840 Mini.
Environment:
-
Mac Book Pro 13" - Mac OS X 10.14.6
-
Arduino 1.8.13
I followed the Arduino BSP installation instructions at https://github.com/adafruit/Adafruit_nRF52_Arduino. Because I hit the problem described in the last FAQ of https://learn.adafruit.com/bluefruit-nr … guide/faqs (i.e., “Unable to upload sketch/update bootloader with macOS”), I followed the instructions and built and copied over the self-contained adafruit-nrfutil as described in https://github.com/adafruit/Adafruit_nRF52_nrfutil
At this point, I can make simple sketches (like blinking LED) to work on the board.
However, when I try to build a simple bluetooth example sketch (like blinky_ota), the Arduino IDE gives the following error:
Arduino: 1.8.13 Hourly Build 2020/04/21 12:12 (Mac OS X), Board: "SparkFun Pro nRF52840 Mini, s140 6.1.1 r0, Level 0 (Release)"
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/Bluefruit52Lib/BLESecurity.cpp.o: in function `BLESecurity::BLESecurity()':
/Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:79: undefined reference to `nRFCrypto_ECC_PrivateKey::nRFCrypto_ECC_PrivateKey()'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/Bluefruit52Lib/BLESecurity.cpp.o: in function `BLESecurity::begin()':
/Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:91: undefined reference to `Adafruit_nRFCrypto::begin()'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:94: undefined reference to `nRFCrypto_ECC_PrivateKey::begin(CRYS_ECPKI_DomainID_t)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:97: undefined reference to `nRFCrypto_ECC_PublicKey::nRFCrypto_ECC_PublicKey()'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:98: undefined reference to `nRFCrypto_ECC_PublicKey::begin(CRYS_ECPKI_DomainID_t)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:101: undefined reference to `nRFCrypto_ECC::genKeyPair(nRFCrypto_ECC_PrivateKey&, nRFCrypto_ECC_PublicKey&)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:104: undefined reference to `nRFCrypto_ECC_PublicKey::toRaw(unsigned char*, unsigned long)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:105: undefined reference to `nRFCrypto_ECC_PublicKey::end()'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:114: undefined reference to `nRFCrypto'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: libraries/Bluefruit52Lib/BLESecurity.cpp.o: in function `BLESecurity::_eventHandler(ble_evt_t*)':
/Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:330: undefined reference to `nRFCrypto_ECC_PublicKey::nRFCrypto_ECC_PublicKey()'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:331: undefined reference to `nRFCrypto_ECC_PublicKey::begin(CRYS_ECPKI_DomainID_t)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:332: undefined reference to `nRFCrypto_ECC_PublicKey::fromRaw(unsigned char*, unsigned long)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:336: undefined reference to `nRFCrypto_ECC::SVDP_DH(nRFCrypto_ECC_PrivateKey&, nRFCrypto_ECC_PublicKey&, unsigned char*, unsigned long)'
/Users/ankitharaman/Library/Arduino15/packages/adafruit/tools/arm-none-eabi-gcc/9-2019q4/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld: /Users/ankitharaman/Library/Arduino15/packages/adafruit/hardware/nrf52/0.22.1/libraries/Bluefruit52Lib/src/BLESecurity.cpp:338: undefined reference to `nRFCrypto_ECC_PublicKey::end()'
collect2: error: ld returned 1 exit status
exit status 1
Error compiling for board SparkFun Pro nRF52840 Mini.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
I have confirmed that the Adafruit_nRFCrypto library is indeed installed in a sibling directory to Bluefruit52Lib, and I can include the header file. However, it doesn’t seem to be getting linked in. I have even tried explicitly installing Adafruit_nRFCrypto and Arduino notices the duplicate installation but the same error exists.
I’d appreciate any help to fix this problem.