From 403d2e8fe757101c9b0e6e63a3a180c6d835a87a Mon Sep 17 00:00:00 2001 From: Jeremy Soller Date: Wed, 20 Nov 2019 21:22:35 -0700 Subject: [PATCH] Add flash target --- .gitmodules | 4 ++++ ecflash | 1 + src/board/system76/galp3-c/board.mk | 4 ++++ 3 files changed, 9 insertions(+) create mode 160000 ecflash diff --git a/.gitmodules b/.gitmodules index 24ec7a8..7fcb364 100644 --- a/.gitmodules +++ b/.gitmodules @@ -2,3 +2,7 @@ path = ecsim url = https://github.com/system76/ecsim.git branch = master +[submodule "ecflash"] + path = ecflash + url = https://github.com/system76/ecflash.git + branch = master diff --git a/ecflash b/ecflash new file mode 160000 index 0000000..863439d --- /dev/null +++ b/ecflash @@ -0,0 +1 @@ +Subproject commit 863439d2c8794c1c4e78e0f70739bcb04643420d diff --git a/src/board/system76/galp3-c/board.mk b/src/board/system76/galp3-c/board.mk index eda45b2..7c88081 100644 --- a/src/board/system76/galp3-c/board.mk +++ b/src/board/system76/galp3-c/board.mk @@ -19,3 +19,7 @@ include $(SCRATCH_DIR)/scratch.mk # Include scratch header in main firmware CFLAGS+=-I$(BUILD)/include INCLUDE+=$(BUILD)/include/scratch.h + +flash: $(BUILD)/ec.rom + cargo build --manifest-path ecflash/Cargo.toml --example flash --release + sudo ecflash/target/release/examples/flash $<