Re: [Openocd-development] Cross Platform Debugger

2009-12-16 Thread René Doss
Hi,
you should also have a look at codeblocks. This IDE look nice and
useful. I had not used as cross development/debugging tool, but I should
be simple possible.

http://www.codeblocks.org/

Rene


Am 13.12.2009 22:12, schrieb Carsten Breuer:
> Hi Michael, hi all
>
>   
>> There is setedit that uses gdb. I haven't tried the one on windows
>> 
> Cool :-). Looks like Borland C++ 3.1, that i have used
> some decades ago with DOS 5.0 :-))). Since i use midnight commander
> a lot, this is really an option :-).
>
>   
>>> kdbg would be nicer. insight sucks. If someone would come up with
>>>   
>> something that looks like IAR or Raisonnance that'd be neat. I'm
>> looking into that but right now I am too busy with my porting of STM8
>> to GCC.
>> 
> Well, i would be happy with KDbg and OpenOcd.
>
>   
>> IAR could but it is expensive. At work I paid around $6000 for it. It
>> costs about $1500 per year for support.
>> 

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-15 Thread Mathias K.
Hello,

you can pass it to gdb with the -x start option. Put your stuff into e.g. 
gdb.cfg and start gdb with

gdb -x gdb.cfg



Regards,

Mathias


Am 15.12.2009 16:51, schrieb Alain Mouette:
> Can anyone help me with this?
> 
> To make single-step work better with IRQs and FreeRTOS in Eclipse, it 
> seems that I need to send this do GDB:
> 
> define hook-step
> mon cortex_m3 maskisr on
> end
> define hookpost-step
> mon cortex_m3 maskisr off
> end
> 
> The big question is: how/where do I put that? I supose that it should be 
> in my config file for OpenOCD, I tried many things without success :(
> 
> There is very little about that in Google or in GDB or even in OpenOCD 
> manual...
> 
> Please help !!! Bellow is my previous question a an answer from David 
> that did help me in understanding what is happening :)
> 
> I am using OpennOCD 0.3.1 now :)
> 
> Thanks,
> Alain
> 
> Alain Mouette escreveu:
>> David Brownell escreveu:
>>> On Monday 14 December 2009, Alain Mouette wrote:
 I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works 
 just fine for the start-up code, but as soon as FreeRTOS (preemptive) 
 and Interrupts are running, it is not much usefull anymore... Is there 
 any way to single-step in a multi-thread environment?
>>> When you say "not useful" ... why, specifically?
>>
>> It is not usefull because when I single-step it goes to a ISR or to 
>> another thread, and eventualy goes to some invalid address. I gess that 
>> you partially undestood what I meant :)
>>
>>> Didn't you say, earlier, that using the
>>> cortex_m3 maskisr enable
>>> command while stepping solved the problem for you?
>>
>> Sorry, that was not me...
>>
>> I read the manual, googled and did not find how to use it. I added it to 
>> my config file, just before "init" but it made no difference.
>>
>> The only explanation that makes some sense to me is 
>> 
>>  
>> from this list. It looks like I should define a hook for GDB, is that it?
>>
>> If so, it sshould probably be in some function in my configuration 
>> script (like I did for flash writing) and call it from command line with 
>> "-c"? Could you give me an example? ... :)
>>
>> BTW, I am using OpenOCD 0.2.0 in Linux, would I have to upgrade to test 
>> that? (I will be doing it today anyway)
>>
>> Sorry it I look dumb sometimes, I am a programmer, but I came from an 
>> environment too different and I am having a hard time with too many 
>> different tools at once :(
>>
>> Thanks
>> Alain
> ___
> 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


Re: [Openocd-development] Cross Platform Debugger

2009-12-15 Thread Alain Mouette
Can anyone help me with this?

To make single-step work better with IRQs and FreeRTOS in Eclipse, it 
seems that I need to send this do GDB:

define hook-step
mon cortex_m3 maskisr on
end
define hookpost-step
mon cortex_m3 maskisr off
end

The big question is: how/where do I put that? I supose that it should be 
in my config file for OpenOCD, I tried many things without success :(

There is very little about that in Google or in GDB or even in OpenOCD 
manual...

Please help !!! Bellow is my previous question a an answer from David 
that did help me in understanding what is happening :)

I am using OpennOCD 0.3.1 now :)

Thanks,
Alain

Alain Mouette escreveu:
> David Brownell escreveu:
>> On Monday 14 December 2009, Alain Mouette wrote:
>>> I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works 
>>> just fine for the start-up code, but as soon as FreeRTOS (preemptive) 
>>> and Interrupts are running, it is not much usefull anymore... Is there 
>>> any way to single-step in a multi-thread environment?
>> When you say "not useful" ... why, specifically?
> 
> It is not usefull because when I single-step it goes to a ISR or to 
> another thread, and eventualy goes to some invalid address. I gess that 
> you partially undestood what I meant :)
> 
>> Didn't you say, earlier, that using the
>>  cortex_m3 maskisr enable
>> command while stepping solved the problem for you?
> 
> Sorry, that was not me...
> 
> I read the manual, googled and did not find how to use it. I added it to 
> my config file, just before "init" but it made no difference.
> 
> The only explanation that makes some sense to me is 
> 
>  
> from this list. It looks like I should define a hook for GDB, is that it?
> 
> If so, it sshould probably be in some function in my configuration 
> script (like I did for flash writing) and call it from command line with 
> "-c"? Could you give me an example? ... :)
> 
> BTW, I am using OpenOCD 0.2.0 in Linux, would I have to upgrade to test 
> that? (I will be doing it today anyway)
> 
> Sorry it I look dumb sometimes, I am a programmer, but I came from an 
> environment too different and I am having a hard time with too many 
> different tools at once :(
> 
> Thanks
> Alain
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread Alain Mouette

David Brownell escreveu:
> On Monday 14 December 2009, Alain Mouette wrote:
>> I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works 
>> just fine for the start-up code, but as soon as FreeRTOS (preemptive) 
>> and Interrupts are running, it is not much usefull anymore... Is there 
>> any way to single-step in a multi-thread environment?
> 
> When you say "not useful" ... why, specifically?

It is not usefull because when I single-step it goes to a ISR or to 
another thread, and eventualy goes to some invalid address. I gess that 
you partially undestood what I meant :)

> Didn't you say, earlier, that using the
>   cortex_m3 maskisr enable
> command while stepping solved the problem for you?

Sorry, that was not me...

I read the manual, googled and did not find how to use it. I added it to 
my config file, just before "init" but it made no difference.

The only explanation that makes some sense to me is 

 
from this list. It looks like I should define a hook for GDB, is that it?

If so, it sshould probably be in some function in my configuration 
script (like I did for flash writing) and call it from command line with 
"-c"? Could you give me an example? ... :)

BTW, I am using OpenOCD 0.2.0 in Linux, would I have to upgrade to test 
that? (I will be doing it today anyway)

Sorry it I look dumb sometimes, I am a programmer, but I came from an 
environment too different and I am having a hard time with too many 
different tools at once :(

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread David Brownell
On Monday 14 December 2009, Alain Mouette wrote:
> I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works 
> just fine for the start-up code, but as soon as FreeRTOS (preemptive) 
> and Interrupts are running, it is not much usefull anymore... Is there 
> any way to single-step in a multi-thread environment?

When you say "not useful" ... why, specifically?

Didn't you say, earlier, that using the

cortex_m3 maskisr enable

command while stepping solved the problem for you?


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


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread Øyvind Harboe
On Mon, Dec 14, 2009 at 4:40 PM, Alain Mouette  wrote:
>
> Michel Catudal escreveu:
>> Carsten Breuer a écrit :
>>>
>>> is there any other GDB then insight or the EclipsePlugin under windows?
>>
>> Insight and Eclipse are just applications using gdb.
>>
>> You could write your own if you dislike those.
>> Aside from that there are commercial ones that don't use gdb, Raisonance
>> and IAR are good.
>
> I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works
> just fine for the start-up code, but as soon as FreeRTOS (preemptive)
> and Interrupts are running, it is not much usefull anymore... Is there
> any way to single-step in a multi-thread environment?


As oposed to an alternative that "works"?



-- 
Ø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 programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread Alain Mouette

Michel Catudal escreveu:
> Carsten Breuer a écrit :
>>
>> is there any other GDB then insight or the EclipsePlugin under windows?
> 
> Insight and Eclipse are just applications using gdb.
> 
> You could write your own if you dislike those.
> Aside from that there are commercial ones that don't use gdb, Raisonance 
> and IAR are good.

I tried debugging with Eclipde+Gdb+OpenOCD on a Cortex-M3, and it works 
just fine for the start-up code, but as soon as FreeRTOS (preemptive) 
and Interrupts are running, it is not much usefull anymore... Is there 
any way to single-step in a multi-thread environment?

Thanks for any help,
Alain

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread David Brownell
On Monday 14 December 2009, Øyvind Harboe wrote:
> >> http://lists.berlios.de/pipermail/openocd-development/2009-October/011507.html
> >
> > Just now.  I'm not clear what a "mask" would be though ...
> > as in, what's different from the current notion of masks?
> > That's fairly specific to the ARM7/ARM9 EmbeddedICE; it's
> > only used in conjunction with a value, for "trigger debug
> > entry when writing  to the address".
> 
> Or you can also use it to set a breakpoint on a range of addresses.

Easier to do that just using the "length" parameter ... though
EmbeddedICE has a "range" mechanism, it ties up both bp/wp units.


> Specifically this can be useful to e.g. catch breakpoints to *all* vectors.

... that's what the vector catch hardware does.  Pretty much
all ARMs except some ARM7 chips have that.  ARM7 can do more
or less the same thing by using a "length" of 8 words, which
covers the entire vector table.  (Though of course, breaking
on the IRQ vector would make trouble!)


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


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread Øyvind Harboe
On Mon, Dec 14, 2009 at 9:29 AM, David Brownell  wrote:
> On Sunday 13 December 2009, Ųyvind Harboe wrote:
>> > Recent ARMs don't share the "just two breakpoint/watchpoint units"
>> > restriction of ARM7/ARM9 EmbeddedICE.
>> >
>> > Example, Cortex A8 and ARM11 have 6 breakpoints, 2 watchpoints.
>> > Cortex M3 has 6 breakpoints (flash only), 4 watchpoints.
>>
>> I was meaning to have a serious look at this work. Did see my
>> idea on masks for breakpoint/watchpoints?
>>
>> http://lists.berlios.de/pipermail/openocd-development/2009-October/011507.html
>
> Just now.  I'm not clear what a "mask" would be though ...
> as in, what's different from the current notion of masks?
> That's fairly specific to the ARM7/ARM9 EmbeddedICE; it's
> only used in conjunction with a value, for "trigger debug
> entry when writing  to the address".

Or you can also use it to set a breakpoint on a range of addresses.

Specifically this can be useful to e.g. catch breakpoints to *all* vectors.

I know it's used for evil user/kernel mode debugging tricks, but
I don't know the details.


-- 
Ø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 programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Cross Platform Debugger

2009-12-14 Thread David Brownell
On Sunday 13 December 2009, Øyvind Harboe wrote:
> > Recent ARMs don't share the "just two breakpoint/watchpoint units"
> > restriction of ARM7/ARM9 EmbeddedICE.
> >
> > Example, Cortex A8 and ARM11 have 6 breakpoints, 2 watchpoints.
> > Cortex M3 has 6 breakpoints (flash only), 4 watchpoints.
> 
> I was meaning to have a serious look at this work. Did see my
> idea on masks for breakpoint/watchpoints?
> 
> http://lists.berlios.de/pipermail/openocd-development/2009-October/011507.html

Just now.  I'm not clear what a "mask" would be though ...
as in, what's different from the current notion of masks?
That's fairly specific to the ARM7/ARM9 EmbeddedICE; it's
only used in conjunction with a value, for "trigger debug
entry when writing  to the address".

  > help wp
  wp [   [value] [mask]]
  list or set watchpoint  Valid Modes: EXEC
  >

(Note that syntax is incorrect ... to include a mask,
there must also be a value.  All those helptexts need
to be reviewed and corrected.)


The Cortex-M3 watchpoint code right now should handle
lengths up to whatever the hardware allows (32 KB ISTR),
so long as the data structure is naturally aligned ...
though I'm told there are CM3 libraries that rely on
the unaligned access support.

The ARM11 can't handle lengths of more than 4 bytes,
but Cortex-A8 can handle up to 2 GByte watchpoints.

- Dave

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-13 Thread Øyvind Harboe
On Mon, Dec 14, 2009 at 5:44 AM, David Brownell  wrote:
> On Sunday 13 December 2009, Michel Catudal wrote:
>> I think that once OpenOCD is optimized it should work just as nice on
>> the ARM (except for the lack of breakpoints)
>
> Recent ARMs don't share the "just two breakpoint/watchpoint units"
> restriction of ARM7/ARM9 EmbeddedICE.
>
> Example, Cortex A8 and ARM11 have 6 breakpoints, 2 watchpoints.
> Cortex M3 has 6 breakpoints (flash only), 4 watchpoints.

I was meaning to have a serious look at this work. Did see my
idea on masks for breakpoint/watchpoints?

http://lists.berlios.de/pipermail/openocd-development/2009-October/011507.html

-- 
Ø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 programmer
___
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development


Re: [Openocd-development] Cross Platform Debugger

2009-12-13 Thread David Brownell
On Sunday 13 December 2009, Michel Catudal wrote:
> I think that once OpenOCD is optimized it should work just as nice on 
> the ARM (except for the lack of breakpoints)

Recent ARMs don't share the "just two breakpoint/watchpoint units"
restriction of ARM7/ARM9 EmbeddedICE.

Example, Cortex A8 and ARM11 have 6 breakpoints, 2 watchpoints.
Cortex M3 has 6 breakpoints (flash only), 4 watchpoints.

That's ignoring software breakpoints, of course ... they're not
as useful without code in RAM.

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-13 Thread Michel Catudal
Carsten Breuer a écrit :
> Debugging was once cool with real emulators, with jtag, bdm or whatever,
> it always sucks a bit.
>
>
> Best Regards,
>
>
>
> Carsten
>
>   
I dislike the emulators. At work I have some projects with a Fujitsu 
processor and when I debug I need the $15k emulator
to connect to the board thru a $200 socket. I can't debug a production 
ready board.
Emulators give you more debugging power but the fact that you need a pod 
and expensive socket makes it an unwanted choice.

Nexus would be a good option on ARM or AVR32 if it didn't use so many pins.

The jtag debugging can be better if you have functions in RAM. With IAR 
you get 1 breakpoint, 1 being used by IAR.
I managed to get 2 but that was with messing up with the way IAR works out.

With Eclipse I like better the debuging on the AT32UC3C0512 since I have 
more hardware breakpoints than on the ARM and their gdb interface is 
quicker than OpenOCD.
I bought a JTAGICE mkII, Arrow has a sale right now for $150. Debugging 
is real nice and it works very well with Eclipse.
The nice thing about JTAGICE is that it works well on Linux as well as 
Windows with full support from Atmel. It would be nice if they'd release 
the code though. It would
have been quicker for me to get it work on Mandriva 2010.0. Atmel 
supports Linux but not Mandriva.

I think that once OpenOCD is optimized it should work just as nice on 
the ARM (except for the lack of breakpoints)

Michel

-- 
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://home.comcast.net/~mcatudal

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-13 Thread Carsten Breuer
Hi Michael, hi all

> There is setedit that uses gdb. I haven't tried the one on windows

Cool :-). Looks like Borland C++ 3.1, that i have used
some decades ago with DOS 5.0 :-))). Since i use midnight commander
a lot, this is really an option :-).

>> kdbg would be nicer. insight sucks. If someone would come up with
> something that looks like IAR or Raisonnance that'd be neat. I'm
> looking into that but right now I am too busy with my porting of STM8
> to GCC.

Well, i would be happy with KDbg and OpenOcd.

> IAR could but it is expensive. At work I paid around $6000 for it. It
> costs about $1500 per year for support.

Yes, i know. I use a lot Lauterbach and PLS. They are in the same
region. Nonetheless, this is a private project so i don't want to
spent too much money in it.

> Raisonnance is a lot cheaper. I don't know about the ARM version, the
> one I bought is for the STM8 for around $1400.

Far away for private use and i don't think that i really get something
that would be so much better then OpenOcd. The NXP jtag
interface is pretty annoying and i don't think that IAR can do much
more with it (without Traceport) then OpenOcd.

Debugging was once cool with real emulators, with jtag, bdm or whatever,
it always sucks a bit.


Best Regards,



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


Re: [Openocd-development] Cross Platform Debugger

2009-12-12 Thread Michel Catudal




Carsten Breuer a écrit :

  Hi Michael,

  
  

  is there any other GDB then insight or the EclipsePlugin under
windows?
  

command line gdb

  
  
Not really ;-)

  

There is setedit that uses gdb. I haven't tried the one on windows but
it works nicely on Mandriva and Fedora.
It is much much faster than with eclipse or insight. It is command line
stuff but you can run it in a terminal.
Set has some for dos and debian. We put the binaries and source code on
SourceForge.
If you want to try it on Linux I have some on my website. 
You will need to install the turbo vision library as well. I haven't
updated my packages since SourceForge made the last changes.
You can recompile the source if you can't install my binaries on your
Linux distribution.


  
Insight and Eclipse are just applications using gdb.

You could write your own if you dislike those. Aside from that there

  
  
Yep, that's perhaps the way to go. I have thought about that already, but
want to check first if someone else is crazy enough too doing it ;-).
One way could be too port insight or KDbg to QT.
KDbg isn't ported to QT 4 yet, but it is "on the way".

  

kdbg would be nicer. insight sucks.
If someone would come up with something that looks like IAR or
Raisonnance that'd be neat.
I'm looking into that but right now I am too busy with my porting of
STM8 to GCC.


  
are commercial ones that don't use gdb, Raisonance and IAR are good.

  
  
Yep, but these don't use OpenOCD, right?

Best Regards,
  


IAR could but it is expensive. At work I paid around $6000 for it. It
costs about $1500 per year for support.
If you can affor to buy that one you might as well buy a J-Link which
doesn't require openocd since it has the RDI support.
The new version of IAR arm supports gdb server. 

Raisonnance is a lot cheaper. I don't know about the ARM version, the
one I bought is for the STM8 for around $1400.

Michel


-- 
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://home.comcast.net/~mcatudal



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


Re: [Openocd-development] Cross Platform Debugger

2009-12-12 Thread Carsten Breuer
Hi Michael,

>> is there any other GDB then insight or the EclipsePlugin under
>> windows?
> command line gdb

Not really ;-)

> Insight and Eclipse are just applications using gdb.
>
> You could write your own if you dislike those. Aside from that there

Yep, that's perhaps the way to go. I have thought about that already, but
want to check first if someone else is crazy enough too doing it ;-).
One way could be too port insight or KDbg to QT.
KDbg isn't ported to QT 4 yet, but it is "on the way".

> are commercial ones that don't use gdb, Raisonance and IAR are good.

Yep, but these don't use OpenOCD, right?

Best Regards,



Carsten

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


Re: [Openocd-development] Cross Platform Debugger

2009-12-12 Thread Michel Catudal
Carsten Breuer a écrit :
> Hi Guys,
>
>
> is there any other GDB then insight or the EclipsePlugin under windows?
>
>
> Best Regards,
>
>
>
> Carsten
>
>   
command line gdb

Insight and Eclipse are just applications using gdb.

You could write your own if you dislike those.
Aside from that there are commercial ones that don't use gdb, Raisonance 
and IAR are good.


Michel

-- 
Tired of Microsoft's rebootive multitasking?
then it's time to upgrade to Linux.
http://home.comcast.net/~mcatudal

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


[Openocd-development] Cross Platform Debugger

2009-12-12 Thread Carsten Breuer
Hi Guys,


is there any other GDB then insight or the EclipsePlugin under windows?


Best Regards,



Carsten


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