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 $<