Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Peter Stuge
Hi Bernard, Bernard Mentink wrote: > it gets to the main breakpoint ok, but then when I continue goes > off into the weeds, please see the attached .doc file for a > snapshot of the error in eclipse ... Seems to try to execute code > at 0xfff0. Even if the people you normally correspond with

Re: [Openocd-development] GIT repository questions.

2010-10-12 Thread Peter Stuge
Ing. Lubomir VALEK wrote: > I ussually use SVN on other projects. > What is different at GIT? Very much is different with git. Please take the time to listen to the author Linus Torvalds' talk about git: http://www.youtube.com/watch?v=4XpnKHJAok8 > And merge is done automatically. > Is this po

[Openocd-development] [Patch] segfault in handle_dump_image_command()

2010-10-12 Thread Antonio Borneo
Hi, the first patch fixes a segfault that happens at each run of "dump_image" command. The bug has been introduced a couple of weeks ago in commit 3931b99d142d337ea6558fd09aad2e0812c04507 The same function "handle_dump_image_command()" does not correctly propagate errors to the caller. The second

Re: [Openocd-development] [Patch] segfault in handle_dump_image_command()

2010-10-12 Thread Øyvind Harboe
Merged. Thanks! > I still have a question on this function. Hope you can answer. > The while() loop splits the read operation in chunks not bigger that 560 > bytes. > From where this magic number 560 pops up? A limitation of a specific target? > It should be documented. I don't think there is a

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread B
I filed a bug here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/658574 don't know if that is the best place. Your seem to have the C code down what causes the issue in the source. I didn't go that far being okay with just having it working again. ___

[Openocd-development] Role of OpenOCD in debugging

2010-10-12 Thread Nived
Hi, This might be a silly question, but i was wondering what exactly the role of OpenOCD is in debugging. I mean the internal functioning. I am assuming it acts like a mediator and just enables debugging on a remote device. But i am still not clear how this is done. Can anyone shed some light on t

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Jörg Fischer
Am 11.10.2010 22:04, schrieb Bernard Mentink: >> # LPC2000 & LPC1700 -> SRST causes TRST >> reset_config srst_pulls_trst That does not work for me anymore since the "Cortex-M3 reset handling" patch is in. Have you tried "reset_config srst_only"? >> target remote localhost: Here must be a "m

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread Peter Stuge
B wrote: > I filed a bug here: > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/658574 > don't know if that is the best place. You could file a bug at https://bugzilla.kernel.org/ with references to the below discussion. That's the tracker where it should go to be permanently resolved. > Y

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Hi Jorg, Thanks for the reply. I tried what you suggested, and that has helped .. However, I still have some un-reliability related to the jtag speed setting. If I set to 500khz, I get to the reset vector ok, but do not get to the breakpoint at main, and the debugger goes off to the weeds. If

Re: [Openocd-development] Role of OpenOCD in debugging

2010-10-12 Thread Mike Dunn
On 10/12/2010 09:57 AM, Nived wrote: > > This might be a silly question, but i was wondering what exactly the role of > OpenOCD is in debugging. I mean the internal functioning. I am assuming it > acts like a mediator and just enables debugging on a remote device. But i am > still not clear how th

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
> If I set to 20khz, I get perfect debugging no errors .. I have found that the JTAG clock needs to be *really* low when the system is running off an RC oscillator. Once on a PLL, you can crank up the speed. This was observed on an LPC1768, but also one other system I fail to recall which... RCLK

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Ok, thanks, although I still don't understand why the example LPC1768.cfg script has the OSC startup at 4Mhz, and states you then can use 4Mhz/6 Which is roughly 500Khz ... But this doesn't work. Do you, or anyone else, have a reset-init sequence (for the LPC1766/68) that sets the PLL and cranks

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
On Tue, Oct 12, 2010 at 11:25 PM, Bernard Mentink wrote: > Ok, thanks, although I still don't understand why the example > LPC1768.cfg script has the OSC startup at 4Mhz, and states > you then can use 4Mhz/6 > Which is roughly 500Khz ... But this doesn't work. You're not using the latest master b

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Yes, you are correct, I was looking at an old script that had it set to 500khz. I can put up with 10khz for debugging, but loading the image is too slow at that speed. I can download the image at 500 khz ok. Is there any way to download the imake at 500khz, then switch to 10khz for the debugging

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
> Is there any way to download the imake at 500khz, then switch >to 10khz for the debugging With the currect reset sequence I am using? Look at board/mcb1700.cfg Debugging is probably stable at higher clock rates once the PLL is running. -- Øyvind Harboe US toll free 1-866-980-3434 / Inter

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Hi, Ok I have tried this. I get a fast image download, but I have slow debugging as the clock seems to get reset back to 10khz again .. (The JTAG clock gets limited to 6Mhz by the Turlelizer2 hardware ..) This is the dump from gdb output .. -- target remo

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
> mon reset halt Resetting turns the RC oscillator back on, and you're not running the init script to set up the PLL again... -- Øyvind Harboe US toll free 1-866-980-3434 / International +47 51 63 25 00 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash prog

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Ah, got you ... So I should be doing another mon reset init again? Cheers, Bernie -- Hiding the Truth with "Political Correctness" is the same as Lying ... BRM -Original Message- From: Øyvind Harboe

Re: [Openocd-development] Problem getting reliable "reset init" onLPC1766 target.

2010-10-12 Thread Bernard Mentink
Hi Øyvind, Awesome! Well you have really helped me fix this, it all works great now very reliable debugging ... Many Thanks, Bernie --- Ah, got you ... So I should be doing another mon reset init again? Cheers, Bernie ---

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Jörg Fischer
Hi, Am 12.10.2010 23:36, schrieb Bernard Mentink: > Yes, you are correct, I was looking at an old script that had it set to > 500khz. This work for me _reliable_ on a custom lpc1768 board: adapter_khz 500 #delays on reset lines adapter_nsrst_delay 30 adapter_nsrst_assert_width 100 jtag_ntrst_d

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Bernard Mentink
Hi Jorg, Thanks but after following Øyvind's advice and setting up the PLL , I can now run at the maximum speed of my jtag adapter (6Mhz) .. Cheers, Bernie -- Hiding the Truth with "Political Correctness"

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread Xiaofan Chen
On Wed, Oct 13, 2010 at 4:32 AM, Peter Stuge wrote: > There was good discussion investigating the problem: > > http://marc.info/?l=linux-usb&m=128119592700624 > > (read the entire thread) > > And on August 25 it ends with a (badly formatted) patch to revert > the commit, which has not been include

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread Peter Stuge
Xiaofan Chen wrote: > > (read the entire thread) I really meant this. > > has not been included in Linus' git tree. I assume because it was > > badly formatted. > > I think this is not because it was badly formatted. It seems to me > that there are different opinions whether to fix the kernel >

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread Xiaofan Chen
On Wed, Oct 13, 2010 at 10:53 AM, Peter Stuge wrote: > Xiaofan Chen wrote: >> > (read the entire thread) > > I really meant this. > Yes I read the whold thread. >> > has not been included in Linus' git tree. I assume because it was >> > badly formatted. >> >> I think this is not because it was b

Re: [Openocd-development] Luminary BD-ICDI-B UART issue

2010-10-12 Thread Xiaofan Chen
On Wed, Oct 13, 2010 at 11:15 AM, Xiaofan Chen wrote: > On Wed, Oct 13, 2010 at 10:53 AM, Peter Stuge wrote: >> See http://marc.info/?l=linux-usb&m=128276513507083 and the two >> following messages in the thread, which come just a message or two >> after the ones you linked to. >> >> The patch in

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
2010/10/13 Jörg Fischer : > Hi, > Am 12.10.2010 23:36, schrieb Bernard Mentink: >> Yes, you are correct, I was looking at an old script that had it set to >> 500khz. > > This work for me _reliable_ on a custom lpc1768 board: > > adapter_khz 500 > > #delays on reset lines > adapter_nsrst_delay 30 >

Re: [Openocd-development] Problem getting reliable "reset init" on LPC1766 target.

2010-10-12 Thread Øyvind Harboe
On Tue, Oct 12, 2010 at 11:59 PM, Bernard Mentink wrote: > Ah, got you ... So I should be doing another mon reset init again? Depends on what you need to do. Scenario: reset init # loads app into flash load reset halt # Now we're slow again # debug slow startup w/slow clock break main c # We can

Re: [Openocd-development] Role of OpenOCD in debugging

2010-10-12 Thread Laurent Gauch
>/ This might be a silly question, but i was wondering what exactly the role of />/ OpenOCD is in debugging. I mean the internal functioning. I am assuming it />/ acts like a mediator and just enables debugging on a remote device. But i am />/ still not clear how this is done. Can anyone shed som