-
Notifications
You must be signed in to change notification settings - Fork 17
/
ResetFromCommandline.sh
executable file
·16 lines (11 loc) · 1.07 KB
/
ResetFromCommandline.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
OPENOCD_PATH=/home/thomas/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.externaltools.openocd.linux64_1.20.0.201809060829/tools/openocd
OPENOCD_SCRIPTS_PATH=/home/thomas/Ac6/SystemWorkbench/plugins/fr.ac6.mcu.debug_2.2.0.201807130628/resources/openocd/st_scripts
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$OPENOCD_PATH/lib
$OPENOCD_PATH/bin/openocd -f "KugleFirmware/KugleFirmware Debug.cfg" -s "$OPENOCD_SCRIPTS_PATH" -c "init" -c "targets" -c "reset halt" -c "reset run" -c "exit"
## Flashing can also be done from commandline by adding commands:
# -c "init" -c "targets" -c "reset halt" -c "load_image firmware.elf" -c "reset halt" -c "verify_image firmware.elf" -c "reset run" -c "resume"
# Flash
#$OPENOCD_PATH/bin/openocd -f "KugleFirmware/KugleFirmware Debug.cfg" -s "$OPENOCD_SCRIPTS_PATH" -c "init" -c "reset init" -c "halt" -c "flash write_image erase KugleFirmware/Debug/KugleFirmware.bin 0x08000000" -c "shutdown"
# Reset
#$OPENOCD_PATH/bin/openocd -f "KugleFirmware/KugleFirmware Debug.cfg" -s "$OPENOCD_SCRIPTS_PATH" -c "init" -c "targets" -c "reset halt" -c "reset run" -c "exit"