Skip to content

Commit

Permalink
Merge #2026
Browse files Browse the repository at this point in the history
2026: boards: nrf52840dk: add flash-openocd r=ppannuto a=bradjc

### Pull Request Overview

This pull request adds a make target to the nrf52840dk makefile. Fixes #1626.


### Testing Strategy

Flashing a kernel on nrf52840dk.


### TODO or Help Wanted

n/a


### Documentation Updated

- [x] Updated the relevant files in `/docs`, or no updates are required.

### Formatting

- [x] Ran `make prepush`.


Co-authored-by: Brad Campbell <bradjc5@gmail.com>
  • Loading branch information
bors[bot] and bradjc committed Jul 20, 2020
2 parents b720a48 + 6b24df8 commit f40419e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions boards/nordic/nrf52840dk/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,15 @@ ifdef PORT
TOCKLOADER_GENERAL_FLAGS += --port $(PORT)
endif

TOCKLOADER_JTAG_FLAGS = --jlink --board nrf52dk

# Upload the kernel over JTAG
.PHONY: flash
flash: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).bin
$(TOCKLOADER) $(TOCKLOADER_GENERAL_FLAGS) flash --address $(KERNEL_ADDRESS) $(TOCKLOADER_JTAG_FLAGS) $<
$(TOCKLOADER) $(TOCKLOADER_GENERAL_FLAGS) flash --address $(KERNEL_ADDRESS) --board nrf52dk --jlink $<

# Upload the kernel over JTAG using OpenOCD
.PHONY: flash-openocd
flash-openocd: $(TOCK_ROOT_DIRECTORY)target/$(TARGET)/release/$(PLATFORM).bin
$(TOCKLOADER) $(TOCKLOADER_GENERAL_FLAGS) flash --address $(KERNEL_ADDRESS) --board nrf52dk --openocd $<

# Upload the kernel over serial/bootloader
.PHONY: program
Expand Down

0 comments on commit f40419e

Please sign in to comment.