This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Hash-sha512 in Mesh app

Hi There,

I try to use the sha512 to checksum. But,  the compiler told me the functions do not be defined. [ocrypto_sha512_init(), ocrypto_sha512_update(), ocrypto_sha512_final].

How can I use it in my application? (Based on Mesh5.0)

Regards,

Gaosheng Liu

  • Hi,

    Which exact error message do you get? Does this fail during compiling or building? If it fails during compilation, it indicates that you have not included the header file that defines these functions (which is ocrypto_sha512.h). If it fails during linking, it indicates that you have not added the library binary to your project (this is provided as binary only).

  • How to add the library binary?

  • You can find the library under <nRF5SDK>\external\nrf_oberon\lib\ and include files as well. I suggest you refer to a nRF5 SDK example project that use crypto to see how to add the library and include path in your specific toolchain (see how it is done there).

  • Yeah. Actually, I download the nRF17.0.2 SDK solely to try the hash example, opening by SES.

    But the example still fails. I don't know why. 

    An error like this

    "

    Building ‘nrf_crypto_hash_pca10056’ from solution ‘nrf_crypto_hash_pca10056’ in configuration ‘Release’
    1> Linking nrf_crypto_hash_pca10056.elf
    1> C:/Users/LT-055650/Downloads/EmbeddedStudio_ARM_Nordic_v550d_win_x64/arm_segger_embedded_studio_v550d_win_x64_nordic/gcc/arm-none-eabi/bin/ld: cannot find ../../../../../../../external/micro-ecc/nrf52hf_armgcc/armgcc/micro_ecc_lib_nrf52.a: No such file or directory
    Build failed

    "

  • I see. This is a different failure. Here it is because you are missing micro-ecc. See details on how to install micro-ecc here.

Related