fih_panic_loop during debugging session from persistent_key_usage

I am able to build the firmware without any errors from persistent_key_usage example as below condition

Board: NORA Evaluation Board
SDK Version: 3.1.0
Toolchain: 3.1.0
Board files: ubx_evknorab2 (path: C:\ncs\v3.1.0\zephyr\boards\u-blox\ubx_evknorab2)

I am able to build the firmware without any errors.

However, after flashing the firmware onto the MCU and starting a debug session, the program immediately jumps into this function fih_panic_loop.
I also confirm that I have not set a single breakpoint during debugging.

Could you please give some idea for solving this debugging issue?

Parents Reply Children
  • when I compiled with OK and it works well on flash side without debugging as expected.

    I am trying to solve it with the below recommendation but it is still issue.

    ① Recommended: Debug without MCUboot (direct app boot)

    This completely avoids secure boot integrity checks → no more FIH_PANIC.

    Add to prj.conf:

    Apache Config

    CONFIG_BOOTLOADER_MCUBOOT=n

    CONFIG_TFM_DISABLED=y

    CONFIG_FIH_PROFILE_LOW=y

     

    ② If MCUboot must remain enabled (secure-boot mode):

    You MUST do two things in your launch.json:

    (A) Disable flash breakpoints

    This prevents GDB/J-Link from altering flash:

    JSON

    "preLaunchCommands": [

    "monitor flash breakpoints = 0"

    ]

    (B) Load MCUboot ELF into the debugger

    Without this, the PC jumps into the wrong region and triggers panic:

    JSON

    "loadFiles": [

    "${workspaceFolder}/build/mcuboot/zephyr/zephyr.elf"

    ]

  • Is your goal to debug MCUboot itself, or the application?

    Are you building with or without TF-M?

Related