aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@protonmail.com>2023-12-17 14:57:23 -0600
committerJacques Comeaux <jacquesrcomeaux@protonmail.com>2023-12-17 14:57:23 -0600
commit42479c459305481591cdafb6d6d0e1979564f1f0 (patch)
treea0ca4f4ea289e1068adea8e48c62bd15e6721475 /Makefile
Initial commit
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile20
1 files changed, 20 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..3a94707
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+all: build
+
+build: blink.uf2
+
+# convert ELF file to UF2 file
+blink.uf2: blink.elf
+ elf2uf2 blink.elf blink.uf2
+
+# compile
+blink.elf: blink.o
+ arm-none-eabi-ld -T pico_ram_only.ld -o blink.elf blink.o
+
+blink.o: blink.s
+ arm-none-eabi-as -o blink.o blink.s
+
+# flash: build/blink.uf2
+# cp build/blink.uf2 /Volumes/RPI-RP2
+
+clean:
+ rm blink.elf blink.uf2 blink.o