Re: [Openocd-development] Serial Wire Debug experiment

2008-11-25 Thread Andreas Fritiofson
The main motivation for choosing it over jtag is probably using less pins, as simple as that. There's no gain in debug functionality. Well, if you're not counting the serial wire viewer, which I'm not sure is a part of swd. But I believe it's often using a pin otherwise allocated the jtag

Re: [Openocd-development] fix ancient bug SEGFAULT in irscan

2009-05-12 Thread Andreas Fritiofson
On Tue, May 12, 2009 at 8:18 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I couldn't believe my eyes when I saw what the bug was. irscan has *always* been broken. I checked as far back as svn 345. A couple of possible explanations: - irscan has never really been used - events have

Re: [Openocd-development] [patch 2/2] thumb2 disassembly for Load halfword

2009-07-23 Thread Andreas Fritiofson
I noticed there are a few checks for (rt == 0xf) even though that case is handled with an early return at the top of the function. Maybe those checks should just go? /Andreas Index: src/target/arm_disassembler.c === ---

Re: [Openocd-development] Slowly moving from 8 to 32 bit words in jtag_add_xxx API

2009-11-19 Thread Andreas Fritiofson
On Thu, Nov 19, 2009 at 1:03 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: Was this for the list? Yeah it was, that Reply-to-all button seems to be hard to find sometimes. On Thu, Nov 19, 2009 at 12:34 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Wed, Nov 18, 2009 at 9

[Openocd-development] [PATCH 0/3] improve default script search path

2009-11-21 Thread Andreas Fritiofson
This series improves the default script search path to include $HOME/.openocd. It also updates the search path on Windows to match what appears to be the result of a standard 'configure make make install' in one particular MSYS environment. Other environments have not been tested, but the

[Openocd-development] [PATCH 2/3] update win32 script search path

2009-11-21 Thread Andreas Fritiofson
the search path to ../share/openocd/scripts instead of ../lib/openocd, relative the openocd executable. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/helper/options.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/helper/options.c b/src

[Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/helper/options.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git

[Openocd-development] [PATCH 1/3] show script search dirs in debug log

2009-11-21 Thread Andreas Fritiofson
Add this to ease debugging why the standard scripts aren't found on the default script search path in some build/install enviroments. Especially on Windows it's not straight forward where openocd actually looks for the scripts. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: On Sat, 2009-11-21 at 16:53 +0100, Andreas Fritiofson wrote: Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Comments are in-line and at the end

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
On Sat, Nov 21, 2009 at 9:31 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sat, Nov 21, 2009 at 7:14 PM, Zach Welch z...@superlucidity.net wrote: PATH_MAX should be defined and available (in limits.h).  Use it. Why not just allocate dynamically and avoid the problem at the root? That

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
00:00:00 2001 From: Andreas Fritiofson andreas.fritiof...@gmail.com Date: Thu, 19 Nov 2009 23:58:15 +0100 Subject: [PATCH 2/2] support for scripts in $HOME/.openocd Add $HOME/.openocd as the first default script search directory, allowing the user to override the standard scripts. Signed-off

[Openocd-development] [PATCH 2/2] support for scripts in $HOME/.openocd

2009-11-21 Thread Andreas Fritiofson
. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- NEWS |1 + doc/openocd.texi | 22 ++ src/helper/options.c | 13 - 3 files changed, 27 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 1a024e4..0dcc4bc 100644

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-22 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 9:51 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: Do not use variable length arrays. Use malloc(). If you use variable length arrays on the stack that messes with embedded / uCLinux hosts. Only if the embedded host uses a home directory path longer than what will

Re: [Openocd-development] Document build broken when src != build

2009-11-22 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 10:17 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I can no longer build docs when src != build. I believe this is trivially reproducible and that the breakage is relatively recent(a month or so). Or... perhaps I'm missing some tool on my laptop? make docs make

Re: [Openocd-development] [PATCH 3/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Andreas Fritiofson
On Sun, Nov 22, 2009 at 12:42 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Sun, Nov 22, 2009 at 11:04 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Sun, Nov 22, 2009 at 9:51 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: Do not use variable length arrays. Use malloc

[Openocd-development] [PATCH 2/3] support for scripts in $HOME/.openocd

2009-11-23 Thread Andreas Fritiofson
. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- NEWS |1 + doc/openocd.texi | 22 ++ src/helper/options.c | 15 ++- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index 1a024e4..0dcc4bc 100644

[Openocd-development] [PATCH] improve alloc_vprintf

2009-11-23 Thread Andreas Fritiofson
for small ones. A quirk that has been retained is that some callers patch in a newline at the end of the returned string and depend on alloc_vprintf to allocate at least one byte extra. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/helper/log.c | 43

[Openocd-development] [PATCH] improve alloc_vprintf

2009-11-24 Thread Andreas Fritiofson
for small ones. A quirk that has been retained is that some callers patch in a newline at the end of the returned string and depend on alloc_vprintf to allocate at least one byte extra. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- This time without the copy/paste error. Thanks

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 10:17 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 09:45 +0100, Øyvind Harboe wrote: Hm - I'm with David here: I am

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 10:25 +0100, Øyvind Harboe wrote: On Tue, Dec 1, 2009 at 10

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 11:08 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 21:57 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 10:32 AM, Zach Welch z...@superlucidity.net wrote

Re: [Openocd-development] [PATCH 2/4] produce stack traces on segfaults

2009-12-01 Thread Andreas Fritiofson
On Tue, Dec 1, 2009 at 11:50 PM, Zach Welch z...@superlucidity.net wrote: On Tue, 2009-12-01 at 23:09 +0100, Andreas Fritiofson wrote: On Tue, Dec 1, 2009 at 11:08 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Tue, Dec 1, 2009 at 10:23 PM, Zach Welch z...@superlucidity.net

Re: [Openocd-development] [PATCH 2/3] update win32 script search path

2010-01-14 Thread Andreas Fritiofson
Any comments on this? I had hoped to get this functional in 0.4 so I could drop the -s from the command line at work. Windows builders/packagers, does this look OK from your point of view or do you still install scripts in ../lib? ___

Re: [Openocd-development] [PATCH 2/3] update win32 script search path

2010-01-19 Thread Andreas Fritiofson
this? Regards, Andreas 2010/1/16 Andreas Fritiofson andreas.fritiof...@gmail.com: 2010/1/15  freddie_cho...@op.pl: Użytkownik  oyvind.har...@zylin.com napisał: I find it odd that none has. Personally I don't know what is the point of that patch. I don't use OpenOCD via tree of MinGW/MSYS and I

Re: [Openocd-development] post 0.4 memory map features

2010-01-20 Thread Andreas Fritiofson
On Wed, Jan 20, 2010 at 8:40 AM, David Brownell davi...@pacbell.net wrote: On Tuesday 19 January 2010, Øyvind Harboe wrote: New thread on new features to gdb memory maps. Not sure what you mean by caching ... if the CPU is running, we can't assume it's not going to touch such areas. We

Re: [Openocd-development] Other compilers

2010-01-29 Thread Andreas Fritiofson
This would help to avoid picking a magic value for true. #define false 0 #define true (!false) // this will actually evaluate to 1 On the other hand, code that relies on specific values for true is IMHO buggy or at least error prone (especially if true == -1!!), which implies that the define

Re: [Openocd-development] Other compilers

2010-01-29 Thread Andreas Fritiofson
On Fri, Jan 29, 2010 at 7:11 PM, Michael Schwingen rincew...@discworld.dascon.de wrote: Andreas Fritiofson wrote: This would help to avoid picking a magic value for true. #define false 0 #define true (!false) // this will actually evaluate to 1 IMHO, this is unnecessary obfuscation. The C

[Openocd-development] [PATCH] stm32x: allow flash probe on a running target

2010-04-16 Thread Andreas Fritiofson
connecting to a running target. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/flash/nor/stm32x.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/src/flash/nor/stm32x.c b/src/flash/nor/stm32x.c index 845d589..818c474 100644 --- a/src/flash/nor

Re: [Openocd-development] [PATCH] stm32x: allow flash probe on a running target

2010-04-17 Thread Andreas Fritiofson
On Sat, Apr 17, 2010 at 9:40 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: You have found an interesting case here indeed. As a principle it should be possible to connect via GDB regardless of the target state. Since that state, in general, can include a case where the target's flash is

Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread Andreas Fritiofson
On Tue, Apr 20, 2010 at 2:22 AM, JY Koh ko...@uni-inc.co.kr wrote: Hi All, I have a STM32F103ZE custom board. I have been using OpenOCD with Amontec JTAGkey2 for debugging. It works fine when I use internal SRAM (64K) as workspace. In order to run a little big program I add external

Re: [Openocd-development] [PATCH] stm32x: allow flash probe on a running target

2010-04-20 Thread Andreas Fritiofson
On Tue, Apr 20, 2010 at 9:08 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: I've updated the documentation on the gdb-attach event to provide an alternate way to solve this issue. Great! And there's the target event list that I was briefly searching for. Good to know there is one. Freddie,

Re: [Openocd-development] I'd like to change the workspace from 0x2000000 to 0x6000000 of stm32.cfg

2010-04-20 Thread Andreas Fritiofson
On Tue, Apr 20, 2010 at 1:10 PM, JY Koh ko...@uni-inc.co.kr wrote: Hi Andreas Thanks a lot. My board has Ethernet and LCD interface so that my program is too big to be accommodated into internal SRAM. For this reason, I added external SRAM (1M Bytes) and I'd like to run my program here.

Re: [Openocd-development] Bugfix for flash write_image

2010-05-04 Thread Andreas Fritiofson
On Thu, Apr 29, 2010 at 3:59 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: Why hasn't anybody complained yet that flash write_image erase will fail for elf images that are not aligned to sectors??? Unlocking is automatically aligned to sectors in this case... I'll be committing this

Re: [Openocd-development] STM32 JTAG-DP STICKY ERROR

2010-05-31 Thread Andreas Fritiofson
On Mon, May 31, 2010 at 3:13 PM, Kenan Özdemir gla...@hotmail.de wrote: Hi Guys, I have the following problem.. Each time I try to Debug I got this Error Message it is out of my logfile.. Debug: 3397 39766 arm_adi_v5.c:335 jtagdp_transaction_endcheck(): jtag-dp: CTRL/STAT error, 0xf021

Re: [Openocd-development] STM32 JTAG-DP STICKY ERROR

2010-05-31 Thread Andreas Fritiofson
On Mon, May 31, 2010 at 10:35 PM, Freddie Chopin freddie_cho...@op.pl wrote: On 2010-05-31 21:59, Andreas Fritiofson wrote: Also, I believe a second 'reset init' is needed right after the load in order to update the initial SP and PC from the newly loaded image. It's not. Then what sets

Re: [Openocd-development] STM32 JTAG-DP STICKY ERROR

2010-05-31 Thread Andreas Fritiofson
On Mon, May 31, 2010 at 10:43 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Mon, May 31, 2010 at 10:35 PM, Freddie Chopin freddie_cho...@op.pl wrote: On 2010-05-31 21:59, Andreas Fritiofson wrote: Also, I believe a second 'reset init' is needed right after the load in order

Re: [Openocd-development] STM32 JTAG-DP STICKY ERROR

2010-06-01 Thread Andreas Fritiofson
On Tue, Jun 1, 2010 at 5:01 PM, Kenan Özdemir gla...@hotmail.de wrote: This is only a part of the logfile.. I got more error messages like that, and each time I got also a SIGINT signal while debugging.. So how would you recommend me to solve that problem? Is it maybe the linker script where I

Re: [Openocd-development] [PATCH] stm32 : improve unlock procedure for mass_erase

2010-06-01 Thread Andreas Fritiofson
On Tue, Jun 1, 2010 at 1:56 PM, gcembed gcem...@gmail.com wrote: Hello, I have added a new command for stm32x : mass_erase_unlock This function combine stm32x unlock 0 + reset to apply unlock + stm32x mass_erase 0 In this way, it is more easier to handle the unlock sequence and makes the

Re: [Openocd-development] STM32 JTAG-DP STICKY ERROR

2010-06-07 Thread Andreas Fritiofson
On Mon, Jun 7, 2010 at 5:21 PM, Kenan Özdemir gla...@hotmail.de wrote: I figured out, that the SIGINT signal was caused by an string function. There is a memset in the tskTCB *prvAllocateTCBAndStack(...) function in task.c and if I comment it the problem is solved.. till the next SIGINT is

Re: [Openocd-development] -Wshadow fixes

2010-06-15 Thread Andreas Fritiofson
On Tue, Jun 15, 2010 at 11:13 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: As you have noticed I'm pushing a number of -Wshadow warning fixes. Most of these should be trivial, but there is of course a chance that I screw this up as I have only done compile tests for most. This is a bit

Re: [Openocd-development] [PATCH] don't print Jim stacktrace

2010-06-16 Thread Andreas Fritiofson
On Thu, Jun 17, 2010 at 12:30 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Wed, Jun 16, 2010 at 11:40 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: The stack trace provides no valuable information to the user for interactive commands. What about nested proc's? You mean

Re: [Openocd-development] [PATCH] don't print Jim stacktrace

2010-06-17 Thread Andreas Fritiofson
On Thu, Jun 17, 2010 at 7:24 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Thu, Jun 17, 2010 at 2:05 AM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Thu, Jun 17, 2010 at 12:30 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: On Wed, Jun 16, 2010 at 11:40 PM, Andreas

[Openocd-development] [PATCH] arm-jtag-ew: -Wshadow fix

2010-06-19 Thread Andreas Fritiofson
declaration of ‘index’ shadows a global declaration in /usr/include/string.h Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- I'm not convinced of the benefit of the warning in this case. A whole bunch of other warnings or error would catch the bug if the local variable index

Re: [Openocd-development] [PATCH] debug: debug entry error propagation

2010-07-19 Thread Andreas Fritiofson
Considering the huge number of identical if (retval != ERROR_OK) return retval; added in this and your other patches, maybe we should reuse the CHECK_RETVAL macro from arm11.h as a general mechanism to reduce the clutter? It may not be the best of practices to return from a macro, but rules are

Re: [Openocd-development] Error while debugging PXA271

2010-09-01 Thread Andreas Fritiofson
On Wed, Sep 1, 2010 at 10:17 AM, Nived nive...@gmail.com wrote: Hi, We have been trying to debug a .Net Microframework Port onto an IntelMote2 device running a PXA271 processor using openocd-ftd2xx.exe( Version: Open On-Chip Debugger 1.0 (2008-10-04-10:00)). I am able to step through the code

Re: [Openocd-development] Proposed change for STM32 Flash burner: at 0 as well as 0x8000000

2010-09-03 Thread Andreas Fritiofson
On Fri, Sep 3, 2010 at 9:29 PM, John Hartman (NoICE) j...@noicedebugger.com wrote: The STM32 parts have Flash beginning at 0x800, and OpenOCD's stm32x.c places the Flash there regardless of the address used in the flash command in the cfg file. The chips have two pins that can be jumpered

Re: [Openocd-development] Proposed change for STM32 Flash burner: at 0 as well as 0x8000000

2010-09-04 Thread Andreas Fritiofson
On Sat, Sep 4, 2010 at 2:57 PM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: Perhaps this is a thing that *should* be a bit hard? Perhaps embedded users *should* learn about the load offset for GDB? Do you know if gdb always sends an offset in the (binary?) command to OpenOCD? If

Re: [Openocd-development] Proposed change for STM32 Flash burner: at 0 as well as 0x8000000

2010-09-04 Thread Andreas Fritiofson
On Sat, Sep 4, 2010 at 7:31 PM, Peter Stuge pe...@stuge.se wrote: Andreas Fritiofson wrote: When gdb is asked to load an image it simply writes all relevant sections in that image to their respective memory locations. If it has knowledge that the location to be written resides in flash

Re: [Openocd-development] Message script openocd 0.4.0 windows for In Board flash programming.

2010-09-16 Thread Andreas Fritiofson
flash write_binary 0 BootLoader_108.bin 0x0 0: command requires more arguments There is no command with the name 'flash write_binary'. Perhaps you mean 'flash write_bank'? In that case, the extra zero on the end shouldn't be there. The error message is nonsense. help flash write_bank flash

Re: [Openocd-development] Is this STM32F100x errata sheet discovery the cause of my problems?

2010-10-04 Thread Andreas Fritiofson
On Mon, Oct 4, 2010 at 6:36 PM, n...@bike-nomad.com wrote: I've been trying to use OpenOCD with the STM32F100C4T6B, one of the new low density value line processors from STMicroelectronics. I haven't had too much success using it (not stopping at breakpoints, not noticing when it has

Re: [Openocd-development] STM32 flash write speed

2010-10-18 Thread Andreas Fritiofson
On Mon, Oct 18, 2010 at 7:15 PM, Freddie Chopin freddie_cho...@op.pl wrote: Hi! When I flash some big image (~128kB) on STM32 without any tricks: reset halt stm32x mass_erase flash write_image c:\\stm32.hex I achieve speeds of 12kB. JTAG frequency is 1MHz. When I use my reset init script

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

2010-10-19 Thread Andreas Fritiofson
On Mon, Oct 18, 2010 at 9:30 PM, Bernard Mentink bernard.ment...@trimble.co.nz wrote: On 2010-10-18 20:54, Bernard Mentink wrote: Well I have tried that, but I get this error from the GDB (DSF)Hardware debugger plugin for Eclipse: You need to select Standard GDB Hardware Debugging Launcher

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 bernard.ment...@trimble.co.nz 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

Re: [Openocd-development] Problems with workareasize and STM32F100 (8kB of RAM)

2010-10-28 Thread Andreas Fritiofson
On Wed, Oct 27, 2010 at 10:53 PM, Freddie Chopin freddie_cho...@op.pl wrote: Hi! Someone has asked me for help with using OpenOCD + STM32F100 (8kB of RAM). After some time I've come to conclusion that the problem was caused by incorrect workareasize value, which in stm32.cfg is defined to be

Re: [Openocd-development] STM32 core debug reset problem

2010-10-29 Thread Andreas Fritiofson
On Fri, Oct 29, 2010 at 8:58 PM, Chris Jones ch...@martin-jones.com wrote: Hi all, I'm using OpenOCD (version 0.4.0, downloaded from SourceForge and built about half an hour ago) on Debian Lenny (5.0, stable) running under VMWare Fusion on an x86 Mac Pro. The microcontroller I'm using is an

Re: [Openocd-development] STM32 core debug reset problem

2010-11-04 Thread Andreas Fritiofson
2010/10/31 Michel Catudal michelcatu...@gmail.com: Le 2010-10-29 19:15, Andreas Fritiofson a écrit : One can also ponder why you need debug access to something molded in plastic... Wouldn't it be better to debug your application on a more lab-friendly setup? A production unit

Re: [Openocd-development] STM32 core debug reset problem

2010-11-04 Thread Andreas Fritiofson
On Wed, Nov 3, 2010 at 10:01 AM, Chris Jones ch...@martin-jones.com wrote: I tried the IAR software but don't have a JTAG dongle directly compatible with it. I tried to get it to talk to OpenOCD via GDB but attempting to download the code to the STM32 that way just resulted in streams of

Re: [Openocd-development] Stm32 load elf file with gdb

2010-11-04 Thread Andreas Fritiofson
On Thu, Nov 4, 2010 at 2:46 PM, Jonathan dumaresq jdumar...@cimeq.qc.ca wrote: Hi all, I try to get my stm32 environnement working with gdb. I'm unable to get my elf file loaded with gdb. Here my setup: Openocd.cfg / source [find interface/olimex-arm-usb-ocd.cfg] source [find

Re: [Openocd-development] STM32 reset_config

2010-11-10 Thread Andreas Fritiofson
On Wed, Nov 10, 2010 at 6:50 PM, Freddie Chopin freddie_cho...@op.pl wrote: Hi! I've doubts about this commit http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=commit;h=85944d4144a1df0647e4324d1cf8ae9a276b70e5 Today I've noticed that resetting the chip with OpenOCD does

Re: [Openocd-development] STM32 reset_config

2010-11-10 Thread Andreas Fritiofson
On Wed, Nov 10, 2010 at 7:47 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Wed, Nov 10, 2010 at 6:50 PM, Freddie Chopin freddie_cho...@op.pl wrote: Hi! I've doubts about this commit http://openocd.git.sourceforge.net/git/gitweb.cgi?p=openocd/openocd;a=commit;h

Re: [Openocd-development] STM32 reset_config

2010-11-10 Thread Andreas Fritiofson
On Wed, Nov 10, 2010 at 10:15 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: Spencer Oliver s...@spen-soft.co.uk wrote: The default behaviour was changed to make it compatible with all cortex-m3 cores - will have to check but some stm32 and nxp parts had issues using SYSTEMRESET. I believe

[Openocd-development] [PATCH] httpd: fix build error with new Jim

2010-11-10 Thread Andreas Fritiofson
Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/server/httpd.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/server/httpd.c b/src/server/httpd.c index af8c3c8..42bba5b 100644 --- a/src/server/httpd.c +++ b/src/server/httpd.c @@ -84,7 +84,7

Re: [Openocd-development] [PATCH] httpd: fix build error with new Jim

2010-11-10 Thread Andreas Fritiofson
On Wed, Nov 10, 2010 at 11:42 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: I was actually pondering removing the httpd stuff from OpenOCD as we have the tcl server which is a good enough interface. I don't think the httpd server was ever used and OpenOCD's role seems to be more low level.

Re: [Openocd-development] STM32 reset_config

2010-11-11 Thread Andreas Fritiofson
On Wed, Nov 10, 2010 at 11:10 PM, David Brownell davi...@pacbell.net wrote: Today I've noticed that resetting the chip with OpenOCD does NOT reset peripheals (the chip is STM32F103RBT8), which IMO is not very good... Not all SoCs reset peripherals like that; don't assume they do.  

Re: [Openocd-development] [PATCH] Fix for segmentation fault from freed memory access in jtag_unregister_event_callback()

2010-12-10 Thread Andreas Fritiofson
On Fri, Dec 10, 2010 at 4:16 PM, Paul Richards paulr...@gmail.com wrote: On 2010/12/10 18:46, Spencer Oliver wrote: Not looked into it but why do we not just duplicate the existing unregister event/timer functions - or are they broken aswell? They (the target versions) don't appear to have

Re: [Openocd-development] [PATCH] Fix for segmentation fault from freed memory access in jtag_unregister_event_callback()

2010-12-10 Thread Andreas Fritiofson
On Fri, Dec 10, 2010 at 11:39 PM, Peter Stuge pe...@stuge.se wrote: Andreas Fritiofson wrote: Now there's 3 versions to choose from :-) It's not too late. The target versions seems nice and readable. And correct, as far as I can see this late hour. I think the jtag version should follow

Re: [Openocd-development] STM32, openocd and eCos

2010-12-12 Thread Andreas Fritiofson
On Sun, Dec 12, 2010 at 5:22 PM, Manuel Borchers man...@matronix.de wrote: Hi all, I'm a bit lost with a problem concerning OpenOCD, eCos and my STM32 board. I'm running with a ftdi2232-based usb2jtag adapter. I'm already using this adapter for quite a long time for my ARM9-based projects,

Re: [Openocd-development] STM32, openocd and eCos

2010-12-13 Thread Andreas Fritiofson
On Mon, Dec 13, 2010 at 10:16 AM, Spencer Oliver s...@spen-soft.co.uk wrote: On 13/12/2010 08:47, Manuel Borchers wrote: Hi Andreas, hi list, On Sun, 2010-12-12 at 21:12 +0100, Andreas Fritiofson wrote: It may be that the scheduler or the idle thread puts the core in low power mode

Re: [Openocd-development] Problem loading to CFI flash

2010-12-14 Thread Andreas Fritiofson
On Tue, Dec 14, 2010 at 7:26 PM, Jonathan dumaresq jdumar...@cimeq.qc.ca wrote:  Hi, I have pull the head branch of openocd and now I can write to the cfi at a slow speed. I want to modify openocd to use the asm code for the cortex. I have used the sample contrib file as starting point for

Re: [Openocd-development] Problem loading to CFI flash

2010-12-18 Thread Andreas Fritiofson
On Fri, Dec 17, 2010 at 4:36 PM, Jonathan dumaresq jdumar...@cimeq.qc.ca wrote: Hi all, Here my first patches to be able to use the CFI driver on cortex M3 with the helper code on target. This is probably not the better way of doing it, but at least it's work. This have been tested on real

Re: [Openocd-development] Help needed for SAM3S4C

2010-12-18 Thread Andreas Fritiofson
On Fri, Dec 17, 2010 at 6:27 PM, Kenan Özdemir gla...@hotmail.de wrote: Hi, i start working with the SAM3S4C, but having trouble with openOCD. When I start debugging, the very first instructions are working fine, but after the 3rd instruction, its jumping acrross the code. This is my

[Openocd-development] segfault in cortex_m3_assert_reset

2011-01-24 Thread Andreas Fritiofson
Hi all, Has anyone else problem with segfaults on current git? As soon as I issue a reset, openocd dies. This is with a STM32 target. Same result with both rlink and a jtagkey interface. Bisection was successful and pointed to commit '8f93c0a3... target: do not expose error numbers to users' by

[Openocd-development] [PATCH] fix segfault from stack corruption in ahbap_debugport_init

2011-01-24 Thread Andreas Fritiofson
that were actually executed. Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/target/arm_adi_v5.c |9 - 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/target/arm_adi_v5.c b/src/target/arm_adi_v5.c index 7df0d4f..7b801b9 100644 --- a/src/target

Re: [Openocd-development] segfault in cortex_m3_assert_reset

2011-01-25 Thread Andreas Fritiofson
to be error checked. Regards, Andreas On Tue, Jan 25, 2011 at 9:11 AM, Mathias K. kes...@freenet.de wrote: Hello, i had the same error a while ago. Try to clean your repository (make distclean) and recompile the source. Regards, Mathias Am 24.01.2011 23:08, schrieb Andreas Fritiofson: Hi

Re: [Openocd-development] [PATCH] mips target

2011-05-30 Thread Andreas Fritiofson
On Mon, May 30, 2011 at 7:10 PM, Drasko DRASKOVIC drasko.drasko...@gmail.com wrote: On Mon, May 30, 2011 at 5:47 PM, Mahr, Stefan stefan.m...@sphairon.com wrote: lead to the NULL pointer dereference in the time of jtag data scan execution (r is a automatic variable, local to the

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 yegorsli...@googlemail.comwrote: 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

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 11:10 AM, Laurent Charpentier laurent_p...@yahoo.com 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

Re: [Openocd-development] Configuration file for stm32f2xxx

2011-06-06 Thread Andreas Fritiofson
On Mon, Jun 6, 2011 at 11:23 AM, Øyvind Harboe oyvind.har...@zylin.comwrote: 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,

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

[Openocd-development] [PATCH] ft2232: fix memory leak in ft2232_large_scan()

2011-06-08 Thread Andreas Fritiofson
anywhere. Maybe the entire function is flawed, or is the data really supposed to be discarded? Signed-off-by: Andreas Fritiofson andreas.fritiof...@gmail.com --- src/jtag/drivers/ft2232.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/src/jtag/drivers/ft2232.c b

Re: [Openocd-development] [PATCH] ft2232: fix memory leak in ft2232_large_scan()

2011-06-09 Thread Andreas Fritiofson
On Thu, Jun 9, 2011 at 8:40 AM, Øyvind Harboe oyvind.har...@zylin.comwrote: Definitely! I'm holding off on this patch in favor of a patch that deletes cruft instead of decorating it :-) I have a soft spot for patches that delete code that nobody understands IF the function is

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] [PATCH 1/5] ft2232: Clean up infinite loop condition in ft2232_init()

2011-06-09 Thread Andreas Fritiofson
On Thu, Jun 9, 2011 at 12:12 PM, Peter Stuge pe...@stuge.se wrote: - for (int i = 0; 1; i++) + for (int i = 0; ft2232_vid[i] || ft2232_pid[i]; i++) What's the point? This condition can never become false, or the function would have returned in the previous iteration. /Andreas

Re: [Openocd-development] [PATCH 2/5] ft2232: Refactor ft2232_init_*() into ft2232_initone()

2011-06-09 Thread Andreas Fritiofson
On Thu, Jun 9, 2011 at 12:25 PM, Peter Stuge pe...@stuge.se wrote: + retval = ft2232_initone(ft2232_vid[i], ft2232_pid[i], more, try_more); This is a good start, but what's with the function name?? How about ft2232_init_{device,interface,ftdilib,hardware,handle,whatever}

Re: [Openocd-development] [PATCH 3/5] ft2232: Clean up on ft2232_init() errors after a device has been opened

2011-06-09 Thread Andreas Fritiofson
This together with patch 5/5 is equivalent to my patch, only with gotos. Both patches are perfectly fine with me, although I prefer getting rid of the forward declaration as well. /Andreas ___ Openocd-development mailing list

Re: [Openocd-development] [PATCH 2/5] ft2232: Refactor ft2232_init_*() into ft2232_initone()

2011-06-09 Thread Andreas Fritiofson
On Fri, Jun 10, 2011 at 12:26 AM, Peter Stuge pe...@stuge.se wrote: Andreas Fritiofson wrote: + retval = ft2232_initone(ft2232_vid[i], ft2232_pid[i], more, try_more); This is a good start, but what's with the function name?? Short. And one from one device

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

[Openocd-development] ft2232 layout refactoring plans

2011-06-09 Thread Andreas Fritiofson
Hi all! The recent activity surrounding the ft2232 driver makes it obvious that there are lots of bugfixes and structural improvements that need to be done. Unfortunately, trying to understand the code or even just browsing around in it is complicated by the fact that its cluttered with functions

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] ft2232 layout refactoring plans

2011-06-09 Thread Andreas Fritiofson
On Fri, Jun 10, 2011 at 2:36 AM, Tomek CEDRO tomek.ce...@gmail.com wrote: Uhm, from what I understand LAYOUT is only used for initialization of specific device based on FT*232 device, maybe other minor stuff, all work is done in fact by queue_flush() and it is common for all devices as it

Re: [Openocd-development] [PATCH] transport selection fix

2011-06-16 Thread Andreas Fritiofson
On Thu, Jun 16, 2011 at 8:02 PM, Tomek CEDRO tomek.ce...@gmail.com wrote: On Thu, Jun 16, 2011 at 5:50 PM, Øyvind Harboe oyvind.har...@zylin.com wrote: I take it is just a bugfix? Yes - it changes: retval = allow_transports(CMD_CTX, jtag_interface-transports ? : jtag_only); into:

Re: [Openocd-development] Cortex M3: Patch for automatic handling of interrupt mask during stepping

2011-06-18 Thread Andreas Fritiofson
Great, but does it really work? There has been discussions about this on this list in the past. I think the conclusion was that there's no way to robustly know GDB's intentions based on the remote commands. When you do a source-level step in GDB, it may send a step command to OpenOCD. Then we can

Re: [Openocd-development] Cortex M3: Patch for automatic handling of interrupt mask during stepping

2011-06-18 Thread Andreas Fritiofson
Resending, Cc to the list got lost somewhere... On Sat, Jun 18, 2011 at 8:27 PM, Andreas Fritiofson andreas.fritiof...@gmail.com wrote: On Sat, Jun 18, 2011 at 6:38 PM, Peter Horn peter.h...@bluewin.ch wrote: Hi Andreas Am 18.06.2011 17:32, schrieb Andreas Fritiofson: Great, but does

Re: [Openocd-development] USB Blaster support broken

2011-06-28 Thread Andreas Fritiofson
On Tue, Jun 28, 2011 at 9:19 AM, Domien Nowicki domien.nowi...@gmail.comwrote: ** 1. The USB Blaster clone does not use the original FT245 chip, and so it tries to emulate its behavior. As it turns out, the API call FT_GetLatencyTimer is not properly emulated by the clone, and this makes

Re: [Openocd-development] compiler warnings with dsp5680xx.c

2011-06-29 Thread Andreas Fritiofson
On Wed, Jun 29, 2011 at 9:17 PM, Rodrigo Rosa rodrigorosa...@gmail.comwrote: On Wed, Jun 29, 2011 at 12:44 AM, Øyvind Harboe oyvind.har...@zylin.com wrote: This is disturbing. Why switch to global variables? +static uint32_t data_read_dummy; static int jtag_data_write(struct target *

Re: [Openocd-development] MIPS target, big endian host

2011-07-06 Thread Andreas Fritiofson
On Wed, Jul 6, 2011 at 11:35 PM, Øyvind Harboe oyvind.har...@zylin.comwrote: On Wed, Jul 6, 2011 at 11:28 PM, Mahr, Stefan stefan.m...@sphairon.com wrote: mips32_pracc_read_mem casts uint32 to void, so we need to cast it back to uint32. I found no suitable macro in actual sources.

Re: [Openocd-development] eclipse indigo (pipe usage)

2011-07-06 Thread Andreas Fritiofson
On Fri, Jul 1, 2011 at 12:47 PM, Spencer Oliver s...@spen-soft.co.ukwrote: On 1 July 2011 00:41, Andrew Leech coronasen...@gmail.com wrote: One other point, do you know whether you can get openocd to add it's own program directory to the search path for the source [find ...] lines? It'd

  1   2   >