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

Related