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

conflicting CPU architectures when integrate cc310 library in samples/hello_world board nrf9160dk_nrf9160

Hi,

I am a new comer so perhaps I made a mistake during project configuration.

I am using nrf Connect v3.4.2 on Windows. 

I trie to add CC310 libray in sample hello_world to use AES and SHA256 hadware implementation

Here an abstract of .config generated thanks to "configure nRF Connect SDK project"

#
# Crypto libraries for nRF5x SOCs.
#
CONFIG_NRFXLIB_CRYPTO=y
CONFIG_NRF_OBERON=y
CONFIG_HW_CC310_INTERRUPT=y
CONFIG_NRF_CC310_PLATFORM=y
# end of Crypto libraries for nRF5x SOCs.

#
# Nordic Security
#
CONFIG_NORDIC_SECURITY_BACKEND=y

#
# mbed TLS Configuration File
#
CONFIG_MBEDTLS_CFG_FILE="nrf-config.h"
CONFIG_GENERATE_MBEDTLS_CFG_FILE=y
# CONFIG_MBEDTLS_X509_LIBRARY is not set
# CONFIG_MBEDTLS_TLS_LIBRARY is not set

#
# mbed TLS memory configuration
#
# CONFIG_MBEDTLS_ENABLE_HEAP is not set
# end of mbed TLS memory configuration

#
# Backend Selection
#
CONFIG_CC310_BACKEND=y
CONFIG_OBERON_BACKEND=y
# CONFIG_MBEDTLS_VANILLA_BACKEND is not set
CONFIG_NRF_CRYPTO_BACKEND_COMBINATION_0=y

...

When I build:

I have some issues related to hw_cc310.c file

First, DT_ARM_CRYPTOCELL_310_ARM_CRYPTOCELL_310_IRQ_0 and DT_ARM_CRYPTOCELL_310_ARM_CRYPTOCELL_310_IRQ_0_PRIORITY are not defined

If I add following lines

#define DT_ARM_CRYPTOCELL_310_ARM_CRYPTOCELL_310_IRQ_0 64
#define DT_ARM_CRYPTOCELL_310_ARM_CRYPTOCELL_310_IRQ_0_PRIORITY 1

then I obtain following errors:

1> c:/users/rouault/ncs/v1.3.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: error: modules/nrfxlib/nrf_security/src/mbedcrypto_glue/libmbedcrypto_cc310_renamed.a(empty_file.c.obj): conflicting CPU architectures 17/2
1> c:/users/rouault/ncs/v1.3.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: failed to merge target specific data of file modules/nrfxlib/nrf_security/src/mbedcrypto_glue/libmbedcrypto_cc310_renamed.a(empty_file.c.obj)
1> c:/users/rouault/ncs/v1.3.0/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a(hw_cc310.c.obj):(.intList+0x8): undefined reference to `CRYPTOCELL_IRQHandler'
1> collect2.exe: error: ld returned 1 exit status

Can you help me?

According to https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/crypto/doc/nrf_cc310_mbedcrypto.html#nrf-cc310-mbedcrypto-readme  CC310 library is compliant with board nrf9160

Thanks in advance

JeanFi

Parents
  • Hi,

    I have some questions in order to better understand the issue.

    • What toolchain are you using? I ask because I see ld.exe, and while the path seems sensible, I would have expected arm-none-eabi-ld.exe.
    • Are you using secure/non-secure?
    • Also, we have an issue with combining libraries in our build systems, which also could cause problems here (this). You would not have any problems if you used a single backend though, so I wonder why you need the Oberon backend? Is it because you need AES 256 (CC310 only support AES 128), something else, or is it just by "accident" that you enabled both?
  • Hi,

    • I guess I use default toolchain. I only open hello_world project and try to activate crypto libraries. So I made some update throuh "Configure nrf  SDK project" to activate securiity backend  and CC310 and oberon librairies but that's all. From now I don't know how to update toolchain.
    •   I am using secure board. I had other issues with non-secure board. I will retry with non-secure board and will give you a feedback.
    • Yes I would like to use both AES 128 and AES 256. So I made assumption I have to activate CC310 and oberon back ends. But perhaps it is a wrong assumption. What is your advice? Either only embed CC310 backend and so deal with a limited subset of cryptographic service or only embed oberon if I need full subset of cryptogrpahic serivices?
    • One of my goal is to understand "NVM  used size" impact. when I embed CC310 library and/or oberon library and/or vanilla library. Do you have some metrics related to this NVM usage?      
  • When I try to use non secure board I have following issue:

    ccache: FATAL: Could not find compiler "C:\Users\rouault\ncs\v1.3.0\toolchain\opt\bin\arm-none-eabi-gcc.exe" in PATH. This is strange because this absolute  path is correct. 

    I just open the hello world project with default configuration and try to build solution.

Reply Children
No Data
Related