Hi all,
I am trying to program a stm32l-discovery board using openocd and stlink-v2
This is my script stored in the file Stm32Lx_STLink_Program.cfg
#
# Flash programming script for stm32l discovery
# Using the swd transport
#
source [find interface/stlink-v2.cfg]
source [find target/stm32lx_stlink.cfg]
# default ports
telnet_port 4444
gdb_port 3333
tcl_port 6666
init
adapter_khz 1125
reset init
halt
poll
#stm32f1x mass_erase 0
flash erase_address 0x08000000 0xfc00
flash write_image download.elf 0x0000000 elf
reset run
shutdown
and this is the output i get from openocd
current working directory:
C:\CodeLite-embed\msys\home\Projects\Stm32f1L_Discovery_demo-nolibs\build\App\Debug
Running program: "C:\CodeLite-Embed\msys\local\bin\openocd.exe" -f
C:\CodeLite-Embed/msys/local/share/openocd/codelite/Stm32Lx_STLink_Program.cfg
Open On-Chip Debugger 0.6.0-dev-00422-g0a98914-dirty (2012-02-16-20:19)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.sourceforge.net/doc/doxygen/bugs.html
Warn : must select a transport.
1 kHz
trst_and_srst separate srst_gates_jtag trst_push_pull srst_open_drain
Info : clock speed 1 kHz
Info : IDCODE 2ba01477
Info : stm32lx.cpu: hardware has 6 breakpoints, 4 watchpoints
1125 kHz
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 00000000 msp: 00000000
background polling: on
TAP: stm32lx.cpu (enabled)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 00000000 pc: 00000000 msp: 00000000
Info : flash size = 128kbytes
Error: address range 0x08000000 .. 0x0800fbff is not sector-aligned
Runtime Error:
C:\CodeLite-Embed/msys/local/share/openocd/codelite/Stm32Lx_STLink_Program.cfg:22:
in procedure 'script'
at file "embedded:startup.tcl", line 58
in procedure 'flash' called at file
"C:\CodeLite-Embed/msys/local/share/openocd/codelite/Stm32Lx_STLink_Program.cfg",
line 22
Program exited with return code: 1
First I tried the mass erase command for all families to no avail and then
switched to trying the flash erase_address command.
I would be ever so grateful if somebody could supply with an actual example of
the "flash erase_address" command for this board
which has 128k of flash memory.
Many thanks and best regards,
Noel Diviney.
Noel Diviney Ayrenet Pty Ltd, 24 Wadhurst Drive, Boronia, Victoria 3155,
Australia. Phone +61 3 9887 1130 email n...@ayrenet.com or div...@hotmail.com
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
OpenOCD-devel mailing list
OpenOCD-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openocd-devel