Hello All,
I hope everyone is doing great.
I am an embedded enthusiast and i recently started working on nRF boards.
I am currently facing error while setting up my custom nRF52832 board for DFU update. I am following one tutorial. As per that i am using already existing example in nRF SDK.
(C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\examples\dfu\secure_bootloader\pca10040_s132_ble\ses\)
I have successfully generated public and private keys. But when i build the project i get following error. What could be the reason??
3> Assembling 'thumb_crt0.s'
4> Compiling 'nrf_log_frontend.c'
1> Compiling 'nrf_log_str_formatter.c'
2> Compiling 'app_error_weak.c'
3> Compiling 'app_scheduler.c'
1> Compiling 'app_util_platform.c'
4> Compiling 'crc32.c'
2> Compiling 'mem_manager.c'
4> Compiling 'nrf_assert.c'
1> Compiling 'nrf_atfifo.c'
3> Compiling 'nrf_atomic.c'
2> Compiling 'nrf_balloc.c'
4> Compiling 'nrf_fprintf.c'
3> Compiling 'nrf_fprintf_format.c'
1> Compiling 'nrf_fstorage.c'
4> Compiling 'nrf_fstorage_nvmc.c'
2> Compiling 'nrf_fstorage_sd.c'
3> Compiling 'nrf_memobj.c'
1> Compiling 'nrf_queue.c'
4> Compiling 'nrf_ringbuf.c'
2> Compiling 'nrf_section_iter.c'
1> Compiling 'nrf_strerror.c'
3> Compiling 'sha256.c'
1> Compiling 'micro_ecc_backend_ecc.c'
2> Compiling 'micro_ecc_backend_ecdh.c'
4> Compiling 'micro_ecc_backend_ecdsa.c'
2> In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecdh.h:73,
2> from C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecdh.c:50:
2> ../../../../../components/libraries/crypto/nrf_crypto_ecdh_backend.h:99:9: warning: "nrf_crypto_backend_secp256r1_ecdh_compute" redefined
2> 99 | #define nrf_crypto_backend_secp256r1_ecdh_compute NULL
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecdh_backend.h:58:
2> ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecdh.h:85:9: note: this is the location of the previous definition
2> 85 | #define nrf_crypto_backend_secp256r1_ecdh_compute nrf_crypto_backend_micro_ecc_ecdh_compute
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecdsa.h:73,
4> from C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecdsa.c:51:
4> ../../../../../components/libraries/crypto/nrf_crypto_ecdsa_backend.h:118:17: error: conflicting types for 'nrf_crypto_backend_secp256r1_sign_context_t'; have 'uint8_t' {aka 'unsigned char'}
4> 118 | typedef uint8_t nrf_crypto_backend_secp256r1_sign_context_t;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecdsa_backend.h:56:
4> ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecdsa.h:101:18: note: previous declaration of 'nrf_crypto_backend_secp256r1_sign_context_t' with type 'nrf_crypto_backend_secp256r1_sign_context_t' {aka 'long unsigned int'}
4> 101 | typedef uint32_t nrf_crypto_backend_secp256r1_sign_context_t;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/nrf_crypto_ecdsa_backend.h:119:17: error: conflicting types for 'nrf_crypto_backend_secp256r1_verify_context_t'; have 'uint8_t' {aka 'unsigned char'}
4> 119 | typedef uint8_t nrf_crypto_backend_secp256r1_verify_context_t;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecdsa.h:102:18: note: previous declaration of 'nrf_crypto_backend_secp256r1_verify_context_t' with type 'nrf_crypto_backend_secp256r1_verify_context_t' {aka 'long unsigned int'}
4> 102 | typedef uint32_t nrf_crypto_backend_secp256r1_verify_context_t;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/nrf_crypto_ecdsa_backend.h:121:9: warning: "nrf_crypto_backend_secp256r1_sign" redefined
4> 121 | #define nrf_crypto_backend_secp256r1_sign NULL
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecdsa.h:103:9: note: this is the location of the previous definition
4> 103 | #define nrf_crypto_backend_secp256r1_sign nrf_crypto_backend_micro_ecc_sign
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/nrf_crypto_ecdsa_backend.h:122:9: warning: "nrf_crypto_backend_secp256r1_verify" redefined
4> 122 | #define nrf_crypto_backend_secp256r1_verify NULL
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> ../../../../../components/libraries/crypto/backend/micro_ecc/micro_ecc_backend_ecdsa.h:104:9: note: this is the location of the previous definition
4> 104 | #define nrf_crypto_backend_secp256r1_verify nrf_crypto_backend_micro_ecc_verify
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> In file included from C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecdh.c:52:
2> C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecc.h:218:9: warning: "NRF_CRYPTO_ECC_SECP256R1_ENABLED" redefined
2> 218 | #define NRF_CRYPTO_ECC_SECP256R1_ENABLED 1
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> In file included from ../../../../../components/libraries/crypto/nrf_crypto_ecc.h:73,
2> from ../../../../../components/libraries/crypto/nrf_crypto_ecdh.h:71:
2> ../../../../../components/libraries/crypto/nrf_crypto_ecc_backend.h:81:9: note: this is the location of the previous definition
2> 81 | #define NRF_CRYPTO_ECC_SECP256R1_ENABLED 0
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecc.h:226:3: error: conflicting types for 'nrf_crypto_backend_secp256r1_private_key_t'; have 'struct <anonymous>'
2> 226 | } nrf_crypto_backend_secp256r1_private_key_t;
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> ../../../../../components/libraries/crypto/nrf_crypto_ecc_backend.h:203:46: note: previous declaration of 'nrf_crypto_backend_secp256r1_private_key_t' with type 'nrf_crypto_backend_secp256r1_private_key_t' {aka 'nrf_crypto_internal_ecc_key_header_t'}
2> 203 | typedef nrf_crypto_internal_ecc_key_header_t nrf_crypto_backend_secp256r1_private_key_t;
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> C:\nRF SDK\nRF5_SDK_17.1.0_ddde560\nRF5_SDK_17.1.0_ddde560\components\libraries\crypto\backend\micro_ecc\micro_ecc_backend_ecc.h:234:3: error: conflicting types for 'nrf_crypto_backend_secp256r1_public_key_t'; have 'struct <anonymous>'
2> 234 | } nrf_crypto_backend_secp256r1_public_key_t;
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> ../../../../../components/libraries/crypto/nrf_crypto_ecc_backend.h:204:46: note: previous declaration of 'nrf_crypto_backend_secp256r1_public_key_t' with type 'nrf_crypto_backend_secp256r1_public_key_t' {aka 'nrf_crypto_internal_ecc_key_header_t'}
2> 204 | typedef nrf_crypto_internal_ecc_key_header_t nrf_crypto_backend_secp256r1_public_key_t;
2> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2> Build failed, exit status 0x1
Build failed
ANY HELP or GUIDANCE will be really helpful
Thanks and Regards,
RnD