openocd -rtos "chibios"

Discussions and support about ChibiStudio, the free development environment for ARM.
Post Reply
Tuxford
Posts: 26
Joined: Fri Nov 06, 2020 3:28 pm
Has thanked: 4 times
Been thanked: 4 times

openocd -rtos "chibios"

Post by Tuxford »

I downloaded latest ChibiStudio for Linux. My local openocd version 0.12.0.
Config options are next:

Code: Select all

-f interface/stlink.cfg -f target/stm32f1x.cfg -c "$_TARGETNAME configure -rtos chibios"

But there is no success.

Code: Select all

Warn : ChibiOS/RT memory signature claims to be bigger than expected. Assuming compatibility...
Info : Successfully loaded memory map of ChibiOS/RT target running version 7.0.4
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
Error: ChibiOS registry integrity check failed, double linked list violation


What I missed?
User avatar
Giovanni
Site Admin
Posts: 14890
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: openocd -rtos "chibios"

Post by Giovanni »

Hi,

OpenOCD support is not yet updated to the latest ChibiOS versions.

You may try the ChibiOS Debugger View in ChibiStudio, it provides even better functionality.

Giovanni
szekelyisz
Posts: 11
Joined: Wed Jan 03, 2018 8:15 pm
Has thanked: 1 time

Re: openocd -rtos "chibios"

Post by szekelyisz »

Giovanni wrote: Sun Feb 23, 2025 4:22 pm OpenOCD support is not yet updated to the latest ChibiOS versions.
Is there any chance this happening? I tried changing `ch` to `ch_system` in `src/rtos/chibios.c` but didn't do the trick alone. Here's what I get now:

Code: Select all

[stm32f1x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000248 msp: 0x20000400
Warn : ChibiOS/RT memory signature claims to be bigger than expected. Assuming compatibility...
Info : Successfully loaded memory map of ChibiOS/RT target running version 7.0.4
Error: Failed to read memory at 0x5555556d
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
Error: Failed to read memory at 0x5555556d
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
[stm32f1x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000248 msp: 0x20000400
Info : Padding image section 0 at 0x08000164 with 12 bytes
[stm32f1x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000248 msp: 0x20000400
[stm32f1x.cpu] halted due to debug-request, current mode: Thread 
xPSR: 0x01000000 pc: 0x08000248 msp: 0x20000400
Error: ChibiOS registry integrity check failed, NULL pointer
Info : Only showing current execution because of a broken ChibiOS thread registry.
Error: Failed to read memory at 0x20005018
Error: ChibiOS registry integrity check failed, double linked list violation
Info : Only showing current execution because of a broken ChibiOS thread registry.
It looks like `rlist` has moved quite a bit in ChibiOS 7.x due to the introduction of instances, so this might be a bigger change. Looking into it, but not sure I can get to the bottom of this soon.
Giovanni wrote: Sun Feb 23, 2025 4:22 pm You may try the ChibiOS Debugger View in ChibiStudio, it provides even better functionality.
Except that it doesn't provide the stack trace which makes debugging really difficult. Or am I missing something?

Thanks, Szabi
User avatar
Giovanni
Site Admin
Posts: 14890
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: openocd -rtos "chibios"

Post by Giovanni »

Hi,

It is being addressed, starting from RT7 things changed quite a bit because it added multicore support and some data structures changed.

A repository will appear about this on my personal github or the chibios-upstream github organization.

Giovanni
Post Reply