Re: [OpenOCD-devel] Issues with kinetis.c

2013-09-05 Thread Chris Fryer
Spen, Thanks for all your help with this. I've reviewed your patches on gerrit and am just about to start using my eclipse/gdb/openocd/cmsis-dap setup in anger so will report back how I get on. All seems usable at this point - flashing, BPs, stepping over/in/out, variables, registers (not tried

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-29 Thread Spencer Oliver
On 29/08/13 21:39, Spencer Oliver wrote: > On 28/08/13 13:55, Spencer Oliver wrote: >> On 27/08/13 11:38, Chris Fryer wrote: >>> On 27/08/13 10:14, Chris Fryer wrote: The first problem was that when 'flash info 0' was run, the code would quit with an assert(bank->num_sectors > 0); Th

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-29 Thread Spencer Oliver
On 28/08/13 13:55, Spencer Oliver wrote: > On 27/08/13 11:38, Chris Fryer wrote: >> On 27/08/13 10:14, Chris Fryer wrote: >>> The first problem was that when 'flash info 0' was run, the code would >>> quit with an assert(bank->num_sectors > 0); >>> This turned out to be a simple fix: size and count

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-29 Thread Chris Fryer
On 28/08/13 23:50, Chris Kilgour wrote: >> On the part that I'm using, bits 8:7 of SDID are '11' pointing to 4kb sector >> sizes. > The code was developed primarily for Kinetis 'K' series parts. I > exhaustively looked at every K-series data sheet to make the table, but did > not look into the

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Chris Kilgour
> Looking through the comments, this is the logic that is used to determine > sector sizes: > > * Although not documented as such by Freescale, it appears that bits > * 8:7 of the read-only SIM_SDID register reflect the granularity > * settings 0..3, so sector sizes and block counts are applic

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Spencer Oliver
On 27/08/13 11:38, Chris Fryer wrote: > On 27/08/13 10:14, Chris Fryer wrote: >> The first problem was that when 'flash info 0' was run, the code would >> quit with an assert(bank->num_sectors > 0); >> This turned out to be a simple fix: size and count reversed when >> calling target_read_memory to

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Spencer Oliver
On 27/08/13 10:14, Chris Fryer wrote: > I've been trying to use the new cmsis-dap implementation (from > http://openocd.zylin.com/1542) to work with a Freescale FRDM-KL46Z board > (comes with a MKL46Z256VLL4 uc) and have found a couple of issues with > the kinetis.c flash code. > To be honest whil

Re: [OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Chris Fryer
On 27/08/13 10:14, Chris Fryer wrote: > The first problem was that when 'flash info 0' was run, the code would > quit with an assert(bank->num_sectors > 0); > This turned out to be a simple fix: size and count reversed when > calling target_read_memory to get config registers from the IC. Patch

[OpenOCD-devel] Issues with kinetis.c

2013-08-28 Thread Chris Fryer
I've been trying to use the new cmsis-dap implementation (from http://openocd.zylin.com/1542) to work with a Freescale FRDM-KL46Z board (comes with a MKL46Z256VLL4 uc) and have found a couple of issues with the kinetis.c flash code. The first problem was that when 'flash info 0' was run, the c