Re: [Openocd-development] CFI Flash write failing

2011-06-06 Thread Spencer Oliver
On 06/06/2011 18:00, Mahavir Jain wrote: Hi, I am trying to program STM3210e-eval board with external CFI flash of 16MiB (sector size 128KiB) using openocd from latest git master branch. I am not able to write to flash getting following error, flash write_bank 1 /tmp/helloworld_flash.bin 0 fl

Re: [Openocd-development] Cortex-M0 support ?

2011-06-06 Thread Tomek CEDRO
On Mon, Jun 6, 2011 at 3:39 PM, Freddie Chopin wrote: > OpenOCD currently does not support SWD (only JTAG), thus it cannot support > Cortex-M0. I don't know the status of SWD work - I haven't followed it for > some time. Work in progress, almost ready, still fixing stuff, should send patches soon

Re: [Openocd-development] OpenOCD and PIC32MX795F512H- how?

2011-06-06 Thread Spencer Oliver
On 06/06/2011 12:01, Mateusz Baran wrote: Hello! I trying program PIC32 by openOCD 0.5.0 and jtagkey but i have some problem:/ I run openOCD: openocd.exe -f interface/jtagkey.cfg -f target/pic32mx.cfg and that is effect: http://obrazki.elektroda.pl/1329039700_1306928501.jpg Info: JTAG Tap: pic3

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Tomek CEDRO
On Mon, Jun 6, 2011 at 11:44 AM, Laurent Gauch wrote: > If our ft2232.c patches are not merged quickly, Amontec Team will certainly > come with a new specific jtagkey.c API driver  instead of the ft2232.c JTAG > driver. > The advantage with a specific Amontec JTAGkey API driver in openocd, will be

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] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Michael Schwingen
Am 06/06/2011 01:44 PM, schrieb Laurent Gauch: > > If our ft2232.c patches are not merged quickly, Amontec Team will > certainly come with a new specific jtagkey.c API driver instead of > the ft2232.c JTAG driver. > The advantage with a specific Amontec JTAGkey API driver in openocd, > will be to

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 recogn

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 wrote: > 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 needlessly complex fix for

Re: [Openocd-development] Cortex-M0 support ?

2011-06-06 Thread Freddie Chopin
On 2011-06-06 14:17, Jonathan Dumaresq wrote: I wonder if openOCD have support for Cortex-M0 ? We just started working with NXP devices and I don’t see any support for the M0 in the Openocd script file… OpenOCD currently does not support SWD (only JTAG), thus it cannot support Cortex-M0. I don

Re: [Openocd-development] OpenOCD and PIC32MX795F512H- how?

2011-06-06 Thread Freddie Chopin
Hi! New version of OpenOCD should be available on my website soon - we just have to get rid of some compilation errors... https://lists.berlios.de/pipermail/openocd-development/2011-June/019260.html 4\/3!! ___ Openocd-development mailing list Openoc

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 commen

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. > Someti

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 Laurent Gauch
On Wed, Jun 1, 2011 at 9:23 PM, Peter Stuge 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 code *tremendou

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

[Openocd-development] Cortex-M0 support ?

2011-06-06 Thread Jonathan Dumaresq
Hi all, I wonder if openOCD have support for Cortex-M0 ? We just started working with NXP devices and I don't see any support for the M0 in the Openocd script file. Regards Jonathan ___ Openocd-development mailing list Openocd-development@li

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 sourc

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Laurent Gauch
On Mon, Jun 6, 2011 at 9:32 AM, Michael Schwingen https://lists.berlios.de/mailman/listinfo/openocd-development>> wrote: >/ Am 06/06/2011 09:20 AM, schrieb Yegor Yefremov: />>/ Signed-off-by: Yegor Yefremov https://lists.berlios.de/mailman/listinfo/openocd-development>> />>/ />>/ --- />>/ tcl/in

[Openocd-development] OpenOCD and PIC32MX795F512H- how?

2011-06-06 Thread Mateusz Baran
Hello! I trying program PIC32 by openOCD 0.5.0 and jtagkey but i have some problem:/ I run openOCD: openocd.exe -f interface/jtagkey.cfg -f target/pic32mx.cfg and that is effect: http://obrazki.elektroda.pl/1329039700_1306928501.jpg Info: JTAG Tap: pic32mx.cpu tap/device found: 0x0430e053 part

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Laurent Charpentier
I also added the STM3220G-EVAL configuration file to "tcl/board/stm3220g_eval.cfg" # STM3220G-EVAL: This is an STM32F2 eval board with a single STM32F207IGT6 # (128KB) chip. # http://www.st.com/internet/evalboard/product/250374.jsp # increase working area to 128KB set WORKAREASIZE

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Øyvind Harboe
On Mon, Jun 6, 2011 at 11:40 AM, Andreas Fritiofson wrote: > > > On Mon, Jun 6, 2011 at 11:23 AM, Øyvind Harboe > wrote: >> >> To create a patch: >> >> git add tcl/tcl/target/stm32f2xxx.cfg > > > Another minor thing I noticed now, why three x in the file name? And in the > flash driver too it see

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Laurent Charpentier
I added the tcl/target/stm32f2xxx.cfg file. I changed the 128KB RAM size to 64KB according to Andreas' note. L. ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Laurent Charpentier
Andreas,STM32F2 is referenced as "stm32f2xxx" (3 Xs) in the openocd project (don't ask me why :). for example:./src/flash/nor/stm32f2xxx.c./contrib/loaders/flash/stm32f2xxx.S To make it consistent I kept the 3 Xs.Laurent --- On Mon, 6/6/11, Andreas Fritiofson wrote: From: Andreas Fritiofson Su

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 11:23 AM, Øyvind Harboe wrote: > To create a patch: > > git add tcl/tcl/target/stm32f2xxx.cfg > Another minor thing I noticed now, why three x in the file name? And in the flash driver too it seems? Shouldn't it be stm32f2xx? (also, to avoid confusion, I'll just point out

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Øyvind Harboe
To create a patch: git add tcl/tcl/target/stm32f2xxx.cfg git commit => write something like: stm32f2xxx: config file yyy git format-patch HEAD^ Remove the below, it's just copy and paste junk. > # For more information about the configuration files, take a look at: > # openocd.texi -- Øyv

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 11:10 AM, Laurent Charpentier wrote: > Hi, > We would like to add the configuration file for the stm32f2xxx to the GIT > repository. > Here is the file (should be named openocd/tcl/target/stm32f2xxx.cfg ) > Thanks for adding this file. > Laurent A patch is generally prefe

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Øyvind Harboe
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 ___ Openocd-dev

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 10:11 AM, Yegor Yefremov wrote: > > The only question is, what description has jtagkey-tiny "Amontec > JTAGkey" or "Amontec JTAGkey-tiny"? > > My JTAGkey Tiny uses the string "Amontec JTAGkey" and indeed it works with the jtagkey.cfg. Please also note that the means to match

[Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Laurent Charpentier
Hi, We would like to add the configuration file for the stm32f2xxx to the GIT repository. Here is the file (should be named openocd/tcl/target/stm32f2xxx.cfg ) Thanks for adding this file. Laurent -- # script for stm32f2xxx if { [info exists CHIPNAME] } { set _CHIPNAME $CHIPNAME

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Tomek CEDRO
On Mon, Jun 6, 2011 at 8:11 AM, Yegor Yefremov wrote: > I see your point. This won't function because > ftdi_usb_open_desc_index() makes strncmp() and the strings won't > match. So the patch was wrong. Sorry for the noise. I think recently I have tried to use JTAGkey2 configuration to JTAGkey2P d

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Yegor Yefremov
On Mon, Jun 6, 2011 at 9:32 AM, Michael Schwingen wrote: > Am 06/06/2011 09:20 AM, schrieb Yegor Yefremov: >> Signed-off-by: Yegor Yefremov >> >> --- >>  tcl/interface/jtagkey2.cfg  |    7 ++- >>  tcl/interface/jtagkey2p.cfg |    7 ++- >>  2 files changed, 4 insertions(+), 10 deletions(-)

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Michael Schwingen
Am 06/06/2011 09:20 AM, schrieb Yegor Yefremov: > Signed-off-by: Yegor Yefremov > > --- > tcl/interface/jtagkey2.cfg |7 ++- > tcl/interface/jtagkey2p.cfg |7 ++- > 2 files changed, 4 insertions(+), 10 deletions(-) > > Index: b/tcl/interface/jtagkey2.cfg > ===

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Yegor Yefremov
On Mon, Jun 6, 2011 at 9:27 AM, Øyvind Harboe wrote: > On Mon, Jun 6, 2011 at 9:24 AM, Yegor Yefremov > wrote: >>> Any objections? >> >> Another option were to remove all jtagkey configuration files and >> leave the jtagkey.cfg only. > > The description is different... Do you mean ft2232_device_

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Øyvind Harboe
On Mon, Jun 6, 2011 at 9:24 AM, Yegor Yefremov wrote: >> Any objections? > > Another option were to remove all jtagkey configuration files and > leave the jtagkey.cfg only. The description is different... -- Øyvind Harboe Can Zylin Consulting help on your project? US toll free 1-866-980-3434

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Yegor Yefremov
> Any objections? Another option were to remove all jtagkey configuration files and leave the jtagkey.cfg only. Yegor ___ Openocd-development mailing list Openocd-development@lists.berlios.de https://lists.berlios.de/mailman/listinfo/openocd-development

Re: [Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Øyvind Harboe
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 ___ Openocd-deve

[Openocd-development] [PATCH] use one configuration for all JTAGkey devices.

2011-06-06 Thread Yegor Yefremov
Signed-off-by: Yegor Yefremov --- tcl/interface/jtagkey2.cfg |7 ++- tcl/interface/jtagkey2p.cfg |7 ++- 2 files changed, 4 insertions(+), 10 deletions(-) Index: b/tcl/interface/jtagkey2.cfg === --- a/tcl/interface