Page 1 of 2

Chibios 2.5.1 and gdb O0

Posted: Fri May 03, 2013 8:28 am
by sam76
Hello,

I would try my project under chibios but I can't debug with Gdb. It is based on an Olimex STM32H407 board.

I have tried the simple demo "ARMCM4-STM32F407-DISCOVERY" with a -O0 compile option. The Led blink but a simple breakpoint doesn't work (with -O2 and -ggdb, breakpoint works). I can Singint the program, so it is well attached..

I use openocd 0.6.1 and Linaro prebuilt toolchain :

Code: Select all

arm-none-eabi-gcc (GNU Tools for ARM Embedded Processors) 4.7.3 20130312 (release) [ARM/embedded-4_7-branch revision 196615]
GNU gdb (GNU Tools for ARM Embedded Processors) 7.4.1.20130312-cvs


I have the same problem with ChibiOs 2.4.3

What part fail ?

Re: Chibios 2.5.1 and gdb O0

Posted: Fri May 03, 2013 12:32 pm
by Giovanni
Hi,

Strange, I don't have any problem debugging using -O0. No idea about what your problem could be, most likely it is related to the toolchain.

Are you using OpenOCD or some other GDB server? what is your debug hardware?

Giovanni

Re: Chibios 2.5.1 and gdb O0

Posted: Fri May 03, 2013 1:04 pm
by Tectu
I never had any problems with -O0 myself as well. I am using this toolchain which has also become somehow the community standard.


~ Tectu

Re: Chibios 2.5.1 and gdb O0

Posted: Sat May 04, 2013 10:44 am
by sam76
Hi,

My problem is solved, I have fetched the last openocd source from git and everything work.

I am surprised that no-one have this problem !

Re: Chibios 2.5.1 and gdb O0

Posted: Sat May 04, 2013 11:03 am
by Tectu
sam76 wrote:I am surprised that no-one have this problem !

Most ChibiOS users use the latest build of OpenOCD because it includes the debugging support for ChibiOS/RT.


~ Tectu

Re: Chibios 2.5.1 and gdb O0

Posted: Mon May 06, 2013 2:21 pm
by sam76
It's good to know :)

Re: Chibios 2.5.1 and gdb O0

Posted: Mon May 06, 2013 5:38 pm
by billr
Version 0.7.0 of openOCD was just released on 5 May. According the NEWS file, it includes the ChibiOS support.

Re: Chibios 2.5.1 and gdb O0

Posted: Mon May 06, 2013 6:37 pm
by Tectu
billr wrote:Version 0.7.0 of openOCD was just released on 5 May

Cool, thanks for the information! I spread it around.


~ Tectu

Re: Chibios 2.5.1 and gdb O0

Posted: Mon May 06, 2013 6:40 pm
by Giovanni
Time for a new ChibiStudio release then: ChibiOS 2.6.0, OpenOCD 0.7.0 and the updated compiler from the guys on launchpad.

Giovanni

Re: Chibios 2.5.1 and gdb O0

Posted: Mon May 06, 2013 8:10 pm
by DrunkenDonkey
Now that would be lovely indeed, I tried to play with making the newest eclipse play fair with autocomplete and stuff, but after many hours lost in it, couldn't make it work reliably, at least half the stuff is unresolved for some reason, ChibiStudio to the rescue :)