Makefile: added JLink targets
This commit is contained in:
parent
d41c63f948
commit
5e63547f15
34
Makefile
34
Makefile
|
@ -133,14 +133,41 @@ clean:
|
|||
rm -f $(TARGET_BASE).bin
|
||||
rm -f $(OBJ)
|
||||
|
||||
program: program_release #$(BUILD)
|
||||
program: program_jlink
|
||||
|
||||
reset: reset_jlink
|
||||
|
||||
/tmp/jlink_prog_script:
|
||||
echo "Device STM32F030C8" > $@
|
||||
echo "connect" >> $@
|
||||
echo "S" >> $@
|
||||
echo "4000" >> $@
|
||||
echo "loadfile $(TARGET_BASE).hex" >> $@
|
||||
echo "r" >> $@
|
||||
echo "g" >> $@
|
||||
echo "exit" >> $@
|
||||
|
||||
/tmp/jlink_rst_script:
|
||||
echo "Device STM32F030C8" > $@
|
||||
echo "connect" >> $@
|
||||
echo "S" >> $@
|
||||
echo "4000" >> $@
|
||||
echo "r" >> $@
|
||||
echo "g" >> $@
|
||||
echo "exit" >> $@
|
||||
|
||||
program_jlink: /tmp/jlink_prog_script $(TARGET_BASE).hex
|
||||
JLinkExe </tmp/jlink_prog_script
|
||||
|
||||
reset_jlink: /tmp/jlink_rst_script
|
||||
JLinkExe </tmp/jlink_rst_script
|
||||
|
||||
program_release: $(TARGET_BASE).hex
|
||||
$(OOCD) -f $(OOCD_CFG) \
|
||||
-c "init" \
|
||||
-c "reset halt" \
|
||||
-c "flash write_image erase $(TARGET_BASE).hex" \
|
||||
-c "reset" \
|
||||
-c "resume 0x08000000" \
|
||||
-c "shutdown"
|
||||
|
||||
program_debug: $(TARGET_BASE).hex
|
||||
|
@ -152,5 +179,4 @@ program_debug: $(TARGET_BASE).hex
|
|||
-c "shutdown"
|
||||
|
||||
debug: $(TARGET_BASE).hex
|
||||
$(OOCD) -f $(OOCD_CFG) \
|
||||
-c "init"
|
||||
$(JLINK_GDBSERVER) -device STM32F030C8 -if SWD
|
||||
|
|
Loading…
Reference in a new issue