[Openocd-development] outstanding patches?

2011-10-13 Thread Øyvind Harboe
Please submit all outstanding patch series to Gerrit. Read latest HACKING docs for tips on how to get started. By doing this you will be helping to save maintainers time so that we can focus on reviewing and commenting. -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free

[Openocd-development] Outstanding patches

2011-08-09 Thread Øyvind Harboe
Now that the merge window is open, please post(or repost) patches and pull requests for stuff that is ready to go into the master branch. Thanks! -- Øyvind Harboe - Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-11 Thread Michael Schwingen
Am 06/11/2011 01:32 AM, schrieb Peter Stuge: Tomek CEDRO wrote: If you switch output into Hi-Z the pull-up or pull-down resistor will take care of the on the pin state. I think Michael's point is that *which* state it is is not known (and can not be known) by generic ft2232 code in OpenOCD.

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-11 Thread Freddie Chopin
On 2011-06-10 22:29, Tomek CEDRO wrote: Michael, in this situation you probably simply don't want to shut down the OpenOCD and leave things as-is with your session active controlling the target. What is the point of leaving target in some specific state when OpenOCD is not running? It sounds

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-11 Thread Freddie Chopin
On 2011-06-10 22:06, Peter Stuge wrote: And that just because the code does not have information, it should not make guesses. Restoring initial state of FT2232 interface is just like pulling a plug - disconnecting JTAG from board. I really see no danger in such operation... Physical

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-11 Thread Michael Schwingen
Am 06/11/2011 09:48 AM, schrieb Freddie Chopin: Full support here - for me after shutting down OpenOCD I'd like it to restore interface to initial state (in most cases - transparent). Sometimes - when the interface is placed inside some device it's difficult to physically disconnect it from

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-11 Thread Michael Schwingen
Am 06/11/2011 09:55 AM, schrieb Freddie Chopin: On 2011-06-10 22:06, Peter Stuge wrote: And that just because the code does not have information, it should not make guesses. Restoring initial state of FT2232 interface is just like pulling a plug - disconnecting JTAG from board. I really see

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Michael Schwingen
Am 06/10/2011 02:51 AM, schrieb Tomek CEDRO: Not sure if OUTPUT-HIGH for FT2232 means Hi-Z but most buffers you mention in those interfaces are tri-state buffers from what I have seen on ~5 different devices. Tri-state buffers are active-low, so setting pins to input (Hi-Z) should give Hi-Z on

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
Hello Laurent! :-) On Thu, Jun 9, 2011 at 6:21 AM, Laurent Gauch laurent.gauch at amontec.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / But before to close the handle we should still be able : // -1- to tristate signal High-Z via all the out enable signals used in

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
On Thu, Jun 9, 2011 at 10:17 PM, Tomek CEDRO tomek.cedro at gmail.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / Hello Laurent! :-) // // On Thu, Jun 9, 2011 at 6:21 AM, Laurent Gauch laurent.gauch at amontec.com

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Michael Schwingen
Am 06/10/2011 09:33 AM, schrieb Laurent Gauch: / Do you have any other ideas on what should be done on ft2232_quit() // except rtck, hi-z, div5..? I can prepare a patch, or Peter will as I // can see he is already working out the subject :-) / What problem is setting pins to a default state

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
/ Hello Andreas :-) // // On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson // andreas.fritiofson at gmail.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: // I have created simple quit() that sets all port pins high and as input // (mpsse command 0x80 0x82) but that

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
On Thu, Jun 9, 2011 at 11:46 PM, Andreas Fritiofson andreas.fritiofson at gmail.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / Setting the FTDI pins to Hi-Z is not necessarily the same as setting the // pins in the JTAG connector to Hi-Z. There is arbitrary

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
On Fri, Jun 10, 2011 at 12:35 AM, Andreas Fritiofson andreas.fritiofson at gmail.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / What are you talking about? Not all ftdi dongles are wired like this = // there is no universal default setting suitable for all dongles. /

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
/ / Do you have any other ideas on what should be done on ft2232_quit() // // except rtck, hi-z, div5..? I can prepare a patch, or Peter will as I // // can see he is already working out the subject :-) // / // // What problem is setting pins to a default state on exit supposed to // solve? Are

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Tomek CEDRO
The solution for deinitialization is trivial - fix generic ft22332_quit() to match general needs of well designed interfaces (i.e. putting Hi-Z on FT chip is enough to cut it off electrically from target / produce Hi-Z on cable pinout). If any other dongle needs some specific deinitialization

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Laurent Gauch
Am 06/10/2011 09:33 AM, schrieb Laurent Gauch: / // / Do you have any other ideas on what should be done on ft2232_quit() // // except rtck, hi-z, div5..? I can prepare a patch, or Peter will as I // // can see he is already working out the subject :-) // / // // What problem is setting pins to

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Michael Schwingen
Am 06/10/2011 04:35 PM, schrieb Laurent Gauch: If I quit OpenOCD, I expect the target to stay in the same state as before. If it was in reset, I expect it to stay in reset and not start some code uncontrolled. Yes you're right Michael regarding the state of the TARGET. Did you already

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Michael Schwingen
Am 06/10/2011 09:41 AM, schrieb Laurent Gauch: Hello Andreas :-) On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson andreas.fritiofson at gmail.com https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / I have created simple quit() that sets all port pins high and as input

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Tomek CEDRO
On Fri, Jun 10, 2011 at 7:17 PM, Michael Schwingen rincew...@discworld.dascon.de wrote: If we agree that we do not want to touch the target, that means the lowlevel interface driver must not change any signal state upon exit, because it does not know what state that will put the target into.

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Michael Schwingen
Am 06/10/2011 09:51 PM, schrieb Tomek CEDRO: On Fri, Jun 10, 2011 at 7:17 PM, Michael Schwingen rincew...@discworld.dascon.de wrote: If we agree that we do not want to touch the target, that means the lowlevel interface driver must not change any signal state upon exit, because it does not

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Peter Stuge
Tomek CEDRO wrote: Changing signals to High-Z is *not* safe. It changes the JTAG signals to a board-specific state that depends on the pullup/pulldown resistors .. If you switch output into Hi-Z the pull-up or pull-down resistor will take care of the on the pin state. I think Michael's

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Tomek CEDRO
On Fri, Jun 10, 2011 at 8:01 PM, Michael Schwingen rincew...@discworld.dascon.de wrote: Changing signals to High-Z is *not* safe. It changes the JTAG signals to a board-specific state that depends on the pullup/pulldown resistors on the board. Depending on the old state of the JTAG pins, this

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Tomek CEDRO
On Fri, Jun 10, 2011 at 8:35 PM, Tomek CEDRO tomek.ce...@gmail.com wrote: Quiting without quit is like quit button in windows vista - it does not only quit but first of all suspends system ;] I mean shutdown.. or something like that.. I don't use that shit anyway :-) -- CeDeROM, SQ7MHZ,

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-10 Thread Peter Stuge
Tomek CEDRO wrote: If you switch output into Hi-Z the pull-up or pull-down resistor will take care of the on the pin state. I think Michael's point is that *which* state it is is not known (and can not be known) by generic ft2232 code in OpenOCD. And that just because the code does

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Laurent Gauch
/ // I suggest to drop this patch and merge a simpler fix for the problem // adressed by this patch. Only a few lines of code would need to change. // // /Attached is such a patch. The benefit over Tomek's patch is that it frees not only the allocated buffer but also closes the ftdi handle (as

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Øyvind Harboe
On Thu, Jun 9, 2011 at 7:29 AM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: Nit, the construct below is a little bit fancy. I'd prefer splitting it over multiple lines to make it more accessible to the casual reader. Or just use goto, please, which is clear, simple, well

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Peter Stuge
Øyvind Harboe wrote: Or just use goto, please, which is clear, simple, well understood, and elegant all at once. :) I think goto is OK sometimes. When it is used to unwind the stack frame and free up resources, in lieu of exceptions and resource tracking it can clean up the code

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Andreas Fritiofson
On Thu, Jun 9, 2011 at 9:06 AM, Øyvind Harboe oyvind.har...@zylin.comwrote: On Thu, Jun 9, 2011 at 7:29 AM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: Nit, the construct below is a little bit fancy. I'd prefer splitting it over multiple lines to make it more accessible to the

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Andreas Fritiofson
On Thu, Jun 9, 2011 at 10:17 PM, Tomek CEDRO tomek.ce...@gmail.com wrote: Hello Laurent! :-) On Thu, Jun 9, 2011 at 6:21 AM, Laurent Gauch laurent.ga...@amontec.com wrote: But before to close the handle we should still be able : -1- to tristate signal High-Z via all the out enable signals

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Tomek CEDRO
Hello Andreas :-) On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: I have created simple quit() that sets all port pins high and as input (mpsse command 0x80 0x82) but that did not shut down the yellow led :-( Since the suitable setting depends on the

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Andreas Fritiofson
On Fri, Jun 10, 2011 at 1:40 AM, Tomek CEDRO tomek.ce...@gmail.com wrote: Hello Andreas :-) On Thu, Jun 9, 2011 at 11:30 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: I have created simple quit() that sets all port pins high and as input (mpsse command 0x80 0x82) but that did

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Andreas Fritiofson
On Fri, Jun 10, 2011 at 2:18 AM, Tomek CEDRO tomek.ce...@gmail.com wrote: On Thu, Jun 9, 2011 at 11:46 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: Setting the FTDI pins to Hi-Z is not necessarily the same as setting the pins in the JTAG connector to Hi-Z. There is arbitrary

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-09 Thread Tomek CEDRO
On Fri, Jun 10, 2011 at 12:35 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: What are you talking about? Not all ftdi dongles are wired like this = there is no universal default setting suitable for all dongles. Uhm, I read bad at 3am :-) You told that not always setting Hi-Z on FT

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-08 Thread Andreas Fritiofson
On Tue, Jun 7, 2011 at 5:19 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: I suggest to drop this patch and merge a simpler fix for the problem adressed by this patch. Only a few lines of code would need to change. Attached is such a patch. The benefit over Tomek's patch is that

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-08 Thread Øyvind Harboe
To me this patch looks good. Any objections? Nit, the construct below is a little bit fancy. I'd prefer splitting it over multiple lines to make it more accessible to the casual reader. In terms of splitting this patch up, it might be possible to move the ft2232_quit() fn first, but the patch is

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-08 Thread Peter Stuge
Øyvind Harboe wrote: Nit, the construct below is a little bit fancy. I'd prefer splitting it over multiple lines to make it more accessible to the casual reader. Or just use goto, please, which is clear, simple, well understood, and elegant all at once. :) //Peter

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Laurent Gauch
Hi Michael, Am 06/06/2011 02:10 PM, schrieb Laurent Gauch: / Yes, this is to decouple the open and init (open the handle, init // the associated specific layout). / Is there case where open is used without init, or init without open? Actually no. But in the ft2232.c we could have the

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Laurent Gauch
Hi Tomek, First, thank you for giving objective comments on the patch. Much appreciated from you. (Much better than the Student code galore from Peter) Hello Laurent, Sorry if my comment seems not meritoric, I am not mentioning about coding style because this leaves a lot to tell in case of

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Laurent Gauch
/ Please just use goto to handle errors. // // /*When we talk coding style with students, the first comment I have is : // DO NEVER USE GOTO STATEMENT BUT USE IF ELSE IF ... / I'm afraid that's not only doing your students a disservice, but also their future employers. Sorry, but I prefer

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Laurent Gauch
Hi Andreas, Thank you for your comment. It doesn't build. Leftover variable no longer used. minor issue Apart from that it seems OK from my limited review. I could agree with the others that it looks like a needlessly complex fix for a simple missing free. Maybe there's a bigger picture here

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Peter Stuge
Laurent Gauch wrote: First, thank you for giving objective comments on the patch. Much appreciated from you. (Much better than the Student code galore from Peter) I imagine that Tomek spent a fair bit of time writing up his comments in such a clear way. I did not spend as much time writing my

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Andreas Fritiofson
On Tue, Jun 7, 2011 at 2:37 PM, Laurent Gauch laurent.ga...@amontec.comwrote: Hi Andreas, Thank you for your comment. It doesn't build. Leftover variable no longer used. minor issue Apart from that it seems OK from my limited review. I could agree with the others that it looks like a

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Tomek CEDRO
Hello all! :-) From all of the above posts Laurent it looks that you are trying to do the TRANSPORT job. Please take a look at transport infrastructure. The interface simply needs to be available for other things to work, so there is no point in having handle ready with unusable interface. I can

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-07 Thread Michael Schwingen
Am 06/07/2011 11:23 AM, schrieb Laurent Gauch: Hi Michael, Am 06/06/2011 02:10 PM, schrieb Laurent Gauch: / Yes, this is to decouple the open and init (open the handle, init // the associated specific layout). / Is there case where open is used without init, or init without open?

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Laurent Gauch
Hello again :-) I have reviewed the patch. The old source code had 3 functions ft2232_init() that can call ft2232_init_libftdi() or ft2232_init_ftd2xx() depending on a ft2232 ftdi communication library available. This is pretty simple and coherent. Yes simple, but bugged !!! The new

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Laurent Gauch
Tomek CEDRO wrote: / The new source code (after patching) have 6 functions doing almost // the same: ft2232_init_ftd2xx(), ft2232_open_ftd2xx(), // ft2232_init_libftdi(), ft2232_open_libftdi(), ft2232_init_sub(void), // ft2232_init() and the header update ;-) / Student code galore. Did

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Laurent Gauch
On Wed, Jun 1, 2011 at 9:23 PM, Peter Stuge peter at stuge.se https://lists.berlios.de/mailman/listinfo/openocd-development wrote: / Indeed what you get with good use of goto. The rule is basically to // only goto in the forward direction within a function. It's very // simple, and it can make

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Øyvind Harboe
Is this patch ready to be committed? Any objections? -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Peter Stuge
Laurent Gauch wrote: Please just use goto to handle errors. /*When we talk coding style with students, the first comment I have is : DO NEVER USE GOTO STATEMENT BUT USE IF ELSE IF ... I'm afraid that's not only doing your students a disservice, but also their future employers. Sometimes

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Peter Stuge
Laurent Gauch wrote: out - of - topic. Sorry, but please comment the patch instead to talk about coding style, or please start a new thread. It is not off topic just because you think so. This discussion is a direct result of the patch that was sent, and it should be clear from the comments

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 3:35 PM, Øyvind Harboe oyvind.har...@zylin.comwrote: Is this patch ready to be committed? Any objections? It doesn't build. Leftover variable no longer used. Apart from that it seems OK from my limited review. I could agree with the others that it looks like a

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Tomek CEDRO
Hello Laurent, Sorry if my comment seems not meritoric, I am not mentioning about coding style because this leaves a lot to tell in case of all program source tree. I am not advanced OpenOCD developer, I am learning code internals for some time and I have some grasp on it already (enough to

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-06 Thread Michael Schwingen
Am 06/06/2011 02:10 PM, schrieb Laurent Gauch: Yes, this is to decouple the open and init (open the handle, init the associated specific layout). Is there case where open is used without init, or init without open? Otherwise, this is just unnecessarily complex. (more smaller function ...

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-03 Thread Drasko DRASKOVIC
On Wed, Jun 1, 2011 at 9:23 PM, Peter Stuge pe...@stuge.se wrote: Indeed what you get with good use of goto. The rule is basically to only goto in the forward direction within a function. It's very simple, and it can make code *tremendously* more readable. int thing(params) {  if (error)    

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Øyvind Harboe
Hi Tomek, I haven't read over this patch. Do you think it is ready or does it need work? -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Tomek CEDRO
On Wed, Jun 1, 2011 at 3:06 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: I haven't read over this patch. Do you think it is ready or does it need work? Hello :-) For me lots of things should be changed/reorganized anyway so I don't really want to interfere at this stage until I know I have

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Tomek CEDRO
Hello again :-) I have reviewed the patch. The old source code had 3 functions ft2232_init() that can call ft2232_init_libftdi() or ft2232_init_ftd2xx() depending on a ft2232 ftdi communication library available. This is pretty simple and coherent. The new source code (after patching) have 6

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Peter Stuge
Tomek CEDRO wrote: The new source code (after patching) have 6 functions doing almost the same: ft2232_init_ftd2xx(), ft2232_open_ftd2xx(), ft2232_init_libftdi(), ft2232_open_libftdi(), ft2232_init_sub(void), ft2232_init() and the header update ;-) Student code galore. I can understand

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Tomek CEDRO
On Wed, Jun 1, 2011 at 7:05 PM, Peter Stuge pe...@stuge.se wrote: Please just use goto to handle errors. goto hell ;-) God function looks like: input o---[function]---o output no other :-) no gotos :-) no globals :-) nice program flow :-) clean and self commentary code :-) good vibration :-)

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-06-01 Thread Peter Stuge
Tomek CEDRO wrote: Please just use goto to handle errors. goto hell ;-) God function looks like: input o---[function]---o output Agree. no other :-) no gotos :-) no globals :-) nice program flow :-) clean and self commentary code :-) good vibration :-) :-) Indeed what you get with

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-05-31 Thread Sébastien Farquet
On Mon, 30 May 2011 12:51:56 +, Tomek CEDRO wrote: Hello Sebastien, Hello Tomek, On Mon, 30 May 2011 12:51:56 +, Tomek CEDRO wrote: Please stay to your convention and use open to open functionality and init to init functionality - this is very good idea and used in transport layer

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-05-31 Thread Tomek CEDRO
Uhm, ok then if it was like this. Anyway init for the interface or transport that does not do init but verify/interrogate/start sounds strange for me anyway. open and init sounds better :-) Maybe init and start would be even more unabiguous? But thats for future.. :-) -- CeDeROM, SQ7MHZ,

[Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-05-30 Thread Sébastien Farquet
Hello, The end goal it's to have a safe state of the used JTAG adapter at the end of the executable file. With this patch = Fix: Correctly exit function: ft2232_init when an error occurred I wish correct the status at the end of ft2232_init function when an error occured. At this moment, in

Re: [Openocd-development] Outstanding patches = Fix: Correctly exit function: ft2232_init when an error occurred

2011-05-30 Thread Tomek CEDRO
Hello Sebastien, Please stay to your convention and use open to open functionality and init to init functionality - this is very good idea and used in transport layer (select, then init), but there is select instead of open, so maybe we should change all names to open..? Using init_sub brings

Re: [Openocd-development] Outstanding patches

2011-05-21 Thread Tomek CEDRO
On Wed, May 18, 2011 at 8:52 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: The position of a release master is open. Nobody has stepped up. The build scripts are there. David Brownell did 0.4. We're pretty much ready to cut 0.5 and could probably cut a release per quarter. Maybe 0.4.x

Re: [Openocd-development] Outstanding patches

2011-05-21 Thread Øyvind Harboe
On Sat, May 21, 2011 at 10:58 AM, Tomek CEDRO tomek.ce...@gmail.com wrote: On Wed, May 18, 2011 at 8:52 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: The position of a release master is open. Nobody has stepped up. The build scripts are there. David Brownell did 0.4. We're pretty much

Re: [Openocd-development] Outstanding patches

2011-05-21 Thread Tomek CEDRO
On Sat, May 21, 2011 at 10:22 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: For now we just continue to make incremental improvements to openocd as they arrive. If good patches for swd or general refactoring, rinsing and general cleanup, backed by someone who's willing to do work to

Re: [Openocd-development] Outstanding patches

2011-05-18 Thread Luca Bruno
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Øyvind Harboe scrisse: Are there any outstanding patches currently that are ready to be committed? Speaking of which, I'd like to hear some bits about current status. Looking at the press, latest release has been more than a year ago (4.0 on Feb

Re: [Openocd-development] Outstanding patches

2011-05-18 Thread Øyvind Harboe
The position of a release master is open. Nobody has stepped up. The build scripts are there. David Brownell did 0.4. We're pretty much ready to cut 0.5 and could probably cut a release per quarter. -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 /

Re: [Openocd-development] Outstanding patches

2011-05-18 Thread Xiaofan Chen
On Wed, May 18, 2011 at 4:52 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: The position of a release master is open. Nobody has stepped up. You? :-) The build scripts are there. David Brownell did 0.4. We're pretty much ready to cut 0.5 and could probably cut a release per quarter. That

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Laurent Gauch
Yes, there are patches. Please merge the Sebastien's patch. Now about 4-weeks this patch wait to be merged. Laurent ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Øyvind Harboe
Please repost the patch. -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer ___

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Laurent Gauch
Øyvind Harboe wrote: Please repost the patch. https://lists.berlios.de/pipermail/openocd-development/2011-April/018780.html Merge it ! ___ Openocd-development mailing list Openocd-development@lists.berlios.de

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Øyvind Harboe
Loose the attitude. On Mon, May 16, 2011 at 9:14 AM, Laurent Gauch laurent.ga...@amontec.com wrote: Øyvind Harboe wrote: Please repost the patch. https://lists.berlios.de/pipermail/openocd-development/2011-April/018780.html Merge it ! -- Øyvind Harboe Can Zylin Consulting help on

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Laurent Gauch
Øyvind Harboe wrote: Loose the attitude. What ? On Mon, May 16, 2011 at 9:14 AM, Laurent Gauch laurent.ga...@amontec.com wrote: Øyvind Harboe wrote: Please repost the patch. https://lists.berlios.de/pipermail/openocd-development/2011-April/018780.html Merge it !

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Laurent Gauch
Øyvind Harboe wrote: https://lists.berlios.de/pipermail/openocd-development/2011-April/018780.html I see that this is not actually formulated as sequence of git patches. Please formulate it as a patch and repost it. That will improve your chances of a review.

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Øyvind Harboe
One thing that would help greatly for someone wanting to review your patch is that you wrote it as a full, normal git patch with a comment. The post does not actually have a comment to go along with the patch and it is not a git patch. git add . git commit write comment... git format-patch

Re: [Openocd-development] Outstanding patches

2011-05-16 Thread Tomek CEDRO
On Mon, May 16, 2011 at 8:32 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: One thing that would help greatly for someone wanting to review your patch is that you wrote it as a full, normal git patch with a comment. Totally agree that there should be some systematic approach to development

[Openocd-development] Outstanding patches

2011-05-14 Thread Øyvind Harboe
Are there any outstanding patches currently that are ready to be committed? -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434 / International +47 51 87 40 27 http://www.zylin.com/zy1000.html ARM7 ARM9 ARM11 XScale Cortex JTAG debugger and flash programmer

[Openocd-development] Outstanding patches

2010-05-11 Thread Øyvind Harboe
Does anyone have patches or fixes that haven't made it into the repository yet? We rely on patch submitters to follow up on patches to make sure that they are not lost Please nag! :-) Does anyone know of modified versions of OpenOCD out there that it would be a good idea to have merged? --