tfm_ns_fault_handler_callback is called when booting

Hi,

I have a problem where tfm_ns_fault_handler_callback is called when booting the system.

This results in arm_fault and k_sys_fatal_error_handler is called. The reason is 41.

I have upgraded to SDK v2.6.1

Custom board based on nrf9160-SIP

The project is based on a azure iot hub example.

This is the error log:

[00:00:00.422,271] <ESC><err> os: ***** SECURE FAULT *****<ESC><CR><LF>
[00:00:00.422,302] <ESC><err> os:   Address: 0x22<ESC><CR><LF>
[00:00:00.422,302] <ESC><err> os:   Attribution unit violation<ESC><CR><LF>
[00:00:00.422,332] <ESC><err> os: r0/a1:  0x00000000  r1/a2:  0x00000005  r2/a3:  0x0006620c<ESC><CR><LF>
[00:00:00.422,332] <ESC><err> os: r3/a4:  0x2001d599 r12/ip:  0x200103f2 r14/lr:  0x00055723<ESC><CR><LF>
[00:00:00.422,363] <ESC><err> os:  xpsr:  0x61000000<ESC><CR><LF>
[00:00:00.422,363] <ESC><err> os: Faulting instruction address (r15/pc): 0x00056080<ESC><CR><LF>
[00:00:00.422,393] <ESC><err> os: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0<ESC><CR><LF>
[00:00:00.422,424] <ESC><err> os: Current thread: 0x200104a0 (unknown)<ESC><CR><LF>
[00:00:01.177,398] <ESC><err> fatal_error: Resetting system<ESC><CR>


Please feel free to contact me, if more information is needed.

BR Replay

Parents
  • Hi,

    The project is based on a azure iot hub example.

    Did the project ever work before?

    Regards,
    Sigurd Hellesvik

  • Hi,

    Yes without any problem.

    Here is the history:

    Starting the project using 2.0.0, encountered a sdk problem. upgraded to 2.2.0 to resolve the issue.

    Now using 2.2.0 without debugging enabled. A problem need more debugging information enabled.

    When debug was enabled enabled the program would not start. Found a devzone post (cannot find it again) where other did encounter problems with enabling debugging on 2.2.0, when I upgraded to 2.6.1 to solve the debugging issue I meet the issue described above.

    BR Replay

  • Do you get any logs before the crash happens?

    The project is based on a azure iot hub example.

    Can you build the azure IoT hub sample for the DK and run it?

    Can you build the azure IoT hub sample for your custom board and run it?

    These will give us useful information to when the issue happens or not

  • Do you get any logs before the crash happens?

    Yes:

    [00:00:00.422,271] <ESC><err> os: ***** SECURE FAULT *****<ESC><CR><LF>
    [00:00:00.422,302] <ESC><err> os:   Address: 0x22<ESC><CR><LF>
    [00:00:00.422,302] <ESC><err> os:   Attribution unit violation<ESC><CR><LF>
    [00:00:00.422,332] <ESC><err> os: r0/a1:  0x00000000  r1/a2:  0x00000005  r2/a3:  0x0006620c<ESC><CR><LF>
    [00:00:00.422,332] <ESC><err> os: r3/a4:  0x2001d599 r12/ip:  0x200103f2 r14/lr:  0x00055723<ESC><CR><LF>
    [00:00:00.422,363] <ESC><err> os:  xpsr:  0x61000000<ESC><CR><LF>
    [00:00:00.422,363] <ESC><err> os: Faulting instruction address (r15/pc): 0x00056080<ESC><CR><LF>
    [00:00:00.422,393] <ESC><err> os: >>> ZEPHYR FATAL ERROR 41: Unknown error on CPU 0<ESC><CR><LF>
    [00:00:00.422,424] <ESC><err> os: Current thread: 0x200104a0 (unknown)<ESC><CR><LF>
    [00:00:01.177,398] <ESC><err> fatal_error: Resetting system<ESC><CR>


    Can you build the azure IoT hub sample for the DK and run it?

    Yes, I can build and run the sample for DK. With and without debug enabled.

    Can you build the azure IoT hub sample for your custom board and run it?

    Yes, I can build and run the sample for my custom board. With and without debug enabled.

  • Interesting.

    Can you in broad terms list the main feature differences between the Az ure IoT Hub sample and your app?

    Also, try to check TF-M logs and see what they say

  • Okay maybe this not the best way of finding the error.

    But it all started when using 2.2.0 and enabling debug.

    I did go back and tried it again.

    I use mcuboot in the project. This is the differences in .config files when building without vs with debugging enabled.

    Without:

    CONFIG_BOOT_FIH_PROFILE_OFF=y
    # CONFIG_BOOT_FIH_PROFILE_LOW is not set

    *** Booting Zephyr OS build v3.2.99-ncs1 ***<CR><LF>
    I: Starting bootloader<CR><LF>
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Boot source: none<CR><LF>
    I: Swap type: none<CR><LF>
    I: Bootloader chainload address offset: 0x10000<CR><LF>
    I: Jumping to the first image slot<CR><LF>


    With:

    # CONFIG_BOOT_FIH_PROFILE_OFF is not set
    CONFIG_BOOT_FIH_PROFILE_LOW=y

    *** Booting Zephyr OS build v3.2.99-ncs1 ***<CR><LF>
    I: Starting bootloader<CR><LF>
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Boot source: none<CR><LF>
    I: Swap type: none<CR><LF>
    
    Here the bootloader just stops.

    The execution stops in

    context_boot_go

    After this check: - BOOT_SWAP_TYPE(state) is

    BOOT_SWAP_TYPE_NONE
    if (BOOT_SWAP_TYPE(state) != BOOT_SWAP_TYPE_NONE)


    Notable differences:
    - Using mcuboot as bootloader.
    - Added FOTA.
    - Using external SPI-NOR flash for image storage.

    BR Replay

  • Replay said:
    - Using mcuboot as bootloader.

    The Azure IoT Hub sample is also using MCUboot by default for the nRF9160DK.

    Replay said:
    - Added FOTA.

    Same for this.

    So that makes me wonder, what did you do to add those?
    Maybe something happended when you were trying to add something that is already enabled.

    Replay said:
    - Using external SPI-NOR flash for image storage.

    This is often something that can fail.
    Try to disable external flash temporarily, to test if it works without.

Reply
  • Replay said:
    - Using mcuboot as bootloader.

    The Azure IoT Hub sample is also using MCUboot by default for the nRF9160DK.

    Replay said:
    - Added FOTA.

    Same for this.

    So that makes me wonder, what did you do to add those?
    Maybe something happended when you were trying to add something that is already enabled.

    Replay said:
    - Using external SPI-NOR flash for image storage.

    This is often something that can fail.
    Try to disable external flash temporarily, to test if it works without.

Children
  • Also, try to check TF-M logs and see what they say

    I'm having a hard time getting the TF-M to log any information.

    My problem is using UART2 for logging, but none of the configs enables it for UART2.

    I have tried with

    CONFIG_TFM_SECURE_UART0,
    CONFIG_TFM_SECURE_UART1,
    CONFIG_TFM_SECURE_UART22
  • Hi again,

    Okay, I have narrowed it down to, when the config is changed from SIZE_OPTIMIZATION to DEBUG_OPTIMIZATION, the system will never run the main app.

    The TFM PM_PARTITION_SIZE changes as well:

    -CONFIG_PM_PARTITION_SIZE_TFM=0xC000 - With debug disabled.
    +CONFIG_PM_PARTITION_SIZE_TFM=0x10000 - With debug enabled.


    *** Booting Zephyr OS build v3.2.99-ncs1 ***<CR><LF>
    I: Starting bootloader<CR><LF>
    I: Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3<CR><LF>
    I: Boot source: none<CR><LF>
    I: Swap type: none<CR><LF>
    I: Bootloader chainload address offset: 0x10000<CR><LF>
    I: Jumping to the first image slot<CR><LF>

  • Good find.

    In this case, I have a guess:

    TF-M uses UART1 to log. So you need to disable UART1 in DTS for your custom board.
    If you have not disabled this, it may cause the errors you see.

  • Hi Sigurd,

    I'm sorry for jumping around with this post, but I'm desperate to find any solution.

    The main problem I rand into was enabling Seggers SystemView configs.

    I thought I need to enable debugging, due to some warnings and build errors.

    Now I'm convinced, that the warnings when enabling SystemView is due to the use of K_EVENT_DEFINE.

    Some of the building log - Sorry for bad formatting. The code insert would not work..

    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:49:9: warning: implicit declaration of function 'sys_port_trace_k_event_init'; did you mean 'sys_port_trace_k_queue_init'? [-Wimplicit-function-declaration]
       49 |         sys_port_trace_ ## name ## _init
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:254:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      254 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:255:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_INIT'
      255 |                         _SYS_PORT_TRACING_OBJ_INIT(obj_type)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:47:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_INIT'
       47 |         SYS_PORT_TRACING_OBJ_INIT(k_event, event);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:64:9: warning: implicit declaration of function 'sys_port_track_k_event_init'; did you mean 'sys_port_track_k_sem_init'? [-Wimplicit-function-declaration]
       64 |         sys_port_track_ ## name ## _init
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:256:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      256 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:257:25: note: in expansion of macro '_SYS_PORT_TRACKING_OBJ_INIT'
      257 |                         _SYS_PORT_TRACKING_OBJ_INIT(obj_type)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:47:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_INIT'
       47 |         SYS_PORT_TRACING_OBJ_INIT(k_event, event);
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c: In function 'k_event_post_internal':
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:53:9: warning: implicit declaration of function 'sys_port_trace_k_event_post_enter'; did you mean 'sys_port_trace_k_msgq_put_enter'? [-Wimplicit-function-declaration]
       53 |         sys_port_trace_ ## name ## _ ## func ## _enter
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:291:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      291 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:292:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_FUNC_ENTER'
      292 |                         _SYS_PORT_TRACING_OBJ_FUNC_ENTER(obj_type, func)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:97:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_FUNC_ENTER'
       97 |         SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_event, post, event, events,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:57:9: warning: implicit declaration of function 'sys_port_trace_k_event_post_exit'; did you mean 'sys_port_trace_k_msgq_put_exit'? [-Wimplicit-function-declaration]
       57 |         sys_port_trace_ ## name ## _ ## func ## _exit
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:326:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      326 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:327:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_FUNC_EXIT'
      327 |                         _SYS_PORT_TRACING_OBJ_FUNC_EXIT(obj_type, func)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:145:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_FUNC_EXIT'
      145 |         SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_event, post, event, events,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c: In function 'k_event_wait_internal':
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:53:9: warning: implicit declaration of function 'sys_port_trace_k_event_wait_enter'; did you mean 'sys_port_trace_k_condvar_wait_enter'? [-Wimplicit-function-declaration]
       53 |         sys_port_trace_ ## name ## _ ## func ## _enter
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:291:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      291 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:292:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_FUNC_ENTER'
      292 |                         _SYS_PORT_TRACING_OBJ_FUNC_ENTER(obj_type, func)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:203:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_FUNC_ENTER'
      203 |         SYS_PORT_TRACING_OBJ_FUNC_ENTER(k_event, wait, event, events,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:57:9: warning: implicit declaration of function 'sys_port_trace_k_event_wait_exit'; did you mean 'sys_port_trace_k_condvar_wait_exit'? [-Wimplicit-function-declaration]
       57 |         sys_port_trace_ ## name ## _ ## func ## _exit
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:326:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      326 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:327:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_FUNC_EXIT'
      327 |                         _SYS_PORT_TRACING_OBJ_FUNC_EXIT(obj_type, func)(obj, ##__VA_ARGS__)); \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:207:17: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_FUNC_EXIT'
      207 |                 SYS_PORT_TRACING_OBJ_FUNC_EXIT(k_event, wait, event, events, 0);
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:55:9: warning: implicit declaration of function 'sys_port_trace_k_event_wait_blocking'; did you mean 'sys_port_trace_k_sem_take_blocking'? [-Wimplicit-function-declaration]
       55 |         sys_port_trace_ ## name ## _ ## func ## _blocking
          |         ^~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:171:62: note: in definition of macro 'sys_port_trace_type_mask_k_event'
      171 |         #define sys_port_trace_type_mask_k_event(trace_call) trace_call
          |                                                              ^~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:308:17: note: in expansion of macro 'SYS_PORT_TRACING_TYPE_MASK'
      308 |                 SYS_PORT_TRACING_TYPE_MASK(obj_type, \
          |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/include/zephyr/tracing/tracing_macros.h:309:25: note: in expansion of macro '_SYS_PORT_TRACING_OBJ_FUNC_BLOCKING'
      309 |                         _SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(obj_type, func) \
          |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    C:/ncs/v2.2.0/zephyr/kernel/events.c:244:9: note: in expansion of macro 'SYS_PORT_TRACING_OBJ_FUNC_BLOCKING'
      244 |         SYS_PORT_TRACING_OBJ_FUNC_BLOCKING(k_event, wait, event, events,
          |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    [566/586] Linking C static library zephyr\kernel\libkernel.a
    [567/586] Linking C static library modules\lvgl\lib..__modules__lib__gui__lvgl__zephyr.a
    [568/586] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map
    cmd.exe /C "cd . && C:\ncs\toolchains\v2.2.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 @CMakeFiles\zephyr_pre0.rsp -o zephyr\zephyr_pre0.elf  && cmd.exe /C "cd /D C:\Projects\project\build\zephyr && C:\ncs\toolchains\v2.2.0\opt\bin\cmake.exe -E echo ""
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/kernel/libkernel.a(events.c.obj): in function `k_event_post_internal':
    C:/ncs/v2.2.0/zephyr/kernel/events.c:97: undefined reference to `sys_port_trace_k_event_post_enter'
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: C:/ncs/v2.2.0/zephyr/kernel/events.c:145: undefined reference to `sys_port_trace_k_event_post_exit'
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: zephyr/kernel/libkernel.a(events.c.obj): in function `k_event_wait_internal':
    C:/ncs/v2.2.0/zephyr/kernel/events.c:203: undefined reference to `sys_port_trace_k_event_wait_enter'
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: C:/ncs/v2.2.0/zephyr/kernel/events.c:207: undefined reference to `sys_port_trace_k_event_wait_exit'
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: C:/ncs/v2.2.0/zephyr/kernel/events.c:253: undefined reference to `sys_port_trace_k_event_wait_exit'
    c:/ncs/toolchains/v2.2.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/../../../../arm-zephyr-eabi/bin/ld.exe: C:/ncs/v2.2.0/zephyr/kernel/events.c:244: undefined reference to `sys_port_trace_k_event_wait_blocking'
    collect2.exe: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\v2.2.0\opt\bin\cmake.EXE' --build 'c:\Projects\project\build'

     *  The terminal process terminated with exit code: 1.
     *  Terminal will be reused by tasks, press any key to close it.

Related