Цитата(Сергей Борщ @ Sep 23 2016, 13:49)

Не смог стереть. У вас openOCD запущен отдельным процессом? Что он пишет в это время?
Запускаю из eclipse там же и выскакивает эта ошибка.
Код
Started by GNU ARM Eclipse
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : Unable to match requested speed 1000 kHz, using 950 kHz
Info : clock speed 950 kHz
Info : STLINK v2 JTAG v25 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.217221
Info : stm32w108.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : accepting 'gdb' connection on tcp/3333
Info : flash size = 64kbytes
undefined debug reason 7 - target needs reset
stm32w108.cpu: target state: halted
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08004160 msp: 0x20001ff8
semihosting is enabled
Error: timed out while waiting for target halted
TARGET: stm32w108.cpu - Not halted
in procedure 'reset'
in procedure 'ocd_bouncer'
Error: Target not halted
Error: failed erasing sectors 0 to 35
Error: flash_erase returned -304
Info : dropped 'gdb' connectionn
Код
954,074 8^done
954,074 (gdb)
954,074 9-gdb-set breakpoint pending on
954,076 9^done
954,076 (gdb)
954,076 10-enable-pretty-printing
954,076 10^done
954,076 (gdb)
954,076 11-gdb-set python print-stack none
954,077 11^done
954,077 (gdb)
954,077 12-gdb-set print object on
954,080 12^done
954,080 (gdb)
954,080 13-gdb-set print sevenbit-strings on
954,092 13^done
954,092 (gdb)
954,093 14-gdb-set charset ISO-8859-1
954,102 14^done
954,102 (gdb)
954,103 15source .gdbinit
954,114 &"source .gdbinit\n"
954,114 &".gdbinit: No such file or directory.\n"
954,114 15^error,msg=".gdbinit: No such file or directory."
954,114 (gdb)
954,115 16set mem inaccessible-by-default off
954,125 &"set mem inaccessible-by-default off\n"
954,125 =cmd-param-changed,param="mem inaccessible-by-default",value="off"
954,125 16^done
954,125 (gdb)
954,126 17-gdb-set auto-solib-add on
954,126 17^done
954,126 (gdb)
954,127 18-target-select remote localhost:3333
954,696 =thread-group-started,id="i1",pid="42000"
954,696 =thread-created,id="1",group-id="i1"
954,698 19-list-thread-groups --available
954,702 20-list-thread-groups
954,717 ~"0x00000000 in ?? ()\n"
954,717 *stopped,frame={addr="0x00000000",func="??",args=[]},thread-id="1",stopped-threads="all"
954,718 18^connected
954,718 (gdb)
954,718 19^error,msg="Can not fetch data now."
954,718 (gdb)
954,719 20^done,groups=[{id="i1",type="process",pid="42000"}]
954,719 (gdb)
954,750 21monitor reset init
954,750 22monitor halt
954,750 23monitor arm semihosting enable
954,750 24symbol-file C:\\Users\\use\\Desktop\\work\\Debug\\test.elf
954,750 25load C:\\Users\\use\\Desktop\\work\\Debug\\test.elf
954,756 &"monitor reset init\n"
955,005 @"stm32w108.cpu: target state: halted\n"
955,006 @"target halted due to debug-request, current mode: Thread \n"
955,006 @"xPSR: 0x01000000 pc: 0x08004160 msp: 0x20001ff8\n"
955,006 26-list-thread-groups i1
955,017 21^done
955,017 (gdb)
955,017 &"monitor halt\n"
955,035 22^done
955,035 (gdb)
955,035 &"monitor arm semihosting enable\n"
955,049 @"semihosting is enabled\n"
955,052 23^done
955,053 (gdb)
955,053 &"symbol-file C:\\\\Users\\\\use\\\\Desktop\\\\work\\\\Debug\\\\test.elf\n"
955,053 ~"Reading symbols from C:\\Users\\use\\Desktop\\work\\Debug\\test.elf..."
955,059 ~"done.\n"
955,078 24^done
955,078 (gdb)
955,079 &"load C:\\\\Users\\\\use\\\\Desktop\\\\work\\\\Debug\\\\test.elf\n"
956,117 &"Error erasing flash with vFlashErase packet\n"
956,118 25^error,msg="Error erasing flash with vFlashErase packet"
956,118 (gdb)
956,119 27-gdb-exit
956,121 26^done,threads=[{id="1",target-id="Remote target",frame={level="0",addr="0x00000000",func="\
??",args=[]},state="stopped"}]
956,121 (gdb)
956,121 27^exit
956,121 =thread-group-exited,id="i1"