From 4605ee4600c162da7134121bf9be0f8839f3d3ef Mon Sep 17 00:00:00 2001 From: rusefi Date: Thu, 21 Feb 2019 08:27:08 -0500 Subject: [PATCH] F7 progress --- .../{flash_erase.bat => flash_erase407.bat} | 3 +-- firmware/flash_erase767.bat | 23 +++++++++++++++++++ firmware/flash_openocd.bat | 9 -------- firmware/flash_openocd407.bat | 9 ++++++++ firmware/flash_openocd767.bat | 9 ++++++++ 5 files changed, 42 insertions(+), 11 deletions(-) rename firmware/{flash_erase.bat => flash_erase407.bat} (94%) create mode 100644 firmware/flash_erase767.bat delete mode 100644 firmware/flash_openocd.bat create mode 100644 firmware/flash_openocd407.bat create mode 100644 firmware/flash_openocd767.bat diff --git a/firmware/flash_erase.bat b/firmware/flash_erase407.bat similarity index 94% rename from firmware/flash_erase.bat rename to firmware/flash_erase407.bat index 3bc90f224c..6cb14cd6dc 100644 --- a/firmware/flash_erase.bat +++ b/firmware/flash_erase407.bat @@ -7,8 +7,7 @@ rem weird, it used to be much nicer with openocd 0.8.0, file location was not br rem maybe https://sourceforge.net/p/openocd/tickets/105/ ? pwd -cp -r ../misc/install/openocd . -ls -l +cd ../misc/install if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND if not exist openocd/openocd.exe exit -1 diff --git a/firmware/flash_erase767.bat b/firmware/flash_erase767.bat new file mode 100644 index 0000000000..df01ca5846 --- /dev/null +++ b/firmware/flash_erase767.bat @@ -0,0 +1,23 @@ +rem st-link_cli -c SWD ur -ME +rem 0x100000 would erase both code and configuration +rem use 0x080000 if you want to erase only configuratio +echo I am flash_erase.bat + +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/ ? + +pwd +cd ../misc/install + +if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND +if not exist openocd/openocd.exe exit -1 + + +rem newer discovery boards +echo Invoking openocd... +openocd\openocd.exe -f openocd/st_nucleo_f7.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown +echo Just invoked openocd! + + +rem older disocovery boards or cheap eBay ST-Link +rem openocd\openocd.exe -f openocd/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x0100000" -c shutdown \ No newline at end of file diff --git a/firmware/flash_openocd.bat b/firmware/flash_openocd.bat deleted file mode 100644 index 426cc97b0c..0000000000 --- a/firmware/flash_openocd.bat +++ /dev/null @@ -1,9 +0,0 @@ -echo I am flash_openocd.bat - -cp -r ../misc/install/openocd . - -if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND -if not exist openocd/openocd.exe exit -1 - -openocd\openocd -f openocd/stm32f4discovery.cfg -c "program build/rusefi.bin verify reset exit 0x08000000" - diff --git a/firmware/flash_openocd407.bat b/firmware/flash_openocd407.bat new file mode 100644 index 0000000000..7aad202a4a --- /dev/null +++ b/firmware/flash_openocd407.bat @@ -0,0 +1,9 @@ +echo I am flash_openocd.bat + +cd ../misc/install + +if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND +if not exist openocd/openocd.exe exit -1 + +openocd\openocd -f openocd/stm32f4discovery.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000" + diff --git a/firmware/flash_openocd767.bat b/firmware/flash_openocd767.bat new file mode 100644 index 0000000000..035d668b5e --- /dev/null +++ b/firmware/flash_openocd767.bat @@ -0,0 +1,9 @@ +echo I am flash_openocd767.bat + +cd ../misc/install + +if not exist openocd/openocd.exe echo openocd/openocd.exe NOT FOUND +if not exist openocd/openocd.exe exit -1 + +openocd\openocd -f openocd/st_nucleo_f7.cfg -c "program ../../firmware/build/rusefi.bin verify reset exit 0x08000000" +