Hey,

On Sun, Dec 21, 2014 at 04:13:37AM +0100, Jens Bauer wrote:
> I'm asking, because I'm having some strange problems, and I believe
> that those problems are 'unique to me' (like always) :) I posted the
> question on my.st.com's forum, as I thought it was very likely that
> there are many discovery-board users there, and a few of them might
> have had the problem too.  <https://my.st.com/ee76e9e1>

Assuming it's this [1]:

> openocd -f board/stm32f4discovery.cfg -c "program output/STM-test8.bin
> verify reset"

This is obviously wrong as you flash a binary without specifying the
offset, and it is 0 by default, so you get

> Warn : no flash bank found for address 0

The correct offset would be 0x08000000 in this case.

> Warn : STM32 flash size failed, probe inaccurate - assuming 1024k flash
> Info : flash size = 1024kbytes
> Error: stm32x device protected
> Error: failed erasing sectors 0 to 0

This likely means you need to run

> stm32f4x unlock 0

once, and if that doesn't help,

> stm32f4x mass_erase 0

And then power-cycle. If it works, you'll be able to use "program" as
usual as many times as you want, without these additional tricks. I
recommend sticking to elf because openocd knows how to properly parse
them, and uses correct offset automatically.

HTH

[1] 
https://my.st.com/public/STe2ecommunities/mcu/Lists/STM32Discovery/Flat.aspx?RootFolder=%2fpublic%2fSTe2ecommunities%2fmcu%2fLists%2fSTM32Discovery%2fSTM32F4%20Discovery%20-%20can%27t%20flash-program%20device&FolderCTID=0x01200200770978C69A1141439FE559EB459D75800084C20D8867EAD444A5987D47BE638E0F&currentviews=30

--
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to