Re: [Openocd-development] Eclipse Helios GDB settings (was: STM32flashwrite speed)

2010-10-19 Thread Andreas Fritiofson
On Tue, Oct 19, 2010 at 11:28 PM, Bernard Mentink
 wrote:
>
> Hi again Andreas,
>
> An update to this: The error below was because I had several instances
> of gdb running, they were not closed off correctly in eclipse.

Hm, yeah I've seen that too sometimes. Perhaps more often or with
different error messages when running with the --pipe option.

> Now when I run it, the program downloades and I get to main correctly
>
> However, when I hit continue, I end up in the g_pfnVectors() at 0x00,
> and I can not continue ..
>
> Also, in the Console window, I get this error:
> "lpc1766.cpu -- clearing lockup after double fault"
>
> I am way out of my depth here .. I don't have this issue when I run my
> init script as described earlier ... Instead of this method.

This is indicative of an actual bug in your code. I can't explain why
it only shows with "my" method. If you can get to main you should be
able to step instead of continue. Does that work? Can you step forward
until you hit the place where it crashes?

The "clearing lockup after double fault" says that the core was in a
lockup state which means a fault occurred (bad memory access, invalid
instruction and such, probably due to a software bug) and, in
addition, there was an error while fetching or executing the exception
vector (no fault handler installed?). Common bugs that can cause this
is invalid pointer dereferencing, buffer overflows or enabled
interrupts for which no handler is installed.

//Andreas
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Eclipse Helios GDB settings (was: STM32flashwrite speed)

2010-10-19 Thread Bernard Mentink
 
Hi again Andreas,

An update to this: The error below was because I had several instances
of gdb running, they were not closed off correctly in eclipse.
Now when I run it, the program downloades and I get to main correctly


However, when I hit continue, I end up in the g_pfnVectors() at 0x00,
and I can not continue ..

Also, in the Console window, I get this error:
"lpc1766.cpu -- clearing lockup after double fault"

I am way out of my depth here .. I don't have this issue when I run my
init script as described earlier ... Instead of this method.

Hope you can help ..

Cheers,
Bernie


Hi Andreas,

I have tried to do what you describe below.

I have setup my windows paths so that openocd (cygwin version) runs fine
in a normal console window .. That works.

I can now run openocd with the pipe option in eclipse.. I also have
modified my openocd.cfg file to include the gdb-flash-write-end and
gdb-flash-write-start events which call reset init.

However, when I start up the debugger, I get this error:

--
Error in final launch sequence
Failed to execute MI command:
target remote | openocd --pipe

Error message from debugger back end:
Remote communication error: No error.
Remote communication error: No error.

--


It seems to download fine (I get the normal 4 second download delay) but
I get this error when debugging goes to start.
Any ideas?, can I turn on extra debugging somewhere to get any extra
info?

Cheers,
Bernie


--
I have got decent results in Helios using the "GDB (DSF) Hardware
Debugging Launcher" with the following, pretty straight-forward,
configuration.

Main tab:
Select project and binary as usual

Debugger tab:
GDB Command: arm-none-eabi-gdb
Check Use remote target
JTAG Device: OpenOCD (via pipe)
(GDB Connection String: "| openocd --pipe")

Startup tab:
Uncheck Reset and delay... and Halt
Check Load image, use project binary
Check Load symbols, use project binary
Check Set breakpoint at: main
Check Resume
No run or init commands specified

In the project root, create a file openocd.cfg:
---
source interface.cfg
source [find target/stm32.cfg]
source [find chip/st/stm32/stm32.tcl]

stm32.cpu configure -event gdb-flash-write-end {
reset init
}

stm32.cpu configure -event gdb-flash-erase-start {
reset init
}


___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development