OpenOCD ChibiOS support issues

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

Moderators: RoccoMarco, lbednarz, utzig, tfAteba, barthess

mobyfab
Posts: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

OpenOCD ChibiOS support issues

Postby mobyfab » Thu Apr 20, 2017 2:54 pm

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: 483
Joined: Sat Nov 19, 2011 6:47 pm
Location: Le Mans, France
Has thanked: 21 times
Been thanked: 30 times

Re: OpenOCD ChibiOS support issues

Postby mobyfab » Thu Apr 20, 2017 3:10 pm

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
Location: Munich (Germany)
Has thanked: 83 times
Been thanked: 67 times
Contact:

Re: OpenOCD ChibiOS support issues

Postby RoccoMarco » Thu Apr 20, 2017 4:15 pm

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
Ciao,
RM


Return to “General Support”

Who is online

Users browsing this forum: No registered users and 37 guests