The first prototype is working and eclipse is showing all threads currently running on the target:
Note, that openocd rtos support does currently not support the hardware FPU. You can disable it in your makefile.
For information on how to install and try this awesome feature yourself, have a look at the (incomplete) guide in the wiki.
Current status:
The patch has been included in upstream openocd master branch.
Original Post
Hello all,
since Giovanni gently pointed me to openocd for true thread support I tried to implement it last night.
What's already working is the detection of all treads. So if I go into gdb and issue a "info threads" I get a list with all threads and their names:
Code: Select all
(gdb) info threads
[New Thread 536890704]
[New Thread 536877264]
[New Thread 536903072]
[New Thread 536925496]
[New Thread 536908016]
[New Thread 536906752]
[New Thread 536905824]
[New Thread 536913056]
[New Thread 536918680]
[New Thread 536917752]
[New Thread 536911808]
[New Thread 536910880]
[New Thread 536919904]
[New Thread 536901832]
[New Remote target]
16 Remote target 0x08011094 in _idle_thread (p=<value optimized out>)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/external/chibios_git/os/kernel/src/chsys.c:55
15 Thread 536901832 (blinker) 0x200078c8 in ?? ()
14 Thread 536919904 (adcWorker) broadcast (arg=<value optimized out>)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/modules/com_ethernet/comEtherInterface_imp.hpp:29
13 Thread 536910880 (ComEtherInterface) 0x08003ca6 in sys_arch_sem_wait (sem=0x20009c20,
timeout=<value optimized out>)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/modules/ethernet_lwip_adapter/sys_arch.c:107
12 Thread 536911808 (ChannelWalker) 0x20009fc0 in ?? ()
11 Thread 536917752 (ComEtherInterface) 0x08003ca6 in sys_arch_sem_wait (sem=0x2000b6f8,
timeout=<value optimized out>)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/modules/ethernet_lwip_adapter/sys_arch.c:107
10 Thread 536918680 (ChannelWalker) 0x2000ba98 in ?? ()
9 Thread 536913056 (axleBroadcastThread) 0x2000a4a0 in ?? ()
8 Thread 536905824 (ComEtherInterface) 0x08003ca6 in sys_arch_sem_wait (sem=0x20008860,
timeout=<value optimized out>)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/modules/ethernet_lwip_adapter/sys_arch.c:107
7 Thread 536906752 (ChannelWalker) 0x20008c00 in ?? ()
6 Thread 536908016 (ConfigWorker) 0x08027490 in ?? ()
5 Thread 536925496 (tcpip_thread) 0x2000d538 in ?? ()
4 Thread 536903072 (lwip_thread_adapter) ethernetif_init (netif=0x8012749)
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/modules/ethernet_lwip_adapter/lwipthread.cpp:211
3 Thread 536877264 (MMCWorker) 0x200018d0 in ?? ()
2 Thread 536890704 (idle) 0x08010fb0 in _port_thread_start ()
at /home/mabl/ASE/Entwicklung/axleSensorSTM32_git/src/external/chibios_git/os/ports/GCC/ARMCMx/chcore_v7m.c:255
* 1 Thread 536890624 (main) 0x20004d00 in ?? ()
But somehow this looks a wrong... I think this is cause by me reading doing some fault reading the stack frame back. But I do not exactly get how the thread frame is saved.... Probably I'm just too stupid for it.
At the moment I'm working with an M3 F107 and use this default configuration. Somehow I cannot map this to the Stack layout in os/ports/GCC/ARMCMx/chcore_v7m.h.
Anything obviously wrong?