[Openocd-development] [PATCH 1/5] ADIv5: Introduce function to detect ROM Table location

2010-10-31 Thread Marek Vasut
This patch adds function called dap_detect_debug_base(), which should be called to get location of the ROM Table. By walking ROM Table, it's possible to discover the location of DAP. Sadly, some CPUs misreport this value, therefore I had to introduce an fixup function, which will be called in

[Openocd-development] [PATCH 2/5] ADIv5: Implement function to lookup CoreSight component

2010-10-31 Thread Marek Vasut
This patch implements dap_lookup_cs_component(), which allows to lookup CS component by it's identification. Signed-off-by: Marek Vasut marek.va...@gmail.com --- src/target/arm_adi_v5.c | 31 +++ src/target/arm_adi_v5.h |4 2 files changed, 35

[Openocd-development] [PATCH 3/5] CortexA8: Implement debug base autodetection

2010-10-31 Thread Marek Vasut
Implement autodetection of debug base. Also, implement a function solving various hardware quirks (like iMX51 ROM Table location bug). Signed-off-by: Marek Vasut marek.va...@gmail.com --- src/target/cortex_a8.c | 28 +--- 1 files changed, 21 insertions(+), 7

[Openocd-development] [PATCH 4/5] CortexA8: Introduce Freescale i.MX51 variant

2010-10-31 Thread Marek Vasut
This patch introduces support for Cortex A8 based Freescale i.MX51 CPU. This CPU has the Debug Access Port located at a different address (0x60008000) than TI OMAP3 series of CPUs. i.MX51 configuration file based on OMAP3 configuration file and an email from Alan Carvalho de Assis

[Openocd-development] [PATCH 5/5] Add EfikaMX smarttop board support

2010-10-31 Thread Marek Vasut
This patch finally adds support for i.MX51 based Genesi USA EfikaMX smarttop board. Signed-off-by: Marek Vasut marek.va...@gmail.com --- tcl/board/efikamx.cfg |9 + 1 files changed, 9 insertions(+), 0 deletions(-) create mode 100644 tcl/board/efikamx.cfg diff --git

Re: [Openocd-development] [PATCH 1/3] CortexA8: Setup debug_base according to variant

2010-10-31 Thread Peter Stuge
Marek Vasut wrote: So it turns out (by reading Freescale iMX515 errata), ENGcm09395 to be exact Please mention this within the fixup function. But that being the case, I'd prefer to make an incremental patch on top of the patches I submitted. Please don't, since some of the former patches

Re: [Openocd-development] [PATCH 3/5] CortexA8: Implement debug base autodetection

2010-10-31 Thread David Brownell
#define swjdp_memoryap 0 #define swjdp_debugap 1 For Cortex-A8 it's likely not SWJ-DP but instead JTAG-DP ... regardless it's best not to try exposing irrelevant details like that in naming conventions here... +static const char *variant = NULL; variant is never changed but ... ... +  

Re: [Openocd-development] [PATCH 1/3] CortexA8: Setup debug_base according to variant

2010-10-31 Thread David Brownell
I think caring about the variant should strongly be avoided. Use the ROM table by default. Only in the case of a broken ROM table should we (a) emit a message, then (b) work around the brokenness. Such working-around might care about variant, if wecan't come up with a simple heuristic fix. -

Re: [Openocd-development] [PATCH 1/3] CortexA8: Setup debug_base according to variant

2010-10-31 Thread Øyvind Harboe
On Sun, Oct 31, 2010 at 10:59 AM, David Brownell davi...@pacbell.net wrote: I think caring about the variant should strongly be avoided.  Use the ROM table by default.  Only in the case of a broken ROM table should we (a) emit a message, then (b) work around the brokenness. Such

[Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Øyvind Harboe
OpenOCD master branch now uses Jim Tcl. This means you'll have to build Jim Tcl before building OpenOCD. bootstrap prints the instructions: git submodule init git submodule update cd jimtcl ./configure --with-jim-ext=nvp make make install From the OpenOCD command line you can determine the

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

2010-10-31 Thread Michel Catudal
Le 2010-10-29 19:15, Andreas Fritiofson a écrit : On Fri, Oct 29, 2010 at 8:58 PM, Chris Jonesch...@martin-jones.com wrote: Am I stuck? Or is there a way of finding out how the Cortex-M3 debug unit is wedged, if that's the case, and tickling it back to life? Would it reset

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

2010-10-31 Thread Michel Catudal
Le 2010-10-30 04:20, Chris Jones a écrit : I'd like to work out whether the debug unit really does break, or whether there's just a misunderstanding about state between it and OpenOCD. Wouldn't pulling the boot pin and send the reset core work? I would suggest to use the IAR limited

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Peter Stuge
Øyvind Harboe wrote: OpenOCD master branch now uses Jim Tcl. This means you'll have to build Jim Tcl before building OpenOCD. Is there also an upstream for Jim Tcl to make distribution packages from? Or is Jim Tcl only ever statically linked with OpenOCD? //Peter

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Øyvind Harboe
On Sun, Oct 31, 2010 at 5:53 PM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: OpenOCD master branch now uses Jim Tcl. This means you'll have to build Jim Tcl before building OpenOCD. Is there also an upstream for Jim Tcl to make distribution packages from? Or is Jim Tcl only

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Peter Stuge
Øyvind Harboe wrote: Is there also an upstream for Jim Tcl to make distribution packages from? Or is Jim Tcl only ever statically linked with OpenOCD? Statically linked, no change there. Ok. Has Jim Tcl ever been packaged independently? Is it our project as well? //Peter

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Øyvind Harboe
On Sun, Oct 31, 2010 at 6:26 PM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: Is there also an upstream for Jim Tcl to make distribution packages from? Or is Jim Tcl only ever statically linked with OpenOCD? Statically linked, no change there. Ok. Has Jim Tcl ever been

Re: [Openocd-development] [PATCH 3/5] CortexA8: Implement debug base autodetection

2010-10-31 Thread Marek Vasut
On Sunday 31 October 2010 10:49:54 David Brownell wrote: #define swjdp_memoryap 0 #define swjdp_debugap 1 For Cortex-A8 it's likely not SWJ-DP but instead JTAG-DP ... regardless it's best not to try exposing irrelevant details like that in naming conventions here... +static const

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Marek Vasut
On Sunday 31 October 2010 18:37:33 Øyvind Harboe wrote: On Sun, Oct 31, 2010 at 6:26 PM, Peter Stuge pe...@stuge.se wrote: Øyvind Harboe wrote: Is there also an upstream for Jim Tcl to make distribution packages from? Or is Jim Tcl only ever statically linked with OpenOCD?

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Peter Stuge
Marek Vasut wrote: won't it be better compile both jimtcl and openocd with single ./configure and make, without needing to install that stuff separatelly ? It doesn't need to be installed, that's part of the point. Although I'm thinking about if it might make sense to package it anyway. I

Re: [Openocd-development] OpenOCD master now uses Jim Tcl 0.63

2010-10-31 Thread Marek Vasut
On Monday 01 November 2010 01:50:19 Peter Stuge wrote: Marek Vasut wrote: won't it be better compile both jimtcl and openocd with single ./configure and make, without needing to install that stuff separatelly ? It doesn't need to be installed, that's part of the point. In my case,

Re: [Openocd-development] stellaris.cfg

2010-10-31 Thread Xiaofan Chen
On Fri, Oct 29, 2010 at 10:40 PM, Kevin Hester kev...@geeksville.com wrote: Hi Bill, I recently tried OpenOCD and encountered the same problem.  The cause seemed a relatively recent checkin that was attempting to add swj support.  I've been bad though and haven't made a patch or filed a bug

[Openocd-development] [PATCH 1/5 v2] ADIv5: Introduce function to detect ROM Table location

2010-10-31 Thread Marek Vasut
This patch adds function called dap_detect_debug_base(), which should be called to get location of the ROM Table. By walking ROM Table, it's possible to discover the location of DAP. Sadly, some CPUs misreport this value, therefore I had to introduce an fixup table, which will be used in case

[Openocd-development] [PATCH 2/5 v2] ADIv5: Implement function to lookup CoreSight component

2010-10-31 Thread Marek Vasut
This patch implements dap_lookup_cs_component(), which allows to lookup CS component by it's identification. Signed-off-by: Marek Vasut marek.va...@gmail.com --- v2: Save apsel and restore it on return src/target/arm_adi_v5.c | 41 +

[Openocd-development] [PATCH 3/5 v2] CortexA8: Implement debug base autodetection

2010-10-31 Thread Marek Vasut
Implement autodetection of debug base. Also, implement a function solving various hardware quirks (like iMX51 ROM Table location bug). Signed-off-by: Marek Vasut marek.va...@gmail.com --- v2: Handle error codes, remove the variant stuff and buggy hardware fixup function src/target/cortex_a8.c |

[Openocd-development] [PATCH 4/5 v2] CortexA8: Introduce Freescale i.MX51 variant

2010-10-31 Thread Marek Vasut
This patch introduces support for Cortex A8 based Freescale i.MX51 CPU. This CPU has the Debug Access Port located at a different address (0x60008000) than TI OMAP3 series of CPUs. i.MX51 configuration file based on OMAP3 configuration file and an email from Alan Carvalho de Assis

[Openocd-development] [PATCH 5/5 RESEND] Add EfikaMX smarttop board support

2010-10-31 Thread Marek Vasut
This patch finally adds support for i.MX51 based Genesi USA EfikaMX smarttop board. Signed-off-by: Marek Vasut marek.va...@gmail.com --- tcl/board/efikamx.cfg |9 + 1 files changed, 9 insertions(+), 0 deletions(-) create mode 100644 tcl/board/efikamx.cfg diff --git

Re: [Openocd-development] [PATCH 1/3] CortexA8: Setup debug_base according to variant

2010-10-31 Thread Marek Vasut
On Sunday 31 October 2010 13:16:43 Øyvind Harboe wrote: On Sun, Oct 31, 2010 at 10:59 AM, David Brownell davi...@pacbell.net wrote: I think caring about the variant should strongly be avoided. Use the ROM table by default. Only in the case of a broken ROM table should we (a) emit a