Files
passr-firmware/Makefile
Benjamin Kyd e78432a258 lmao
2023-05-26 15:19:16 +01:00

33 lines
603 B
Makefile

.ONESHELL:
TARGET=rpi_pico
CMAKE_ZEPHYR_PATH=../zephyrproject/zephyr
CMAKE_ZEPHYR_COMMAND=west build
CMAKE_ZEPHYR_FLAGS=-b $(TARGET)
all: compile flash_pico
setup:
west init
west update
compile:
$(CMAKE_ZEPHYR_COMMAND) $(CMAKE_ZEPHYR_FLAGS)
cp build/zephyr/zephyr.uf2 ./zephyr.uf2
echo "Copied zephyr.uf2 to project root"
flash_pico:
# mount then copy the uf2
sudo mount -L RPI-RP2 /mnt
sudo cp zephyr.uf2 /mnt
echo "Copied zephyr.uf2 to pico"
# FIXME: This is entirely board specific, for example the pi pico will vibe differently
flash:
west flash
clean:
rm -rf build/
mkdir build