aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJacques Comeaux <jacquesrcomeaux@protonmail.com>2023-12-23 14:12:08 -0600
committerJacques Comeaux <jacquesrcomeaux@protonmail.com>2023-12-23 14:12:08 -0600
commit8f6eed4e102500204879d848572547b35a267cea (patch)
treead5f5138f9068af37d11e20ac6c87e28c3f92d45 /Makefile
parent987e12b6c90ed3a3606a4948e9d7cad6d6f34026 (diff)
Use crystal oscilator for system clock
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile17
1 files changed, 7 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 3a94707..7873488 100644
--- a/Makefile
+++ b/Makefile
@@ -2,19 +2,16 @@ all: build
build: blink.uf2
-# convert ELF file to UF2 file
blink.uf2: blink.elf
- elf2uf2 blink.elf blink.uf2
+ ./elf2uf2 blink.elf blink.uf2
-# compile
-blink.elf: blink.o
- arm-none-eabi-ld -T pico_ram_only.ld -o blink.elf blink.o
+objects = main.o blink.o clocks.o gpio.o pll.o xosc.o
-blink.o: blink.s
- arm-none-eabi-as -o blink.o blink.s
+blink.elf: $(objects)
+ arm-none-eabi-ld -T pico_ram_only.ld -o blink.elf $(objects)
-# flash: build/blink.uf2
-# cp build/blink.uf2 /Volumes/RPI-RP2
+$(objects): %.o: %.s
+ arm-none-eabi-as -o $@ $<
clean:
- rm blink.elf blink.uf2 blink.o
+ rm blink.elf blink.uf2 *.o