Yesterday I was trying out the ChibiOS/RT plugin in eclipse, but no dice. The tab does show up in the views, but no content. Okay, no doubt because it cannot read memory/registers/whatever for some reason or other.
So while trying out all sorts of thing with openocd, I managed to mess up my STM32F4 discovery board and couldn't flash it anymore.
What did still work was pull BOOT0 high and then program. So I muck about some more. Oh cool, now I can and sometimes cannot program it, no matter what BOOT0 is set to! At that point I thought maybe I had inadvertently fucked it up royally. Tried openocd (several versions), st-link, nope.
Then *sigh* reboot to windoze, install ST's ST-link/V2 thingy. Okay, now I can at least program it again with BOOT0 pulled high. It did behave a little funky though, which
in hindsight probably was watchdog related.
Still no 30 Watt lightbulbs, so screw it, time for something else. Some sleep + a fresh round of googling later I found out that I had managed to bork the option bytes in flash. So not only had I turned on protection for some flash sectors (old news, I could fix that in openocd), but also BOR settings, watchdog timer settings etc. Soooo, using ST-link/V2 set them back to default and all is well again.

So now I am back to where I was yesterday.

ChibiOS/RT plugin installed and all that, but no data. I do get openocd to detect the plugin. Well, probably not the plugin, but the ch_debug symbol in the binary... At any rate, this is the openocd output:
Open On-Chip Debugger 0.8.0-dev-00319-g94d64cc (2014-01-19-12:45)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
srst_only separate srst_nogate srst_open_drain connect_deassert_srst
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v17 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 2.897578
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Halting target on gdb-attach
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x41000000 pc: 0x08002058 psp: 0x20000e78
Warn : acknowledgment received, but no packet pending
Info : Auto-detected RTOS: ChibiOS
Info : Successfully loaded memory map of ChibiOS/RT target running version 2.6.0
It's a fresh git clone from yesterday.
As init commands on gdb startup I have:
set arch i386:x86_64
set remote memory-write-packet-size 1024
set remote memory-write-packet-size fixed
set remote memory-read-packet-size 1024
set remote memory-read-packet-size fixed
file /full/path/ch.elf
The "set arch" is
intended to prevent "Remote 'g' packet reply is too long" but unfortunately it still throws that error.
It does seem to be memory map related because the Embsys Registers plugin doesn't show any meaningful data either... Hopefully someone has been through some of the same and knows a fix?
For now I've had enough of this sidetrack for now, I've got mosfets to blow up.

PS: oh yeah, before I forget ... does anyone know how to set the option bytes through openocd? It looks like this is not possible in the current version, but I'd love to be wrong.