Kaynağa Gözat

Added a Makefile rule to flash with OpenOCD

Clara Hobbs 7 yıl önce
ebeveyn
işleme
32cd013a50
2 değiştirilmiş dosya ile 8 ekleme ve 2 silme
  1. 5
    0
      Makefile
  2. 3
    2
      README.md

+ 5
- 0
Makefile Dosyayı Görüntüle

211
 
211
 
212
 RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
212
 RULESPATH = $(CHIBIOS)/os/common/ports/ARMCMx/compilers/GCC
213
 include $(RULESPATH)/rules.mk
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 Dosyayı Görüntüle

86
 
86
 
87
 ### OpenOCD
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
 ## Usage
94
 ## Usage
94
 
95
 

Loading…
İptal
Kaydet