Makefile: Added newline separations on openocd commands.

This to reduce the line-lengths and also prefixed the openocd
invoking with "@" (suppress the command line in make).
This commit is contained in:
rodale75 2021-12-01 15:32:18 +01:00 committed by dnordahl83
parent 324d2d4a29
commit 48875f2a78
1 changed files with 25 additions and 9 deletions

View File

@ -316,27 +316,43 @@ build/$(PROJECT).bin: build/$(PROJECT).elf
$(BIN) build/$(PROJECT).elf build/$(PROJECT).bin --gap-fill 0xFF
# Program
upload: build/$(PROJECT).bin
openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/$(PROJECT).elf verify reset exit"
upload: build/$(PROJECT).elf
@openocd -f board/stm32f4discovery.cfg \
-c "reset_config trst_only combined" \
-c "program build/$(PROJECT).elf verify reset exit"
upload_only:
openocd -f board/stm32f4discovery.cfg -c "reset_config trst_only combined" -c "program build/$(PROJECT).elf verify reset exit"
@openocd -f board/stm32f4discovery.cfg \
-c "reset_config trst_only combined" \
-c "program build/$(PROJECT).elf verify reset exit"
clear_option_bytes:
openocd -f board/stm32f4discovery.cfg -c "init" -c "stm32f2x unlock 0" -c "mww 0x40023C08 0x08192A3B; mww 0x40023C08 0x4C5D6E7F; mww 0x40023C14 0x0fffaaed" -c "exit"
@openocd -f board/stm32f4discovery.cfg \
-c "init" \
-c "stm32f2x unlock 0" \
-c "mww 0x40023C08 0x08192A3B" \
-c "mww 0x40023C08 0x4C5D6E7F" \
-c "mww 0x40023C14 0x0fffaaed" \
-c "exit"
#program with olimex arm-usb-tiny-h and jtag-swd adapter board. needs openocd>=0.9
#program with olimex arm-usb-tiny-h and jtag-swd adapter board.
upload-olimex: build/$(PROJECT).bin
openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg -f interface/ftdi/olimex-arm-jtag-swd.cfg -c "set WORKAREASIZE 0x2000" -f target/stm32f4x.cfg -c "program build/$(PROJECT).elf verify reset"
@openocd -f interface/ftdi/olimex-arm-usb-tiny-h.cfg \
-f interface/ftdi/olimex-arm-jtag-swd.cfg \
-c "set WORKAREASIZE 0x2000" \
-f target/stm32f4x.cfg \
-c "program build/$(PROJECT).elf verify reset"
upload-pi: build/$(PROJECT).bin
openocd -f pi_stm32.cfg -c "reset_config trst_only combined" -c "program build/$(PROJECT).elf verify reset exit"
@openocd -f pi_stm32.cfg \
-c "reset_config trst_only combined" \
-c "program build/$(PROJECT).elf verify reset exit"
upload-pi-remote: build/$(PROJECT).elf
./upload_remote_pi build/$(PROJECT).elf ted 10.42.0.199 22
debug-start:
openocd -f stm32-bv_openocd.cfg
@openocd -f stm32-bv_openocd.cfg
size: build/$(PROJECT).elf
@$(SZ) $<