No output from example EcDSA

On MacOS with VSC and nRF Connect for VS Code v2022.10.30

Using Connect SDK and toolkit v2.1.2

Using nRF5340 DK board v2.0.0

Creating, building, flashing and running the example template psa_crypto goes well and connecting to VCOM1 shows the logging

But a similar example, ecdsa, only shows one line of output:

*** Booting Zephyr OS build v3.1.99-ncs1-1  ***

How do I enable the output for that application.

Looking into prj.conf or CMakefile.txt, I do not find obvious difference why the one example app shows logging and the other does not.

There's a log_init(); called in psa_crypto's main(). But trying to add this into the main of ecdsa example gives a link error.

Is there a quick examplanation for this?

(I'm new to nRF Connect SDK and the Nordic environment)

Thanks in advance! Kind regards!

Parents Reply Children
  • Hello Mr Kazi Afroza Sultana,

    Thank you for your reply. Sorry for my late reaction.

    Both examples from the Connect SDK were build with the board target nrf5340dk_nrf5340_cpuapp_ns (using the application CPU and including the CMSE).

    In the list of connected devices (for both examples) I see VCOM0 and VCOM1 (I did not use the RTT). I have connected to each after the other and each time resetting the nRF5340 DK. Only the psa_crypto example shows the output on VCOM1 (which I then conclude corresponds to the application processor).

    Further investigation: adding a printf() to the ecdsa example shows on the VCOM1. It means I am connected to the UART that is used by the expected core.

    According to me, it is the LOG_INF() that is not compiled in case of the ecdsa example (e.g. a break point on this is ignored, the statement cannot be stepped into, compared to the psa_crypto example).

    As said before, I dont know the build system well. But according to me the prj.conf and CMakeList.txt, sample.yaml of both examples look very similar. I do not find difference which should cause the LOG_INF() to be ignore or explain the logging issues I encounter in the ecdsa.
    In fact I have copied the CONFIG_LOG_* defines from psa_crypto into these of the ecdsa example. But no progress.

    Your input on where I need to look is appreciated.

    PS On MacOs Monterey, VSC 1.73.1, v2022.9.6, the development environment is incredibly buggy. Between flashing, debugging, switching between the 2 examples, my whole desktop has been restarting numerous times already. An awful experience on MacOS. Do you suggest I should switch to Windows or Linux for a normal experience?

    Kind regards!

  • Hello,

    Both psa_crypto and ECDSA samples work on RF5340's application core only. 

    As you said ''In the list of connected devices (for both examples) I see VCOM0 and VCOM1 (I did not use the RTT). I have connected to each after the other and each time resetting the nRF5340 DK.'' It may not correct for these samples as both (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/tfm_integration/psa_crypto/README.html#on-nrf5340-and-nrf9160) ,(Crypto: ECDSA — nRF Connect SDK 2.1.99 documentation (nordicsemi.com)) need to be built on only app core. So, you should try only the second COM port for this sample. As second port outputs the log from the application core.

    We do not have any problem run these samples either on MacOS or Windows.

    Thanks.

    Best Regards,

    Kazi Afroza Sultana

Related