This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Micro-ecc library won't compile

Hi,

I'm trying to get BLE pairing example to work. I downloaded the missing micro-ecc library and I encountered this problem: github.com/.../70

So I've compiled this library with Bash on Ubuntu on Windows and I got .o and .d files. But what to do now with them?

  • Yes I did. But I don't know what to do next, uVision is still trying to compile the C file itself. How do I tell it to use already compiled .o and .d files?

  • Have you added the .c files to Keil? You should not do that, you should use the .lib file found in external\micro-ecc\nrf5x_keil\armgcc folder. If you have compiled the micro-ecc library, the unmodified example project in the SDK should compile. If you are having trouble, try with a fresh copy of the SDK, to make sure you did not change anything in the project.

  • Can you, please, give me step-by-step instructions? I just can't get it to work. I deleted the .c file I've added, and I removed path to the folder containing the .c file in project options, and then I've added this .lib file by clicking right click on Application -> Add existing file. But it won't recognize it, I'm getting this

    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ecc_init (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ecc_p256_keypair_gen (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol ecc_p256_shared_secret_compute (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_emulation_start (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_emulation_stop (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_payload_set (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_t2t_setup (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_rng_bytes_available (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_rng_init (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_rng_rand (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_lesc_public_key_set (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol pm_sec_params_set (referred from nfc_ble_pair_lib.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ac_rec_payload_constructor (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ac_rec_type_field (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ep_oob_rec_declare (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_hs_rec_local_record_add (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_hs_rec_local_record_clear (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_hs_rec_payload_constructor (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_hs_rec_type_field (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_le_oob_rec_declare (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ndef_msg_clear (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ndef_msg_encode (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_ndef_msg_record_add (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nfc_tk_value_payload_encode (referred from nfc_ble_pair_msg.o).
    .\_build\nrf52832_xxaa.axf: Error: L6218E: Undefined symbol nrf_drv_rng_on_sd_disable (referred from softdevice_handler.o).
    

    Also I've tried to add this .lib file to the original "experimental_ble_app_hrs_nfc_pairing" example but I'm getting this:

    ..\..\..\..\..\..\components\libraries\ecc\ecc.c(55): error:  #5: cannot open source input file "uECC.h": No such file or directory
    
  • Which SDK version are you using, and what example are you testing this on? Are you using Keil or GCC compiler?

Related