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

Issues in compiling BLE Secure bootloader by enable macro-ecc

Hello,

Hello,

 

I am using nRF52840, SDK_16.0.0, S140 SoftDevice and Segger 4.16 for flashing the image.

 

I have issues in compiling Secure bootloader with my Public key. This is on top of my previous query

https://devzone.nordicsemi.com/support/240266

 

1) After compiling and generating “micro_ecc_lib_nrf52.a” in “\external\micro-ecc\nrf52hf_armgcc\armgcc” and included library into my Seeger project. But got below error.

                “uECC.h: No such file or directory”.

                To avoid this I added path of uECC.h as shown below.

                ../../../../../external/micro-ecc/micro-ecc

2) After that I got other error saying . To avoid this I commented NRF_CRYPTO_BACKEND_CC310_BL_ECC_SECP256R1_ENABLED.

a) But not sure whether I need to comment NRF_CRYPTO_BACKEND_CC310_BL_ECC_SECP256R1_ENABLED or NRF_CRYPTO_BACKEND_MICRO_ECC_ECC_SECP256R1_ENABLED to 0 ?

https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Flib_crypto_config.html

3) After disabling NRF_CRYPTO_BACKEND_CC310_BL_ECC_SECP256R1_ENABLED (Please correct me if I am wrong), still I am getting below error.

4) To avoid this I added files from “\components\libraries\crypto\backend\micro_ecc” and finally I am able to compile BLE secure bootloader.

5) In below what does it mean. Whether “micro-ecc” is not supported in nRF52840 ?

 https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v16.0.0%2Fnrf_crypto_default_backends.html

Whether all above procedures are correct enough. Even I have gone through below link but not much details on BLE Secure bootloader compilation.

https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/getting-started-with-nordics-secure-dfu-bootloader

 

Please check whether the steps above are correct. If any this missing please let me know.

Edit: For better clarity I am adding modified "pca10056_s140_ble" project and library generated in "\external\micro-ecc\nrf52hf_armgcc\armgcc". Please cross check sdk_config.h and above mentioned settings.

nRF5_SDK_16.0.0_98a08e2.zip

Thanks & Regards

Vishnu Beema

Parents
  • beemavishnu said:
    Even I enabled NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED and NRF_CRYPTO_BACKEND_CC310_BL_ENABLED is enabled already in Secure BLE bootloader.

    It is possible to have both backend enabled, in case you want to use one backend for one cryptographic algorithm and another backend for a second algorithm. Not all backends support all cryptographic operations.

    beemavishnu said:
    But its nRF tools, DFU menu, I am not able to upload. Its getting disconnected.

    At what point is it getting disconnected? Have you debugged the bootloader to see if any errors are reported, causing a reset in the chip?

    beemavishnu said:
    2) Even in ble_app_blinky do I need to enable NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED. Even after enabling and without including micro_ecc_lib_nrf52.a still I am able to compile ble_app_blinky application.

    This is not enabled by default in this example, and it compiles just fine for me. What changes have you made to the example/SDK? If you are not able to compile the ble_app_blinky example, please try with a fresh copy of the SDK.

Reply
  • beemavishnu said:
    Even I enabled NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED and NRF_CRYPTO_BACKEND_CC310_BL_ENABLED is enabled already in Secure BLE bootloader.

    It is possible to have both backend enabled, in case you want to use one backend for one cryptographic algorithm and another backend for a second algorithm. Not all backends support all cryptographic operations.

    beemavishnu said:
    But its nRF tools, DFU menu, I am not able to upload. Its getting disconnected.

    At what point is it getting disconnected? Have you debugged the bootloader to see if any errors are reported, causing a reset in the chip?

    beemavishnu said:
    2) Even in ble_app_blinky do I need to enable NRF_CRYPTO_BACKEND_MICRO_ECC_ENABLED. Even after enabling and without including micro_ecc_lib_nrf52.a still I am able to compile ble_app_blinky application.

    This is not enabled by default in this example, and it compiles just fine for me. What changes have you made to the example/SDK? If you are not able to compile the ble_app_blinky example, please try with a fresh copy of the SDK.

Children
No Data
Related