From: Harry E. <har...@ic...> - 2010-08-26 10:23:39
|
Hi everyone, I'm a bit stuck at the moment using OpenOCD and gdb with my Olimex STM32H103 and IAR Jlink lite programmer. My problem is that I get this error when connecting with gdb and trying to load an elf file : > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x70bc8047 > I have tried to reduce the clockrate but it didn't help. I did however have some success debugging after this sequence of commands: > reset halt > stm32x mass_erase 0 > flash write_bank 0 main.bin 0 > reset halt > > But the debugging is unstable and similar error messages are appearing all the time. I am using Ubuntu 10.04, OpenOCD 0.5.0 and arm-none-linux-gnueabi-gdb 7.0.50. My openocd.cfg and output stream are pasted below. Any ideas? Thanks for reading *openocd.cfg: * > > #daemon configuration > telnet_port 4444 > #tcl_port 6666 > gdb_port 3333 > > #interface > source [find interface/jlink.cfg] > > #board (target is sourced from inside) > source [find board/olimex_stm32_h103.cfg] > * Output from OpenOCD: * > > *$ openocd -s openocd/* > Open On-Chip Debugger 0.5.0-dev-00494-g5c98e06 (2010-08-24-18:45) > Licensed under GNU GPL v2 > For bug reports, read > http://openocd.berlios.de/doc/doxygen/bugs.html > Warn : Adapter driver 'jlink' did not declare which transports it allows; > assuming legacy JTAG-only > Info : only one transport option; autoselect 'jtag' > 1000 kHz > adapter_nsrst_delay: 100 > jtag_ntrst_delay: 100 > Info : J-Link initialization started / target CPU reset initiated > Info : J-Link ARM Lite V8 compiled Jul 1 2009 10:05:17 > Info : JLink caps 0xb9ff7bbf > Info : JLink hw version 80000 > Info : JLink max mem block 9736 > Info : Vref = 3.319 TCK = 1 TDI = 0 TDO = 1 TMS = 0 SRST = 0 TRST = 0 > Info : J-Link JTAG Interface ready > 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 : stm32.cpu: hardware has 6 breakpoints, 4 watchpoints > Info : accepting 'gdb' connection from 3333 > Info : device id = 0x20036410 > Info : flash size = 128kbytes > Warn : acknowledgment received, but no packet pending > undefined debug reason 6 - target needs reset > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x70bc8047 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x3687be4 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x3687be4 > Warn : Block read error address 0x3687be0 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000050, MEM_AP_TAR 0x70bc8047 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x3687be4 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x3687be4 > Warn : Block read error address 0x3687be0 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Warn : Block read error address 0xfffffffc > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Warn : Block read error address 0xfffffffc > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0xfffff000 > Warn : Block read error address 0xfffffffc > 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: 0x00000010 msp: 0x20000800 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x4 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x4 > Warn : Block write error address 0x0, wcount 0x4a2 > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x128c > Error: JTAG-DP STICKY ERROR > Error: MEM_AP_CSW 0x23000052, MEM_AP_TAR 0x128c > Warn : Block write error address 0x1288, wcount 0x8a > > * Output from GDB: * > *$ arm-none-linux-gnueabi-gdb --eval-command="target remote > localhost:3333" main.out * > GNU gdb (Sourcery G++ Lite 2010q1-202) 7.0.50.20100218-cvs > Copyright (C) 2010 Free Software Foundation, Inc. > License GPLv3+: GNU GPL version 3 or later < > http://gnu.org/licenses/gpl.html> > This is free software: you are free to change and redistribute it. > There is NO WARRANTY, to the extent permitted by law. Type "show copying" > and "show warranty" for details. > This GDB was configured as "--host=i686-pc-linux-gnu > --target=arm-none-linux-gnueabi". > For bug reporting instructions, please see: > <https://support.codesourcery.com/GNUToolchain/>... > Reading symbols from > /home/harry/eagle/RepRap_ARM_Based/Firmware/test_example/main.out...done. > warning: Unable to find dynamic linker. > GDB will be unable to debug shared library initializers > and track explicitly loaded dynamic code. > 0x00000000 in myvectors () > A program is being debugged already. Kill it? (y or n) n > Program not killed. > *(gdb) monitor reset init* > JTAG tap: stm32.cpu tap/device found: 0x3ba00477 (mfg: 0x23b, part: 0xba00, > ver: 0x3) > 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: 0x00000010 msp: 0x20000800 > *(gdb) load* > Loading section .text, size 0x1288 lma 0x0 > Loading section .ARM.extab, size 0x228 lma 0x1288 > Load failed > *(gdb) > > -- > > Harry Eakins > ISE2 Rep | ICRS Pres. | Imperial College London > (+44) 7818084877 > > * |