Skip to content

Commit

Permalink
boards: stm32: use std openocd config
Browse files Browse the repository at this point in the history
  • Loading branch information
bradjc authored and alevy committed Mar 22, 2024
1 parent 604d7ec commit 08717bd
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 89 deletions.
5 changes: 2 additions & 3 deletions boards/nucleo_f429zi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ PLATFORM=nucleo_f429zi
include ../Makefile.common

OPENOCD=openocd
OPENOCD_OPTIONS=-f openocd.cfg

# Default target for installing the kernel.
.PHONY: install
install: flash

.PHONY: flash-debug
flash-debug: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/st_nucleo_f4.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: flash
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/st_nucleo_f4.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: program
program: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
Expand Down
15 changes: 0 additions & 15 deletions boards/nucleo_f429zi/openocd.cfg

This file was deleted.

5 changes: 2 additions & 3 deletions boards/nucleo_f446re/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ PLATFORM=nucleo_f446re
include ../Makefile.common

OPENOCD=openocd
OPENOCD_OPTIONS=-f openocd.cfg

# Default target for installing the kernel.
.PHONY: install
install: flash

.PHONY: flash-debug
flash-debug: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/st_nucleo_f4.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: flash
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/st_nucleo_f4.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: program
program: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
Expand Down
15 changes: 0 additions & 15 deletions boards/nucleo_f446re/openocd.cfg

This file was deleted.

5 changes: 2 additions & 3 deletions boards/stm32f3discovery/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ PLATFORM=stm32f3discovery
include ../Makefile.common

OPENOCD=openocd
OPENOCD_OPTIONS=-f openocd.cfg

# Default target for installing the kernel.
.PHONY: install
install: flash

.PHONY: flash-debug
flash-debug: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/stm32f3discovery.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: flash
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/stm32f3discovery.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: program
program: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
Expand Down
22 changes: 0 additions & 22 deletions boards/stm32f3discovery/openocd.cfg

This file was deleted.

5 changes: 2 additions & 3 deletions boards/stm32f412gdiscovery/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,18 @@ PLATFORM=stm32f412gdiscovery
include ../Makefile.common

OPENOCD=openocd
OPENOCD_OPTIONS=-f openocd.cfg

# Default target for installing the kernel.
.PHONY: install
install: flash

.PHONY: flash-debug
flash-debug: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/debug/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/stm32f412g-disco.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: flash
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
$(OPENOCD) $(OPENOCD_OPTIONS) -c "init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"
$(OPENOCD) -c "source [find board/stm32f412g-disco.cfg]; init; reset halt; flash write_image erase $<; verify_image $<; reset; shutdown"

.PHONY: program
program: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).elf
Expand Down
25 changes: 0 additions & 25 deletions boards/stm32f412gdiscovery/openocd.cfg

This file was deleted.

0 comments on commit 08717bd

Please sign in to comment.