So with my NRF52840 board I am trying to use the cc310 backend in zephyr. My project did work until I recently tried to upgrade to ncs v 1.3.0 . The issue was that the build would terminate at the linking stage because it could not find the definition for any of the cc310 backend operations (like mbedtls_sha256_init).
I went through all the cmakelist files and kconfigs and whatnot. Ultimately I changed line 202 in \nrfxlib\nrf_security\src\mbedtls\CMakeLists.txt
from
target_link_libraries(mbedtls_base_vanilla PRIVATE mbedcrypto_cc310)
to
target_link_libraries(mbedtls_base_vanilla PRIVATE mbedcrypto_cc310_imported)
And everything linked fine.
I am not a cmake expert by any means. I really barely understand whats going on sometimes. I see where a few lines up at 175, you add the cc310 sub-directory, and that cmakelist file does this:
set(cc310_libs
mbedcrypto_cc310_imported
mbedcrypto_cc310_noglue
)combine_archives(mbedcrypto_cc310 "${cc310_libs}")
So that would suggest to me that the mbedcrypto_cc310_imported and mbedcrypto_cc310_no glue libraries were combined together into a single mbedcrypto_cc310 library. And That would make you version of line 202 make sense. However nothing from mbedcrypto_cc310_imported was getting linked.
In my build output, I could see modules/nrfxlib/nrf_security/src/mbedtls/cc310/libmbedcrypto_cc310.a being linked against at the end, but that file is almost empty (990 bytes). It certainly did not contain the entirety of
mbedcrypto_cc310_imported
which for me is
nrfxlib/crypto/nrf_cc310_mbedcrypto/lib/cortex-m4/soft-float/no-interrupts/libnrf_cc310_mbedcrypto_0.9.2.a
which is 401KB
Anyway maybe I am configuring something wrong, but my guess is there is an issue in the cmake list files.
I am not sure how the combine archives function works, but my guess is the problem is there. But I don't really know.
And like I said, my work around does the job, but I don't want to have to fork the repo just to make this one fix. So hopefully you can do a new release or tell me what I am doing wrong.
Let me know if you want any more info
Thanks