diff --git a/scripts/openocd-flash.sh b/scripts/openocd-flash.sh
index 3ef3a604bc34ed7901abc23217a5ef7fcf11c586..f395706469b907f56e039024e939dc16af460681 100755
--- a/scripts/openocd-flash.sh
+++ b/scripts/openocd-flash.sh
@@ -5,4 +5,4 @@ if [ $# -ne 1 ]; then
     exit -1
 fi;
 
-gdb -ex 'target remote :3333' -ex 'monitor reset halt'  -ex 'monitor reset halt'  -ex 'monitor reset halt' -ex "monitor flash write_image erase $1 0x08000000" -ex 'continue&' -ex 'set confirm off' -ex 'quit'
+arm-miosix-eabi-gdb -ex 'target remote :3333' -ex 'monitor reset halt'  -ex 'monitor reset halt'  -ex 'monitor reset halt' -ex "monitor flash write_image erase $1 0x08000000" -ex 'continue&' -ex 'set confirm off' -ex 'quit'