Chibios 2.5.1 and gdb O0

ChibiOS public support forum for topics related to the STMicroelectronics STM32 family of micro-controllers.

Moderator: RoccoMarco

sam76
Posts: 15
Joined: Fri May 03, 2013 8:07 am

Chibios 2.5.1 and gdb O0

Post 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 ?
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Chibios 2.5.1 and gdb O0

Post 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
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Chibios 2.5.1 and gdb O0

Post 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
sam76
Posts: 15
Joined: Fri May 03, 2013 8:07 am

Re: Chibios 2.5.1 and gdb O0

Post 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 !
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Chibios 2.5.1 and gdb O0

Post 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
sam76
Posts: 15
Joined: Fri May 03, 2013 8:07 am

Re: Chibios 2.5.1 and gdb O0

Post by sam76 »

It's good to know :)
billr
Posts: 12
Joined: Sun Feb 24, 2013 8:36 pm

Re: Chibios 2.5.1 and gdb O0

Post by billr »

Version 0.7.0 of openOCD was just released on 5 May. According the NEWS file, it includes the ChibiOS support.
User avatar
Tectu
Posts: 1225
Joined: Thu May 10, 2012 9:50 am

Re: Chibios 2.5.1 and gdb O0

Post 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
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: Chibios 2.5.1 and gdb O0

Post 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
DrunkenDonkey
Posts: 124
Joined: Sun Aug 28, 2011 5:16 pm

Re: Chibios 2.5.1 and gdb O0

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