You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find an issue in our zephyr application and I would need to check where the threads currently are during debugging.
I have the DEBUG_THREAD_INFO and using openocd I can display them
(gdb) i threa
Id Target Id Frame
5 Thread 604003216 "SensorTask_tid" (Name: SensorTask_tid, prio:1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
6 Thread 604008792 "rx_q[0]" (Name: rx_q[0], prio:-1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
7 Thread 603983776 "stm_eth" (Name: stm_eth, prio:-14,useropts:2) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
8 Thread 604008488 "net_mgmt" (Name: net_mgmt, prio:-1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
9 Thread 604009264 "tcp_work" (Name: tcp_work, prio:-14,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
10 Thread 604010368 "sysworkq" (Name: sysworkq, prio:-1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
11 Thread 604003768 "logging" (Name: logging, prio:14,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
* 12 Thread 604009792 "idle" (Name: idle, prio:15,useropts:1) z_spin_lock_valid (l=l@entry=0x24005128 <log_buffer+20>) at /zephyrproject/zephyr/kernel/thread.c:912
13 Thread 604010064 "main" (Name: main, prio:0,useropts:3) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
16 Thread 604002264 "LongPolling" (Name: LongPolling, prio:1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
17 Thread 604001704 "scom_service" (Name: scom_service, prio:1,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
19 Thread 604002944 "mqtt" (Name: mqtt, prio:0,useropts:0) 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
Unfortunately it seems that backtrace of inactive thread is not reconstructed correctly
(gdb) thre 17
[Switching to thread 17 (Thread 604001704)]
#0 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
107 __asm__ volatile(
(gdb) bt
#0 0x90019ce0 in arch_irq_unlock (key=0) at /zephyrproject/zephyr/include/zephyr/arch/arm/asm_inline_gcc.h:107
#1 arch_swap (key=key@entry=0) at /zephyrproject/zephyr/arch/arm/core/cortex_m/swap.c:43
#2 0x900427a6 in z_swap_irqlock (key=0) at /zephyrproject/zephyr/kernel/include/kswap.h:209
#3 z_swap (key=..., lock=0x24019de4 <sched_spinlock>) at /zephyrproject/zephyr/kernel/include/kswap.h:220
#4 z_tick_sleep (warning: Invalid state, unable to determine sp alias, assuming msp.
ticks=<optimized out>) at /zephyrproject/zephyr/kernel/sched.c:1465
#5 0x00000000 in ?? ()
Is there a possibility how to check where the scheduler switched my thread 17?
I'm testing this with Zephyr 3.5.0 on stm32h750, the code is running from external quadspi flash memory mapped from 0x90000000.
This discussion was converted from issue #71318 on May 16, 2024 22:08.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to find an issue in our zephyr application and I would need to check where the threads currently are during debugging.
I have the
DEBUG_THREAD_INFO
and using openocd I can display themUnfortunately it seems that backtrace of inactive thread is not reconstructed correctly
Is there a possibility how to check where the scheduler switched my thread 17?
I'm testing this with Zephyr 3.5.0 on stm32h750, the code is running from external quadspi flash memory mapped from 0x90000000.
Beta Was this translation helpful? Give feedback.
All reactions