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
(Linaro package) , using ARM STM32 F429. My little board is the all new
F429-discovery from STMicro (
www.st.com/web/catalog/tools/FM116/SC959/SS1532/PF259090?icmp=stm32f4pr_pron_p3436s_sep2013)
, using the F429ZI with 2MB of flash and 256K of RAM and STLINK/V2 onboard.
I am using Freddie distribution of OpenOCD v0.7, with everything as is all
defaults. For this connection to st-link i am using target
stm32f4x_stlink.cfg (default as is) with the stlink-v2.cfg as interface.

First, the good news: My application is a little bit over the 1MB of flash,
if i reduce my code to slightly less than the 1 MB flash, all works OK,
everybody is Happy :). But if i increase my application to over the 1MB
mark (normal user code nothing fancy),  when I download to target using
STLINK/V2 of the new discovery board,  i get the following errors :

Error: address range 0x08000000 .. 0x0811ffff is not sector-aligned
Error: flash_erase returned -904

Observations:
- note that openOCD probe got the flash size right, 2048K.
- I tried forcing the correct base and size :
flash bank $_FLASHNAME stm32f2x 0x08000000 0x200000 0 0 $_TARGETNAME
OpenOcd captured the correct base and size, but error remains.
- of course GDB did not load nor erased the STM32F429
- the error in GDB : Error erasing flash with vFlashErase packet
- The size over 1MB is just my theory, and my observation, not sure if it
make any sense.
- I can send a debug output with -d but I thought to try the soft approach
first, maybe it is a known issue and the fix is silly.

Any idea? did somebody got this before, I know from search this showed up
previously for the STM32L in older v 0.4. I am ready to implement any
suggestion (I am using the .cfg file so if any suggestion please consider
inserting commands or settings in the .cfg file).


My startup  commands in GDB TAB (before loading) are:
monitor reset init
monitor flash probe 0
monitor flash info 0
monitor soft_reset_halt

Like I said for an application <1MB, the same exact .cfg files, settings
and setup work well, never had any download issues with  any ST target
using STLINK-v2.

Any help is appreciated,

Cheers, and thanks in advance.

Randy.

****************  OpenOCD Output with the error >1MB flash ************
   text   data    bss    dec    hex
1163612   4568 185896 1354076  14a95c
*********************************************************************************

Open On-Chip Debugger 0.7.0 (2013-05-05-10:41)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
connect_deassert_srst
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v17 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : Target voltage: 2.852619
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Info : device id = 0x10036419
Info : flash size = 2048kbytes
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080f794c msp: 0x2002ebd0
Info : device id = 0x10036419
Info : flash size = 2048kbytes
flash 'stm32f2x' found at 0x08000000
#0 : stm32f2x at 0x08000000, size 0x00380000, buswidth 0, chipwidth 0
 #  0: 0x00000000 (0x4000 16kB) not protected
#  1: 0x00004000 (0x4000 16kB) not protected
#  2: 0x00008000 (0x4000 16kB) not protected
 #  3: 0x0000c000 (0x4000 16kB) not protected
#  4: 0x00010000 (0x10000 64kB) not protected
#  5: 0x00020000 (0x20000 128kB) not protected
 #  6: 0x00040000 (0x20000 128kB) not protected
#  7: 0x00060000 (0x20000 128kB) not protected
#  8: 0x00080000 (0x20000 128kB) not protected
 #  9: 0x000a0000 (0x20000 128kB) not protected
# 10: 0x000c0000 (0x20000 128kB) not protected
# 11: 0x000e0000 (0x20000 128kB) not protected
 # 12: 0x00280000 (0x4000 16kB) not protected
# 13: 0x00284000 (0x4000 16kB) not protected
# 14: 0x00288000 (0x4000 16kB) not protected
 # 15: 0x0028c000 (0x4000 16kB) not protected
# 16: 0x00290000 (0x10000 64kB) not protected
# 17: 0x002a0000 (0x20000 128kB) not protected
 # 18: 0x002c0000 (0x20000 128kB) not protected
# 19: 0x002e0000 (0x20000 128kB) not protected
# 20: 0x00300000 (0x20000 128kB) not protected
 # 21: 0x00320000 (0x20000 128kB) not protected
# 22: 0x00340000 (0x20000 128kB) not protected
# 23: 0x00360000 (0x20000 128kB) not protected
stm32f4x - Rev: unknown
requesting target halt and executing a soft reset
Error: address range 0x08000000 .. 0x0811ffff is not sector-aligned
Error: flash_erase returned -904



*******************OpenOCD output without the error  <1 MB flash, when all
is OK ********
 text            data    bss    dec    hex
1008596   4568 185896 1199060 124bd4
***************************************************************************************************
Open On-Chip Debugger 0.7.0 (2013-05-05-10:41)
Licensed under GNU GPL v2
For bug reports, read
 http://openocd.sourceforge.net/doc/doxygen/bugs.html
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
connect_deassert_srst
Info : This adapter doesn't support configurable speed
Info : STLINK v2 JTAG v17 API v2 SWIM v0 VID 0x0483 PID 0x3748
Info : Target voltage: 2.852619
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection from 3333
Info : device id = 0x10036419
Info : flash size = 2048kbytes
Warn : acknowledgment received, but no packet pending
undefined debug reason 6 - target needs reset
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x080f794c msp: 0x2002ebd0
Info : device id = 0x10036419
Info : flash size = 2048kbytes
flash 'stm32f2x' found at 0x08000000
#0 : stm32f2x at 0x08000000, size 0x00380000, buswidth 0, chipwidth 0
#  0: 0x00000000 (0x4000 16kB) not protected
 #  1: 0x00004000 (0x4000 16kB) not protected
#  2: 0x00008000 (0x4000 16kB) not protected
#  3: 0x0000c000 (0x4000 16kB) not protected
 #  4: 0x00010000 (0x10000 64kB) not protected
#  5: 0x00020000 (0x20000 128kB) not protected
#  6: 0x00040000 (0x20000 128kB) not protected
 #  7: 0x00060000 (0x20000 128kB) not protected
#  8: 0x00080000 (0x20000 128kB) not protected
#  9: 0x000a0000 (0x20000 128kB) not protected
 # 10: 0x000c0000 (0x20000 128kB) not protected
# 11: 0x000e0000 (0x20000 128kB) not protected
# 12: 0x00280000 (0x4000 16kB) not protected
 # 13: 0x00284000 (0x4000 16kB) not protected
# 14: 0x00288000 (0x4000 16kB) not protected
# 15: 0x0028c000 (0x4000 16kB) not protected
 # 16: 0x00290000 (0x10000 64kB) not protected
# 17: 0x002a0000 (0x20000 128kB) not protected
# 18: 0x002c0000 (0x20000 128kB) not protected
 # 19: 0x002e0000 (0x20000 128kB) not protected
# 20: 0x00300000 (0x20000 128kB) not protected
# 21: 0x00320000 (0x20000 128kB) not protected
 # 22: 0x00340000 (0x20000 128kB) not protected
# 23: 0x00360000 (0x20000 128kB) not protected
stm32f4x - Rev: unknown
requesting target halt and executing a soft reset
Info : Padding image section 0 with 4 bytes
***********************************************************************
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60134791&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