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

Micro-ecc issue?

Hi,

I am currently trying to run the DFU over UART example using my nrf52840 dk. I am using sdk v15.2.0. I followed the following instructions found in the Nordic Infocenter: 

  1. Install version 4.9-2015-q3-update of the GCC compiler toolchain for ARM. You can use ARM's Launchpad to find the toolchain for your operating system.
  2. Make sure that make is installed (see, for example, MinGW, GNU Make, or Xcode).
  3. Clone the micro-ecc GitHub repository into <InstallFolder>\external\micro-ecc\micro-ecc.
  4. Enter the subdirectory for the SoC and the toolchain that you are using to build your application:
    • InstallFolder\external\micro-ecc\nrf52_keil\armgcc
    • InstallFolder\external\micro-ecc\nrf52_iar\armgcc
    • InstallFolder\external\micro-ecc\nrf52_armgcc\armgcc
  5. Run make to compile the micro-ecc library.

I thought I was able to follow all of the instructions, however, as soon as I build the solution the error in the picture shows up:

I think it has to doing something wrong when installing the micro-ecc compiler, but I could be wrong. Please help!

  • Hi, 

    Please select "output" in the output window and provide the log which presents more information.  

    -Amanda H.

  • Here is the output given:

    Building ‘secure_bootloader_uart_mbr_pca10056’ from solution ‘secure_bootloader_uart_mbr_pca10056’ in configuration ‘Release’
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/thumb_crt0.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_log_frontend.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_log_str_formatter.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/boards.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/pb_common.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/pb_decode.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/cc310_bl_backend_ecc.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/cc310_bl_backend_ecdsa.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/cc310_bl_backend_hash.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/cc310_bl_backend_init.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/cc310_bl_backend_shared.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/app_error_weak.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/app_scheduler.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/app_util_platform.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/crc32.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/mem_manager.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_assert.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_atomic.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_balloc.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_fprintf.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_fprintf_format.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_fstorage.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_fstorage_nvmc.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_memobj.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_queue.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_ringbuf.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_strerror.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/slip.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_drv_uart.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_nvic.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_nvmc.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_soc.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrfx_prs.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrfx_uart.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrfx_uarte.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_ecc.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_ecdsa.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_init.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/uECC.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/micro_ecc_backend_ecc.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/micro_ecc_backend_ecdh.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/micro_ecc_backend_ecdsa.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_shared.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/sha256.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/dfu_public_key.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/main.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_app_start.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_app_start_final.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_dfu_timers.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_fw_activation.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_info.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_bootloader_wdt.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/ses_startup_nrf52840.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/ses_startup_nrf_common.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/system_nrf52840.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/dfu-cc.pb.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_flash.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_handling_error.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_mbr.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_req_handler.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_serial_uart.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_settings.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_transport.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_utils.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_validation.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_ver_validation.o' is up to date
    2> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_serial.o' is up to date
    3> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_chacha_poly_aead.o' is up to date
    4> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_ecc.o' is up to date
    5> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_ecdh.o' is up to date
    6> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_ecdsa.o' is up to date
    7> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_eddsa.o' is up to date
    8> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_hash.o' is up to date
    1> 'Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/oberon_backend_hmac.o' is up to date
    1> Output/Release/Exe/secure_bootloader_uart_mbr_pca10056.elf does not exist.
    1> Linking secure_bootloader_uart_mbr_pca10056.elf
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld -X --omagic -eReset_Handler --defsym=__do_debug_operation=__do_debug_operation_mempoll -EL --defsym=__vfprintf=__vfprintf_long --defsym=__vfscanf=__vfscanf_int --gc-sections -TD:/Downloads/Segger/nRF5_SDK_15.2.0_9412b96/examples/dfu/secure_bootloader/pca10056_uart/ses/Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/secure_bootloader_uart_mbr_pca10056.ld -Map Output/Release/Exe/secure_bootloader_uart_mbr_pca10056.map -u_vectors -o Output/Release/Exe/secure_bootloader_uart_mbr_pca10056.elf --emit-relocs --start-group @D:/Downloads/Segger/nRF5_SDK_15.2.0_9412b96/examples/dfu/secure_bootloader/pca10056_uart/ses/Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/secure_bootloader_uart_mbr_pca10056.ind --end-group
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_req_handler.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:78: multiple definition of `g_nrf_crypto_hash_sha512_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:78: first defined here
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_req_handler.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:69: multiple definition of `g_nrf_crypto_hash_sha256_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:69: first defined here
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_validation.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:78: multiple definition of `g_nrf_crypto_hash_sha512_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:78: first defined here
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_validation.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:69: multiple definition of `g_nrf_crypto_hash_sha256_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:69: first defined here
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_ver_validation.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:78: multiple definition of `g_nrf_crypto_hash_sha512_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:78: first defined here
    1> D:/Downloads/Segger/gcc/arm-none-eabi/bin/ld: Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_dfu_ver_validation.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\examples\dfu\secure_bootloader\pca10056_uart\ses/../../../../../components/libraries/crypto/nrf_crypto_hash.h:69: multiple definition of `g_nrf_crypto_hash_sha256_info'; Output/Release/Obj/secure_bootloader_uart_mbr_pca10056/nrf_crypto_hash.o:D:\Downloads\Segger\nRF5_SDK_15.2.0_9412b96\components\libraries\crypto/nrf_crypto_hash.h:69: first defined here
    Build failed
    

  • Hi, 

    As the error message indicates that there are multiple definitions of `g_nrf_crypto_hash_sha512_info' and `g_nrf_crypto_hash_sha256_info' and they are first defined in nrf_crypto_hash.h. You can use Ctrl+shift+F to search the variables that are also showed in which file. 

    If you use the unmofidied secure_bootloader_uart_mbr_pca10056 example, I think you should remove the definition of `g_nrf_crypto_hash_sha512_info' and `g_nrf_crypto_hash_sha256_info' in the nrf_crypto_hash.h. The g_nrf_crypto_hash_sha256_info is supposed to be defined in cc310_bl_backend_hash.c as the NRF_CRYPTO_BACKEND_CC310_BL_ENABLED and NRF_CRYPTO_ENABLED are enabled in the sdk_config.h. Also check the head file (cc310_bl_backend_hash.h) is Included

    -Amanda H.

Related