ChibiOS OpenOCD support

This forum is dedicated to feedback, discussions about ongoing or future developments, ideas and suggestions regarding the ChibiOS projects are welcome. This forum is NOT for support.
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

Thanks, I did notice odd behaviour when stepping and viewing thread info and thought it was my gdb noobness. Is there anything I can do to help?

I also see varied behaviour depending on the -O? optimisation options used for the compile.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Hi gmb42, your crash is now gone with master branch, right?

About the stepping. I *think* I know what is wrong already :mrgreen: OpenOCD just does not care for some gdb packages and simply ignores them. I think about implementing vCont support. But maybe I can also fix the existing implementation.
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

@mabl, yes crash is gone thanks.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

I just fixed a serious (and embarrassing) bug in oocd which made the thread list garbled if the program was stopped by a breakpoint outside of the idle thread... The fix is located here: http://openocd.zylin.com/#/c/959/

Inclusion into master branch is pending.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: ChibiOS OpenOCD support

Post by Tectu »

Thank you sir!
ChibiOS/RT support in OpenOCD really makes my live easier :)


~ Tectu
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Ok, I tried cross-compiling oocd, the result can be found here: http://static.blaicher.com/msc/chibios/ ... iosfix.zip

Code: Select all

./configure --enable-maintainer-mode --build=x86_64-linux-gnu --host=i586-mingw32msvc  --disable-werror   --with-ftd2xx-win32-zipdir=/home/mabl/Downloads/cdm  --enable-ft2232_ftd2xx  --prefix=$PWD/_install


I've not tried it, but maybe it is useful for some Windows user, maybe Giovanni?
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS OpenOCD support

Post by Giovanni »

It will be useful, thanks. I will try it.

Giovanni
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

I've added a patch for automatic FPU detection to openocd. It still won't work with FPU enabled (since the FPU registers in oocd are a mess, and I can't figure out how to do it properly) - but at least you will get a nice error message. :twisted:

Patch: http://openocd.zylin.com/#/c/961/
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Ok, I had a talk to ntfreak from oocd and basically the FPU stuff is not yet finished inside oocd - there is also no timeline on when it will be finished. :twisted: I'll look into it again on a later date.

Current state:
The patch for the ReadyList bug has been merged
The FPU detection patch is still pending
The RTOS code really mixes up endianess, I've fixed it for ChibiOS. The patch is also pending
User avatar
Giovanni
Site Admin
Posts: 14892
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: ChibiOS OpenOCD support

Post by Giovanni »

Good work, I would like to learn about OpenOCD too, I wish to add PowerPC support to it at some point, or at least trigger this development.

Giovanni
Post Reply