From 04111f06c66f6f935651903e85bda36d6f05d349 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Thu, 25 Apr 2024 12:47:39 +0200 Subject: improve build/flash instructions --- main/makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 main/makefile (limited to 'main/makefile') diff --git a/main/makefile b/main/makefile new file mode 100644 index 0000000..833fd02 --- /dev/null +++ b/main/makefile @@ -0,0 +1,22 @@ +# this file is for lazy people (loek) + +.PHONY: FORCE + +all: FORCE build/main.uf2 + +build/build.ninja: CMakeLists.txt + mkdir -p build + cmake -B build -G Ninja + +build/main.uf2: build/build.ninja FORCE + ninja -C build +# ninja automatically builds in parallel, so is preferred + +flash: build/main.uf2 FORCE + picotool load -fx $< +# -f forces a reboot of the pico before flashing +# -x resets the pico after flashing + +clean: FORCE + $(RM) -r build + -- cgit v1.2.3