ARM_AS ?= $(ARM_CROSS_COMPILE)as
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
+ARM_AFLAGS = -EL
+
arm: armv4_5_crc.inc armv7m_crc.inc
armv4_5_%.elf: armv4_5_%.s
- $(ARM_AS) $< -o $@
+ $(ARM_AS) $(ARM_AFLAGS) $< -o $@
armv4_5_%.bin: armv4_5_%.elf
$(ARM_OBJCOPY) -Obinary $< $@
$(BIN2C) < $< > $@
armv7m_%.elf: armv7m_%.s
- $(ARM_AS) $< -o $@
+ $(ARM_AS) $(ARM_AFLAGS) $< -o $@
armv7m_%.bin: armv7m_%.elf
$(ARM_OBJCOPY) -Obinary $< $@
ARM_AS ?= $(ARM_CROSS_COMPILE)as
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
+ARM_AFLAGS = -EL
+
arm: armv4_5_erase_check.inc armv7m_erase_check.inc armv7m_0_erase_check.inc
armv4_5_%.elf: armv4_5_%.s
- $(ARM_AS) $< -o $@
+ $(ARM_AS) $(ARM_AFLAGS) $< -o $@
armv4_5_%.bin: armv4_5_%.elf
$(ARM_OBJCOPY) -Obinary $< $@
$(BIN2C) < $< > $@
armv7m_%.elf: armv7m_%.s
- $(ARM_AS) $< -o $@
+ $(ARM_AS) $(ARM_AFLAGS) $< -o $@
armv7m_%.bin: armv7m_%.elf
$(ARM_OBJCOPY) -Obinary $< $@
OBJCOPY=$(CROSS_COMPILE)objcopy
OBJDUMP=$(CROSS_COMPILE)objdump
+CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
+
all: erase.inc write.inc
.PHONY: clean
erase.elf write.elf: fm4.h
%.elf: %.S
- $(CC) -static -nostartfiles $< -o $@
+ $(CC) $(CFLAGS) $< -o $@
%.lst: %.elf
$(OBJDUMP) -S $< > $@
AS = $(CROSS_COMPILE)as
OBJCOPY = $(CROSS_COMPILE)objcopy
+AFLAGS = -EL
+
all: kinetis_ke_flash.inc kinetis_ke_watchdog.inc
%.elf: %.s
- $(AS) $< -o $@
+ $(AS) $(AFLAGS) $< -o $@
%.bin: %.elf
$(OBJCOPY) -Obinary $< $@
OBJCOPY=$(CROSS_COMPILE)objcopy
OBJDUMP=$(CROSS_COMPILE)objdump
+CFLAGS = -static -nostartfiles -mlittle-endian -Wa,-EL
+
all: erase.inc erase_check.inc write.inc
.PHONY: clean
erase.elf erase_check.elf write.elf: xmc1xxx.S
%.elf: %.S
- $(CC) -static -nostartfiles $< -o $@
+ $(CC) $(CFLAGS) $< -o $@
%.lst: %.elf
$(OBJDUMP) -S $< > $@
ARM_AS ?= $(ARM_CROSS_COMPILE)as
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
+ARM_AFLAGS = -EL -mthumb
+
arm: armv7m_kinetis_wdog.inc
armv7m_%.elf: armv7m_%.s
- $(ARM_AS) -mthumb $< -o $@
+ $(ARM_AS) $(ARM_AFLAGS) $< -o $@
armv7m_%.bin: armv7m_%.elf
$(ARM_OBJCOPY) -Obinary $< $@