Debugging problems with non-secure application

Hi, 

I am working with a u-blox EVK-NORA-B206 development kit. It has an onboard J-Link and it contains a NORA-B206-00B which has a NRF54L15 inside. I use VS Code with the nRF Connect extension.

I am running the peripheral UART sample provided. When building it as non-secure app and start debugging, I can hit the break point once, but after that, any stepping or continuing results in tfm_hal_system_halt via MPC_Handler().

When building it as 'normal' application, I can debug without problems. 

Do I miss some settings which need to be set? 

Thanks in advance for any help,

Bert

Parents Reply
  • Hi Bert,

    I guess what is happening is, usually for a normal build with no TF-M, everything runs in a single secure image, so the stepping will also work properly as expected. But in a non-secure build with TF-M, what happens is that the application runs in the non-secure environment, while the TF-M owns the secure processing environment. This misconfiguration is likely what is causing the issue.

    So by default since you can only debug the non-secure firmware and the TF-M runs separately, in order to debug the TF-M you must build it with separate debug symbols as mentioned here: CONFIG_TFM_CMAKE_BUILD_TYPE_RELWITHDEBINFO 

    Please try this and let me know how it goes.

    -Priyanka

Children
Related