summaryrefslogtreecommitdiff
path: root/hid/pico/Makefile
diff options
context:
space:
mode:
authorMaxim Devaev <[email protected]>2023-08-03 05:47:27 +0300
committerMaxim Devaev <[email protected]>2023-08-03 05:47:27 +0300
commitc96057772c8d845c90ad7429e51689eeffb63d71 (patch)
treec376d9715169b9248aa8b7ef70b8a6506297f982 /hid/pico/Makefile
parent1a8f98a64f9480c1062225e0fc994ceac4ba346d (diff)
rp2040 hid
Diffstat (limited to 'hid/pico/Makefile')
-rw-r--r--hid/pico/Makefile36
1 files changed, 36 insertions, 0 deletions
diff --git a/hid/pico/Makefile b/hid/pico/Makefile
new file mode 100644
index 00000000..409f8067
--- /dev/null
+++ b/hid/pico/Makefile
@@ -0,0 +1,36 @@
+all: .pico-sdk .tinyusb
+ rm -f hid.uf2
+ cmake -B .build
+ cmake --build .build --config Release -- -j
+ ln .build/src/hid.uf2 .
+
+
+upload: install
+install: all
+ sudo mount /dev/sda1 /mnt
+ sudo cp hid.uf2 /mnt
+ sudo umount /mnt
+
+
+clean:
+ rm -rf .build hid.uf2
+clean-all: clean
+ rm -rf .pico-sdk.tmp .pico-sdk .tinyusb.tmp .tinyusb
+
+
+.pico-sdk:
+ rm -rf .pico-sdk.tmp
+ git clone https://github.com/raspberrypi/pico-sdk .pico-sdk.tmp
+ cd .pico-sdk.tmp \
+ && git checkout 62201a83e2693ea165fdc7669b4ab2f3b4f43c36 \
+ && git submodule update --init
+ mv .pico-sdk.tmp .pico-sdk
+
+
+.tinyusb:
+ rm -rf .tinyusb.tmp
+ git clone https://github.com/hathach/tinyusb .tinyusb.tmp
+ cd .tinyusb.tmp \
+ && git checkout c998e9c60bc76894006c3bd049d661124a9bfbfd \
+ && git submodule update --init
+ mv .tinyusb.tmp .tinyusb