Page 1 of 1

OpenOCD ChibiOS support issues

Posted: Thu Apr 20, 2017 2:54 pm
by mobyfab
Hey,

I'm trying to use OpenOCD's RTOS support for debugging, here's what I am getting:

0.9.0

Code: Select all

Info : Successfully loaded memory map of ChibiOS/RT target running version 3.1.5
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
.....
.....
Error: Error: null stack pointer in thread


0.10.0

Code: Select all

Info : Successfully loaded memory map of ChibiOS/RT target running version 3.1.5
Error: ChibiOS registry integrity check failed, NULL pointer
Info : Only showing current execution because of a broken ChibiOS thread registry.


Then GDB exits.

Also, it does not detect it all when using LTO:

Code: Select all

Warn : RTOS ChibiOS not detected. (GDB could not find symbol 'chSysInit')


I am using the latest GCC from arm. (6.2.1-2017q1)

Any ideas?

Re: OpenOCD ChibiOS support issues

Posted: Thu Apr 20, 2017 3:10 pm
by mobyfab
Update:

It works after restarting GDB but keeping OpenOCD running, after successful detection.
LTO works as well.

So basically you need 0.10.0 in order for it to work, and you need to run GDB twice because it crashes once.
Maybe you want to try and update the wiki.

Image

Re: OpenOCD ChibiOS support issues

Posted: Thu Apr 20, 2017 4:15 pm
by RoccoMarco
Hey these are my working arguments to launch openocd using ST-Link V2-1 with rtos awareness

Code: Select all

-s "C:\ChibiStudio\tools\openocd\scripts" -f "interface/stlink-v2-1.cfg" -f "${file_prompt}" -c "$_TARGETNAME configure -rtos ChibiOS"


You can also replace ChibiOS with Auto