From a90347438e51bbd5f65c1c58c76ba339df7fc814 Mon Sep 17 00:00:00 2001 From: Louis Burda Date: Tue, 29 Nov 2022 00:53:17 +0100 Subject: Refactoring and added sdk uart (not working) --- Makefile | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a47ee7d..70763b2 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,34 @@ FAMILY ?= rp2040 PICO_SDK_PATH ?= lib/picosdk -all: cmake +all: left clean: rm -rf .build -cmake: | $(PICO_SDK_PATH) .build - cmake -B .build -DFAMILY=$(FAMILY) -DPICO_SDK_PATH=$(PICO_SDK_PATH) - make -C .build +left: | $(PICO_SDK_PATH) .build/left + cmake -B .build/left -DFAMILY=$(FAMILY) -DPICO_SDK_PATH=$(PICO_SDK_PATH) \ + -DSPLIT_SIDE=LEFT -DSPLIT_ROLE=MASTER + make -C .build/left + +right: | $(PICO_SDK_PATH) .build/right + cmake -B .build/right -DFAMILY=$(FAMILY) -DPICO_SDK_PATH=$(PICO_SDK_PATH) \ + -DSPLIT_SIDE=RIGHT -DSPLIT_ROLE=SLAVE + make -C .build/right lib/picosdk: git submodule update --init lib/picosdk -.build: - mkdir $@ +.build/left: + mkdir -p $@ + +.build/right: + mkdir -p $@ + +flash_left: + picotool load .build/left/sxkbd.uf2 -flash: - picotool load .build/sxkbd.uf2 +flash_right: + picotool load .build/right/sxkbd.uf2 -.PHONY: all clean cmake upload +.PHONY: all clean left right upload -- cgit v1.2.3-71-gd317