aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
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..2d60cfa
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,20 @@
+XC32_PATH=/opt/microchip/xc32/v2.30/bin
+
+NAME:=main
+PROCESSOR:=32MZ2048ECG064
+
+ASM:=$(NAME).s
+OBJ:=$(NAME).o
+ELF:=$(NAME).elf
+HEX:=$(NAME).hex
+
+default: $(HEX)
+
+$(OBJ): %.o: %.s
+ $(XC32_PATH)/xc32-as -o $@ $<
+
+$(ELF): $(OBJ)
+ $(XC32_PATH)/xc32-gcc -mprocessor=$(PROCESSOR) -o $@ $^
+
+$(HEX): $(ELF)
+ $(XC32_PATH)/xc32-bin2hex $<