Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Nader
Hi Andreas and all, Thanks again, I will keep your notes handy. Cheers. On Mon, Oct 7, 2013 at 4:06 PM, Andreas Fritiofson < [email protected]> wrote: > > On Mon, Oct 7, 2013 at 11:51 PM, Nader wrote: > >> Hi Guys, >> >> EUREKA! It worked like a charm :) >> > > I'm glad

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Andreas Fritiofson
On Mon, Oct 7, 2013 at 11:51 PM, Nader wrote: > Hi Guys, > > EUREKA! It worked like a charm :) > I'm glad to hear! > Unfortunately not familiar how to fetch the patch by itself, so i went > ahead carried the changes manually to my src/flash/nor/stm32f2x.c , > compiled and built again my

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Nader
Hi Guys, EUREKA! It worked like a charm :) Unfortunately not familiar how to fetch the patch by itself, so i went ahead carried the changes manually to my src/flash/nor/stm32f2x.c , compiled and built again my .exe and tried it out. All worked out fine (output below). I am afraid I have to

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Andreas Fritiofson
On Mon, Oct 7, 2013 at 5:59 PM, Nader wrote: > > flash erase_sector 0 0 11 > erased sectors 0 through 11 on flash bank 0 in 17.206984s > > flash erase_sector 0 0 12 > stm32x device protected > failed erasing sectors 0 to 12 > Hi, I've located a bug and pushed a fix to Gerrit at http://openocd.zy

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Nader
Hi Andreas, Thanks for your suggestions, we have good news and bad news. As you expected the real issue is in the sector erase at the boundary of the first 12 sectors (1024K total). Sorry for lengthy email, but i wanted to properly document the findings as my contribution as a user, so everyo

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-07 Thread Andreas Fritiofson
On Mon, Oct 7, 2013 at 5:50 AM, Nader wrote: > Hi Guys, > > I was able to compile the latest dirty version, and just a feedback, > the errors still there for my case . > > I am willing to try anything you throw on me ... :) > Ok, lets try the following steps, is the >1MB file you're having

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-06 Thread Nader
Hi Guys, I was able to compile the latest dirty version, and just a feedback, the errors still there for my case . I am willing to try anything you throw on me ... :) Another test, if I generate a .bin file with my application > 1MB and use stlink utility to program the device, it downloads

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Nader
Hi Guys, Here is the debug (-d) outputs using v0.8-dev: Before launching GDB : https://www.dropbox.com/sh/orb5lmxkkwam6x2/uoS6qXP04J/OpenOCD_before_GDB.txt After Launching GDB: https://www.dropbox.com/sh/orb5lmxkkwam6x2/wBYgzQRhKh/OpenOCD_after_GDB.txt Note: the log might be missing some line

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Nader
Hi Freddie, You are right, i dont think i need soft_reset_halt, i took it out. For testing I tried "reset halt" and simply "reset" just to see if it loads OK, but the erase problem stated in this thread still persists. Cheers. On Sat, Oct 5, 2013 at 12:17 PM, Freddie Chopin wrote:

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Freddie Chopin
My first suggestion would be to N-E-V-E-R use soft_reset_halt unless you really have no other option. 4\/3!! -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance.

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Nader
Hi Andreas, Here are my findings. Thanks for the quick link. As a sanity check, the same application with <1MB of flash size, still works OK and all is happy, with the new 0.8.0-dev-00094-gc658229. First thing you notice that the flash info reports a way much better sectors layout, with the

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Andreas Fritiofson
On Sat, Oct 5, 2013 at 6:28 PM, Nader wrote: > Hi Paul, Andres and All, > >Thanks for your prompt reply, first I will check with Freddie if he has > any beta release for windows, second i will try to compile my own. I was > able to compile my own before (it took lots of effort - specially the

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Nader
Hi Paul, Andres and All, Thanks for your prompt reply, first I will check with Freddie if he has any beta release for windows, second i will try to compile my own. I was able to compile my own before (it took lots of effort - specially the supporting libraries and requirements needed for the bu

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Andreas Fritiofson
On Sat, Oct 5, 2013 at 4:37 PM, Andreas Fritiofson < [email protected]> wrote: > > On Sat, Oct 5, 2013 at 3:55 AM, Nader wrote: > >> # 12: 0x0028 (0x4000 16kB) not protected >> > > The offset for this sector and those following it looks wrong. The second > bank is adjacent to the f

Re: [OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-05 Thread Andreas Fritiofson
Hi! On Sat, Oct 5, 2013 at 3:55 AM, Nader wrote: > > Info : device id = 0x10036419 > Info : flash size = 2048kbytes > flash 'stm32f2x' found at 0x0800 > #0 : stm32f2x at 0x0800, size 0x0038, buswidth 0, chipwidth 0 > # 0: 0x (0x4000 16kB) not protected > # 1: 0x4000 (0

[OpenOCD-devel] OpenOCD v0.7 and error not sector-aligned

2013-10-04 Thread Nader
Hi Guys, First time poster so my apologies if I am in the wrong place, and I like to thank all the developers and contributors to OpenOCD, you guys rock! This is a little issue I am facing, and I ran out of ideas. I am an active windows user, with the classic Eclipse/GDB v7.41 for windows (Li