OpenOCD ChibiOS support issues

ChibiOS public support forum for all topics not covered by a specific support forum.

Moderators: RoccoMarco, lbednarz, tfAteba

Post Reply
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

OpenOCD ChibiOS support issues

Post 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?
mobyfab
Posts: 484
Joined: Sat Nov 19, 2011 6:47 pm
Has thanked: 21 times
Been thanked: 31 times

Re: OpenOCD ChibiOS support issues

Post 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
User avatar
RoccoMarco
Posts: 655
Joined: Wed Apr 24, 2013 4:11 pm
Has thanked: 83 times
Been thanked: 67 times

Re: OpenOCD ChibiOS support issues

Post 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
Post Reply