Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs

Secure bootloader example doesn't build

nRF SDK 17.1.0
I've never touched this example before today, and yet it complains about a bunch of stuff not being found in the file nrf_dfu_validation.c. I am trying to use the micro-ecc backend version. 

C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:90:8: error: unknown type name 'nrf_crypto_ecc_public_key_t'
4> 90 | static nrf_crypto_ecc_public_key_t m_public_key;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:94:8: error: unknown type name 'nrf_crypto_ecdsa_secp256r1_signature_t'
4> 94 | static nrf_crypto_ecdsa_secp256r1_signature_t m_signature;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:98:8: error: unknown type name 'nrf_crypto_hash_sha256_digest_t'
4> 98 | static nrf_crypto_hash_sha256_digest_t m_sig_hash;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:102:8: error: unknown type name 'nrf_crypto_hash_sha256_digest_t'
4> 102 | static nrf_crypto_hash_sha256_digest_t m_fw_hash;
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:225:16: warning: implicit declaration of function 'nrf_crypto_ecc_public_key_from_raw' [-Wimplicit-function-declaration]
4> 225 | err_code = nrf_crypto_ecc_public_key_from_raw(&g_nrf_crypto_ecc_secp256r1_curve_info,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6> Compiling ‘oberon_backend_eddsa.c’
3> Compiling ‘oberon_backend_hash.c’
5> Compiling ‘oberon_backend_hmac.c’
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:225:52: error: 'g_nrf_crypto_ecc_secp256r1_curve_info' undeclared (first use in this function)
4> 225 | err_code = nrf_crypto_ecc_public_key_from_raw(&g_nrf_crypto_ecc_secp256r1_curve_info,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:225:52: note: each undeclared identifier is reported only once for each function it appears in
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:343:5: error: unknown type name 'nrf_crypto_hash_context_t'; did you mean 'nrf_crypto_aes_context_t'?
4> 343 | nrf_crypto_hash_context_t hash_context = {0};
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~
4> | nrf_crypto_aes_context_t
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:344:5: error: unknown type name 'nrf_crypto_ecdsa_verify_context_t'; did you mean 'nrf_crypto_aes_context_t'?
4> 344 | nrf_crypto_ecdsa_verify_context_t verify_context = {0};
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> | nrf_crypto_aes_context_t
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:362:16: warning: implicit declaration of function 'nrf_crypto_hash_calculate'; did you mean 'nrf_crypto_aes_update'? [-Wimplicit-function-declaration]
4> 362 | err_code = nrf_crypto_hash_calculate(&hash_context,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~
4> | nrf_crypto_aes_update
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:363:43: error: 'g_nrf_crypto_hash_sha256_info' undeclared (first use in this function); did you mean 'g_nrf_crypto_aes_cmac_256_info'?
4> 363 | &g_nrf_crypto_hash_sha256_info,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> | g_nrf_crypto_aes_cmac_256_info
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:379:12: warning: passing argument 1 of 'memcpy' makes pointer from integer without a cast [-Wint-conversion]
4> 379 | memcpy(m_signature, p_signature, signature_len);
4> | ^~~~~~~~~~~
4> | |
4> | int
4> In file included from C:/Users/jgusler/AppData/Local/SEGGER/SEGGER Embedded Studio/v3/packages/libraries/libcxx/include/string.h:60,
4> from ../../../../../components/libraries/util/sdk_common.h:55,
4> from C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_types.h:53,
4> from C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:41:
4> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/include/string.h:56:31: note: expected 'void *' but argument is of type 'int'
4> 56 | void * (memcpy) (void *__s1, const void *__s2, size_t __n);
4> | ~~~~~~^~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:385:53: warning: passing argument 1 of 'nrf_crypto_internal_double_swap_endian_in_place' makes pointer from integer without a cast [-Wint-conversion]
4> 385 | nrf_crypto_internal_double_swap_endian_in_place(m_signature, sizeof(m_signature) / 2);
4> | ^~~~~~~~~~~
4> | |
4> | int
4> In file included from C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:52:
4> ../../../../../components/libraries/crypto/nrf_crypto_shared.h:169:64: note: expected 'uint8_t *' {aka 'unsigned char *'} but argument is of type 'int'
4> 169 | void nrf_crypto_internal_double_swap_endian_in_place(uint8_t * p_buffer, size_t part_size);
4> | ~~~~~~~~~~^~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:387:16: warning: implicit declaration of function 'nrf_crypto_ecdsa_verify' [-Wimplicit-function-declaration]
4> 387 | err_code = nrf_crypto_ecdsa_verify(&verify_context,
4> | ^~~~~~~~~~~~~~~~~~~~~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:640:5: error: unknown type name 'nrf_crypto_hash_context_t'; did you mean 'nrf_crypto_aes_context_t'?
4> 640 | nrf_crypto_hash_context_t hash_context = {0};
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~
4> | nrf_crypto_aes_context_t
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:658:43: error: 'g_nrf_crypto_hash_sha256_info' undeclared (first use in this function); did you mean 'g_nrf_crypto_aes_cmac_256_info'?
4> 658 | &g_nrf_crypto_hash_sha256_info,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> | g_nrf_crypto_aes_cmac_256_info
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:669:21: warning: passing argument 1 of 'memcmp' makes pointer from integer without a cast [-Wint-conversion]
4> 669 | else if (memcmp(m_fw_hash, p_hash, NRF_CRYPTO_HASH_SIZE_SHA256) != 0)
4> | ^~~~~~~~~
4> | |
4> | int
4> In file included from C:/Users/jgusler/AppData/Local/SEGGER/SEGGER Embedded Studio/v3/packages/libraries/libcxx/include/string.h:60,
4> from ../../../../../components/libraries/util/sdk_common.h:55,
4> from C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_types.h:53,
4> from C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:41:
4> C:/Program Files/SEGGER/SEGGER Embedded Studio for ARM 6.34a/include/string.h:60:37: note: expected 'const void *' but argument is of type 'int'
4> 60 | int (memcmp) (const void *__s1, const void *__s2, size_t __n);
4> | ~~~~~~~~~~~~^~~~
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:759:5: error: unknown type name 'nrf_crypto_hash_context_t'; did you mean 'nrf_crypto_aes_context_t'?
4> 759 | nrf_crypto_hash_context_t hash_context = {0};
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~
4> | nrf_crypto_aes_context_t
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:777:51: error: 'g_nrf_crypto_hash_sha256_info' undeclared (first use in this function); did you mean 'g_nrf_crypto_aes_cmac_256_info'?
4> 777 | &g_nrf_crypto_hash_sha256_info,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4> | g_nrf_crypto_aes_cmac_256_info
4> C:\Users\jgusler\Desktop\nRF5_SDK_17.1.0\components\libraries\bootloader\dfu\nrf_dfu_validation.c:978:45: error: 'NRF_CRYPTO_ECDSA_SECP256R1_SIGNATURE_SIZE' undeclared (first use in this function)
4> 978 | NRF_CRYPTO_ECDSA_SECP256R1_SIGNATURE_SIZE,
4> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Build failed

Parents Reply Children
No Data
Related