aboutsummaryrefslogtreecommitdiff
path: root/contrib/loaders/flash/numicro_m4/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/loaders/flash/numicro_m4/Makefile')
-rw-r--r--contrib/loaders/flash/numicro_m4/Makefile31
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/loaders/flash/numicro_m4/Makefile b/contrib/loaders/flash/numicro_m4/Makefile
new file mode 100644
index 0000000..0f9c507
--- /dev/null
+++ b/contrib/loaders/flash/numicro_m4/Makefile
@@ -0,0 +1,31 @@
+# SPDX-License-Identifier: GPL-2.0-or-later
+
+BIN2C = ../../../../src/helper/bin2char.sh
+
+CROSS_COMPILE ?= arm-none-eabi-
+
+CC=$(CROSS_COMPILE)gcc
+OBJCOPY=$(CROSS_COMPILE)objcopy
+OBJDUMP=$(CROSS_COMPILE)objdump
+
+
+AFLAGS = -static -nostartfiles -mlittle-endian -mcpu=cortex-m4 -Wa,-EL
+
+all: numicro_m4.inc
+
+.PHONY: clean
+
+%.elf: %.S
+ $(CC) $(AFLAGS) $< -o $@
+
+%.lst: %.elf
+ $(OBJDUMP) -S $< > $@
+
+%.bin: %.elf
+ $(OBJCOPY) -Obinary $< $@
+
+%.inc: %.bin
+ $(BIN2C) < $< > $@
+
+clean:
+ -rm -f *.elf *.lst *.bin *.inc