init repository

This commit is contained in:
rmanach
2025-02-19 11:22:12 +01:00
commit a159937fa9
10 changed files with 516 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
export INSTALL_PATH := $(PWD)
SDK_VERSION := 2.1.0
PICOTOOL := $(INSTALL_PATH)/picotool/$(SDK_VERSION)/build/picotool
export PICO_SDK_PATH=$(INSTALL_PATH)/sdk/$(SDK_VERSION)
# if using a different platform or arch, set ot here
export PICO_PLATFORM=rp2350
# project name, need to be passed as make input (ex: make project name=test)
name := ""
install:
@./scripts/install_sdk.bash $(SDK_VERSION)
@./scripts/install_picotool.bash $(SDK_VERSION)
info:
@$(PICOTOOL) info -a
project:
@./scripts/scaffold_project.bash $(name) $(SDK_VERSION)
compile:
@(test -d ${name} && mkdir -p ${name}/build && cd ${name}/build && cmake .. && make -j$(nproc) && echo "project compile successfully") || echo "error: unable to compile project: $(name)"
push: compile
@(test -f $(name)/build/$(name).elf && $(PICOTOOL) load -fx -v $(name)/build/$(name).elf) || echo "error: unable to push project $(name) to device"