Hi,
I’m trying to flash my Olimex STM32-103H board with openocd. I always get the same error:
“Error: No flash at address 0x20000000”
C:\Users\Tom\Documents\Projekte\Test>openocd -f openocd.cfg -c “flash_image Debug/Main.elf”
Open On-Chip Debugger 0.3.0-in-development (2009-09-28-12:02) svn:2765
$URL: http://svn.berlios.de/svnroot/repos/ope … /openocd.c $
For bug reports, read http://svn.berlios.de/svnroot/repos/openocd/trunk/BUGS
1 kHz
10 kHz
1000 kHz
jtag_nsrst_delay: 100
jtag_ntrst_delay: 100
Warn : stm32.bs: nonstandard IR mask
Warn : use ‘stm32.cpu’ as target identifier, not ‘0’
Info : device: 4 “2232C”
Info : deviceID: 67330064
Info : SerialNumber: A
Info : Description: Dual RS232 A
Info : clock speed 1000 kHz
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
Info : JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, ver: 0x3)
Info : JTAG tap: stm32.bs tap/device found: 0x16410041 (mfg: 0x020, part: 0x6410, ver: 0x1)
target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x28042300 msp: 0xbf181d40
auto erase enabled
Info : device id = 0x20016410
Info : flash size = 128kbytes
Info : Padding image section 0 with 0 bytes
Error: No flash at address 0x20000000
wrote 74792 byte from file Debug/Main.elf in 5.966797s (12.240916 kb/s)
target state: halted
target halted due to breakpoint, current mode: Handler BusFault
xPSR: 0x00000005 pc: 0xd00d2804 msp: 0xbf181d20
I’m using this openocd.cfg with the following command:
“openocd -f openocd.cfg -c “flash_image Debug/Main.elf””
interface
interface ft2232
ft2232_vid_pid 0x0403 0x6010
ft2232_device_desc “Dual RS232 A”
ft2232_layout “oocdlink”
ft2232_latency 2
6/(1+n) Mhz TCLK
jtag_khz 1
jtag_khz 10
Change the default telnet port…
telnet_port 4444
GDB connects here
gdb_port 3333
GDB can also flash my flash!
gdb_memory_map enable
gdb_flash_program enable
set BSTAPID 0x16410041
set WORKAREASIZE 0x5000
source “C:/program files/openocd/target/stm32.cfg”
proc flash_image { filename } {
Halt CPU and flash image
reset halt
flash write_image erase $filename
resume
shutdown
}
init
The Memory Section of the linker script:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 20K
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 128K
}
I don’t know why openocd is using 0x20000000 for flash. I tested openocd 0.2 and the last svn version. The error is always the same.
Does anyone have a clue what the problem could be?
Thanks a lot!
Tom