Debug Openthread example

uart:~$ *** Booting Zephyr OS build v3.1.99-ncs1 ***

Just build standard example for openthread , like coap_sever.

Application rebooted after openthread are fully started 


[00:00:34.609,619] <err> mpsl_init: MPSL ASSERT: 112, 2728
[00:00:34.609,619] <err> os: ***** HARD FAULT *****
[00:00:34.609,649] <err> os: Fault escalation (see below)
[00:00:34.609,649] <err> os: ARCH_EXCEPT with reason 3

[00:00:34.609,680] <err> os: r0/a1: 0x00000003 r1/a2: 0x000c4069 r2/a3: 0x000e8739
[00:00:34.609,710] <err> os: r3/a4: 0x00000001 r12/ip: 0xffffffff r14/lr: 0x00021d13
[00:00:34.609,710] <err> os: xpsr: 0x6100001b
[00:00:34.609,741] <err> os: s[ 0]: 0x00000000 s[ 1]: 0x00000000 s[ 2]: 0x00000000 s[ 3]: 0x00000000
[00:00:34.609,741] <err> os: s[ 4]: 0x00000000 s[ 5]: 0x00000000 s[ 6]: 0x00000000 s[ 7]: 0x00000000
[00:00:34.609,771] <err> os: s[ 8]: 0x00000000 s[ 9]: 0x00000000 s[10]: 0x00000000 s[11]: 0x00000002
[00:00:34.609,771] <err> os: s[12]: 0x00000000 s[13]: 0x00000000 s[14]: 0x00000000 s[15]: 0x00000000
[00:00:34.609,802] <err> os: fpscr: 0x00000000
[00:00:34.609,802] <err> os: Faulting instruction address (r15/pc): 0x00015e7e
[00:00:34.609,832] <err> os: >>> ZEPHYR FATAL ERROR 3: Kernel oops on CPU 0
[00:00:34.609,863] <err> os: Fault during interrupt handling

[00:00:34.609,893] <err> os: Current thread: 0x200038c0 (main)
[00:00:35.503,173] <err> fatal_error: Resetting system

  • Hi Volodymyr, 

    I built the sample C:\NCS\v2.1.1\nrf\samples\openthread\coap_server under NCS v2.1.1 with default settings and everything looks fine. The firmware is attached.

    *** Booting Zephyr OS build v3.1.99-ncs1  ***
    
    
    [00:00:00.527,435] <inf> [N] Mle-----------: Attach attempt 1, AnyPartition 
    [00:00:07.034,057] <inf> [N] RouterTable---: Allocate router id 36
    [00:00:07.034,423] <inf> [N] Mle-----------: RLOC16 fffe -> 9000
    [00:00:07.034,545] <inf> [N] Mle-----------: Role detached -> leader
    [00:00:07.082,946] <inf> [N] Mle-----------: Leader partition id 0x7c70ac99
    uart:~$ 

    ncs211_coap_server.hex

    Best regards,

    Charlie

  • Hi Charlie,

    Thank you for the update. It works fine when you just run an example without debugging, but when you start j-tag debugger it crashes.

    Step to reproduce:

     1. Start the debugger with j-tag link

     2. Set breakpoint on light_request_handler

     3 Debug step-by-step

     4. Crash happens

    Thanks,

    Volodymyr.

  • Hi Volodymyr,

    I am not sure which kind of issue you want to debug with. Different from bare metal, when you develop an application with Zephyr RTOS, there might be several threads on the backend. It will cause unpredictable issues when you set a stop point on the current thread, especially for wireless communication protocol stacks like OpenThread which has time-sensitive interruption handlers.

    It is common to enable the debug configuration and read the log file when you encounter one issue to understand what happens with the communication flow or application behaviour.

    Best regards,

    Charlie 

Related