diff --git a/firmware/clean.bat b/firmware/clean.bat index 241e3ea846..3deaa2bf90 100644 --- a/firmware/clean.bat +++ b/firmware/clean.bat @@ -1,2 +1,3 @@ +echo I am clean.bat rd /s /q .dep rd /s /q build diff --git a/firmware/compile.bat b/firmware/compile.bat index a21cbf3d6b..fd8fc293f0 100644 --- a/firmware/compile.bat +++ b/firmware/compile.bat @@ -41,9 +41,7 @@ arm-none-eabi-size --format=berkeley "build\rusefi.elf" arm-none-eabi-gcc -v rem file, let's program the board right away -cd build -call ../flash_openocd -cd .. +call flash_openocd goto end_of_file :error diff --git a/firmware/flash_erase.bat b/firmware/flash_erase.bat index 162e74e5ac..94530069db 100644 --- a/firmware/flash_erase.bat +++ b/firmware/flash_erase.bat @@ -1,4 +1,13 @@ rem st-link_cli -c SWD ur -ME rem 0x080000 would erase both code and configuration -rem use 0x040000 if you want to erase only configuration -openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x080000" -c shutdown \ No newline at end of file +rem use 0x040000 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/ ? + +cp -r ../misc/install/openocd . + +openocd/openocd -f openocd/stm32f429disc1.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x080000" -c shutdown + +rem openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c init -c targets -c "halt" -c "flash erase_address 0x08000000 0x080000" -c shutdown \ No newline at end of file diff --git a/firmware/flash_openocd.bat b/firmware/flash_openocd.bat index be480b515e..837ba73650 100644 --- a/firmware/flash_openocd.bat +++ b/firmware/flash_openocd.bat @@ -1 +1,8 @@ -openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c "program rusefi.bin verify reset exit 0x08000000" +echo I am flash_openocd.bat + +cp -r ../misc/install/openocd . + + +openocd/openocd -f openocd/stm32f429disc1.cfg -c "program build/rusefi.bin verify reset exit 0x08000000" + +rem openocd-0.8.0.exe -f interface/stlink-v2.cfg -f board/stm32f4discovery.cfg -c "program rusefi.bin verify reset exit 0x08000000"