-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 1.01 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
TOOLCHAINS="org.swift.59202408071a"
BOARD="pico"
PICO_TOOLCHAIN_PATH="/Applications/LLVM-ET-Arm-18.1.3-Darwin-universal"
CWD := $(shell pwd)
.PHONY: build setup
build:
set -e; \
TOOLCHAINS=$(TOOLCHAINS) PICO_SDK_PATH="$(CWD)/../pico-sdk" PICO_BOARD=$(BOARD) cmake --build build
@echo "🚀 Done 🚀"
setup:
rm -rf build
TOOLCHAINS=$(TOOLCHAINS) PICO_SDK_PATH="$(CWD)/../pico-sdk" PICO_BOARD=$(BOARD) cmake -B build -G 'Ninja'
clean:
rm -rf build
install:
cp ./build/pico_swift.uf2 /Volumes/RPI-RP2/
llvm:
set -e; \
TOOLCHAINS=$(TOOLCHAINS) PICO_SDK_PATH="$(CWD)/../pico-sdk-2" PICO_DEFAULT_COMPILER="pico_arm_clang" PICO_COMPILER="pico_arm_clang" PICO_TOOLCHAIN_PATH=$(PICO_TOOLCHAIN_PATH) PICO_BOARD=$(BOARD) cmake --build build
@echo "🚀 Done by LLVM 🚀"
setup_llvm:
rm -rf build
TOOLCHAINS=$(TOOLCHAINS) PICO_SDK_PATH="$(CWD)/../pico-sdk-2" PICO_DEFAULT_COMPILER="pico_arm_clang" PICO_COMPILER="pico_arm_clang" PICO_TOOLCHAIN_PATH=$(PICO_TOOLCHAIN_PATH) PICO_BOARD=$(BOARD) cmake -B build -G 'Ninja'