Преглед изворни кода

Added a Makefile rule to flash with OpenOCD

Clara Hobbs пре 7 година
родитељ
комит
32cd013a50
2 измењених фајлова са 8 додато и 2 уклоњено
  1. 5
    0
      Makefile
  2. 3
    2
      README.md

+ 5
- 0
Makefile Прегледај датотеку

@@ -211,3 +211,8 @@ ULIBS =
211 211
 
212 212
 RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
213 213
 include $(RULESPATH)/rules.mk
214
+
215
+# Special rules follow
216
+
217
+flash-openocd-stlink: $(BUILDDIR)/$(PROJECT).elf
218
+	openocd -f interface/stlink-v2.cfg -c "transport select hla_swd" -f target/stm32f0x.cfg -c "program $(BUILDDIR)/$(PROJECT).elf verify reset exit"

+ 3
- 2
README.md Прегледај датотеку

@@ -86,9 +86,10 @@ follows:
86 86
 
87 87
 ### OpenOCD
88 88
 
89
-OpenOCD can also be used to flash the firmware.  For example:
89
+OpenOCD can also be used to flash the firmware.  If your debug probe is an
90
+ST-LINK/V2, you can easily do this as follows:
90 91
 
91
-    $ openocd -f interface/stlink-v2.cfg -f target/stm32f0x.cfg -c "program build/pd-buddy-firmware.elf verify reset exit"
92
+    $ make flash-openocd-stlink
92 93
 
93 94
 ## Usage
94 95
 

Loading…
Откажи
Сачувај