PSA crypto example does not compile

Hello,

Using v2.6.0 and v2.6.1 for compiling PSA Crypto example (zephyr/samples/tfm_integration/psa_crypto) fails.

Tried building from VSC, tried building from command line (using the steps for nrf5340 in the README.rst; which contains an error on the board parameter value I think).

The error says: <command-line>: fatal error: user-tls-conf.h: No such file or directory

That might be used due to the prj.conf containing:

CONFIG_MBEDTLS_USER_CONFIG_ENABLE=y
CONFIG_MBEDTLS_USER_CONFIG_FILE="user-tls-conf.h"

It seems that the CMakeLists.txt contains this statement (which does not seem to have effect because there's no corresponding -I <include-path> added).

zephyr_include_directories(${APPLICATION_SOURCE_DIR}/src/tls_config)

If commenting out those lines in prj.conf, there's another error
psa_crypto/src/util_app_log.h:10:10: fatal error: psa/initial_attestation.h: No such file or directory
   10 | #include "psa/initial_attestation.h"

Note that a similar sample, PSA Protected Storage (zephyr/samples/tfm_integration/psa_protected_storage), compiles, flashes and runs correctly on the DK board.

How to fix to compile and run the PSA Crypto sample? (I want this sample working to experiment with its CSR part.)

Thank you!

Parents
  • Hi,

    Which board do you use?

    Can you provide your build command?

    Best regards,
    Dejan

  • Hello Dejan,

    Thank you for looking into this. I'm using the nrf5340dk_nrf5340_cpuapp_ns. I use Ubuntu 22.04 as platform

    ... build command
    I tried following 3 methods. The 3rd is mentioned in the README.rst (notice the readme uses a wrong target format)

    1) I use Nordic's VSC nrf plugin. It has a build button (after create a target)

    2) On the command line:

    a)
    . <(nrfutil toolchain-manager env --as-script --ncs-version v2.6.0)
    . <path-to-v2.6.0>/zephyr/zephyr-env.sh
    rm -rf build/
    west build -b nrf5340dk_nrf5340_cpuapp_ns --pristine=always

    b)
    rm -rf build
    mkdir build && cd build
    cmake -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp_ns ..
    ninja

    Kind regards, francis

Reply
  • Hello Dejan,

    Thank you for looking into this. I'm using the nrf5340dk_nrf5340_cpuapp_ns. I use Ubuntu 22.04 as platform

    ... build command
    I tried following 3 methods. The 3rd is mentioned in the README.rst (notice the readme uses a wrong target format)

    1) I use Nordic's VSC nrf plugin. It has a build button (after create a target)

    2) On the command line:

    a)
    . <(nrfutil toolchain-manager env --as-script --ncs-version v2.6.0)
    . <path-to-v2.6.0>/zephyr/zephyr-env.sh
    rm -rf build/
    west build -b nrf5340dk_nrf5340_cpuapp_ns --pristine=always

    b)
    rm -rf build
    mkdir build && cd build
    cmake -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp_ns ..
    ninja

    Kind regards, francis

Children
Related