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.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Hi gmb42,

i've not yet tried to push the options to the openocd file. I'm sure this is possible though.

About your crash - this should obviously not happen. Could you give me the elf file, or did you use a standard chibios demo? Where did you get your openocd? Directly from master? Which version of ChibiOS do you use?

MaBl
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

openocd is built from master git.

I've attached my elf file. It's for an stm32f4 disco that runs the ChibiOS shell on the OTG USB and reads temperature values from a MAX31855 thermocouple interface on SPI2. It's using ChibiOS 2.5.1.

Running with "-rtos ChibiOS" works well.
Attachments
max31855.zip
for stm32f4 discovery, MAX31855 on SPi2
(97.65 KiB) Downloaded 559 times
Last edited by gmb42 on Thu Oct 25, 2012 9:07 pm, edited 1 time in total.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Ok, where did you attach it?
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

oops, misfire. It's there now.
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Hmm I cannot find my discovery. But you get this error as soon as you connect via gdb to openocd, correct? I tested the file with an other board and it worked fine... :-/ Also the error only appears in rtos auto mode?
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

Yes, in gdb I use "tar ext :3333" and openocd crashes if I use "rtos -auto". Do you want openocd debug output?
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

gmb42 wrote:Yes, in gdb I use "tar ext :3333" and openocd crashes if I use "rtos -auto". Do you want openocd debug output?

Sure - I take what I can get :-) (Best would be with --debug). Could you also post your gdb version? I'll look for the error tomorrow, but i really would like to have this fixed asap.
gmb42
Posts: 31
Joined: Tue Oct 02, 2012 8:09 pm

Re: ChibiOS OpenOCD support

Post by gmb42 »

Attached should be the openocd debug output

gdb:

GNU gdb (GNU Tools for ARM Embedded Processors) 7.3.1.20120613-cvs
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "--host=i686-linux-gnu --target=arm-none-eabi".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Attachments
openocd-debug.zip
openocd debug output
(4.5 KiB) Downloaded 526 times
Freddie Chopin
Posts: 36
Joined: Wed Oct 17, 2012 8:57 am

Re: ChibiOS OpenOCD support

Post by Freddie Chopin »

mabl wrote:This config has the advantage that you also easily enable flashing from gdb via the "load" command.

Flashing via GDB's "load" works without any additional commands, with "stock" config files.

Would you actually recommend Qt Creator as a better alternative to Eclipse?

4\/3!!
mabl
Posts: 417
Joined: Tue Dec 21, 2010 10:19 am
Been thanked: 1 time

Re: ChibiOS OpenOCD support

Post by mabl »

Hi gmb42,

I've tried looking into your problem:

  • Your elf file works fine for me with gdb 7.2 and 7.5.
  • You said you are using openocd @ 4a5dc09, but your oocd logs says 14e12c3
  • Looking at your back trace you can see that gdb did not resolve the ChibiOS symbols oocd looked for: "qSymbol::696e69745f7461736b" - the Addr should be in between the :: - I do not know what causes this. Where did you get your gdb?
  • I've emulated the behavior of your gdb by striping all symbols from it. But I cannot provoke the crash that way - also not at oocd 14e12c3

It would be really helpful if you could check out the latest version of oocd from git://openocd.git.sourceforge.net/gitro ... cd/openocd Make sure that the latest commit also matches the output of gdb on startup. I.e. "Open On-Chip Debugger 0.7.0-dev-00052-g27f0497 (2012-10-22-13:30)"


Freddie Chopin wrote:
mabl wrote:This config has the advantage that you also easily enable flashing from gdb via the "load" command.

Flashing via GDB's "load" works without any additional commands, with "stock" config files.

Would you actually recommend Qt Creator as a better alternative to Eclipse?

4\/3!!

Ok, good to know. I never looked so much into the stock config files. I'm not yet so much into qtcreator but from what I see it is significantly faster. It has a strong focus on C++ though. I recommend testing latest master if you have time for it.
Post Reply