Skip to content

Commit

Permalink
Adding extra plumbing to get UF2 files to Desktop from WSL.
Browse files Browse the repository at this point in the history
  • Loading branch information
amacleod committed Oct 31, 2024
1 parent 3868b36 commit 0909696
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
.PHONY: weejock
.PHONY: zaphod zaphod_lite
.PHONY: deploy_corne deploy_ferris deploy_weejock deploy_zaphod
.PHONY: transfer

MAKEFLAGS += --jobs=2

Expand All @@ -24,11 +25,10 @@ SPACE := $(EMPTY) $(EMPTY)
XIAO_PATH := /media/${USER}/XIAO-SENSE
NANO_PATH := /media/${USER}/NICENANO

# Uncomment WESTFLAGS and CMAKEFLAGS if using ZMK Studio.
#WESTFLAGS := -S studio-rpc-usb-uart
#CMAKEFLAGS := -DCONFIG_ZMK_STUDIO=y
WIN_DESKTOP := /mnt/c/Users/${USER}/Desktop
KBD_PARTS := corne_left corne_right cradio_left cradio_right weejock zaphod_lite

all: corne ferris zaphod
all: corne ferris weejock zaphod

corne: corne_left corne_right
ls -l ${BUILD_DIR}/corne_*/zephyr/zmk.uf2
Expand Down Expand Up @@ -74,5 +74,11 @@ deploy_zaphod: zaphod_lite
@echo
cp -v ${BUILD_DIR}/zaphod_lite/zephyr/zmk.uf2 ${XIAO_PATH}/

# For getting UF2s from WSL to the Windows desktop.
transfer:
@for x in ${KBD_PARTS}; do \
if [ -d ${BUILD_DIR}/$${x} ]; then cp -v ${BUILD_DIR}/$${x}/zephyr/zmk.uf2 ${WIN_DESKTOP}/$${x}.uf2 ; fi \
done

clean:
rm -rf ${BUILD_DIR}

0 comments on commit 0909696

Please sign in to comment.