Created
June 23, 2019 04:35
-
-
Save zmarvel/1e3f28c533ddfdea9eb9d94edb7f4a32 to your computer and use it in GitHub Desktop.
Helper make rules for ChibiOS projects
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OPENOCD ?= /usr/bin/openocd/ | |
OPENOCD_SCRIPTS ?= /usr/share/openocd/scripts | |
openocd: $(ELF) | |
$(OPENOCD) -s $(OPENOCD_SCRIPTS) \ | |
-f interface/stlink-v2-1.cfg \ | |
-f target/stm32l4x.cfg \ | |
-c "telnet_port 4444" \ | |
-c "gdb_port 3333" | |
download: $(ELF) | |
$(OPENOCD) -s $(OPENOCD_SCRIPTS) \ | |
-f interface/stlink-v2-1.cfg \ | |
-f target/stm32l4x.cfg \ | |
-c "init" \ | |
-c "targets" \ | |
-c "reset halt" \ | |
-c "program $< verify" \ | |
-c "reset run" \ | |
-c "exit" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment