2015-07-10 06:01:56 -07:00
|
|
|
rem st-link_cli -c SWD ur -ME
|
2017-04-06 19:15:52 -07:00
|
|
|
rem 0x100000 would erase both code and configuration
|
|
|
|
rem use 0x080000 if you want to erase only configuratio
|
2018-12-09 10:50:13 -08:00
|
|
|
echo I am flash_erase.bat
|
2017-02-16 20:08:04 -08:00
|
|
|
|
|
|
|
rem weird, it used to be much nicer with openocd 0.8.0, file location was not broken?
|
|
|
|
rem maybe https://sourceforge.net/p/openocd/tickets/105/ ?
|
|
|
|
|
2017-03-12 14:35:48 -07:00
|
|
|
pwd
|
2019-02-21 05:27:08 -08:00
|
|
|
cd ../misc/install
|
2017-03-12 14:35:48 -07:00
|
|
|
|
|
|
|
if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND
|
|
|
|
if not exist openocd/openocd.exe exit -1
|
|
|
|
|
2017-02-16 20:08:04 -08:00
|
|
|
|
2018-01-23 11:45:56 -08:00
|
|
|
rem newer discovery boards
|
2018-10-13 07:43:55 -07:00
|
|
|
echo Invoking openocd...
|
2019-02-21 05:27:08 -08:00
|
|
|
openocd\openocd.exe -f openocd/st_nucleo_f7.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown
|
2019-02-21 17:51:30 -08:00
|
|
|
echo Just invoked openocd to erase chip!
|
2018-10-13 07:43:55 -07:00
|
|
|
|
2017-02-16 20:08:04 -08:00
|
|
|
|