2015-11-28 20:09:46 -06:00
|
|
|
BIN2C = ../../../src/helper/bin2char.sh
|
|
|
|
|
|
|
|
ARM_CROSS_COMPILE ?= arm-none-eabi-
|
|
|
|
ARM_AS ?= $(ARM_CROSS_COMPILE)as
|
|
|
|
ARM_OBJCOPY ?= $(ARM_CROSS_COMPILE)objcopy
|
|
|
|
|
2016-05-21 17:41:15 -05:00
|
|
|
ARM_AFLAGS = -EL
|
|
|
|
|
2017-11-06 12:56:28 -06:00
|
|
|
STM8_CROSS_COMPILE ?= stm8-
|
|
|
|
STM8_AS ?= $(STM8_CROSS_COMPILE)as
|
|
|
|
STM8_OBJCOPY ?= $(STM8_CROSS_COMPILE)objcopy
|
|
|
|
|
|
|
|
STM8_AFLAGS =
|
|
|
|
|
2017-11-23 04:17:53 -06:00
|
|
|
arm: armv4_5_erase_check.inc armv7m_erase_check.inc
|
2015-11-28 21:15:57 -06:00
|
|
|
|
|
|
|
armv4_5_%.elf: armv4_5_%.s
|
2016-05-21 17:41:15 -05:00
|
|
|
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
2015-11-28 21:15:57 -06:00
|
|
|
|
|
|
|
armv4_5_%.bin: armv4_5_%.elf
|
|
|
|
$(ARM_OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
armv4_5_%.inc: armv4_5_%.bin
|
|
|
|
$(BIN2C) < $< > $@
|
2015-11-28 20:09:46 -06:00
|
|
|
|
|
|
|
armv7m_%.elf: armv7m_%.s
|
2016-05-21 17:41:15 -05:00
|
|
|
$(ARM_AS) $(ARM_AFLAGS) $< -o $@
|
2015-11-28 20:09:46 -06:00
|
|
|
|
|
|
|
armv7m_%.bin: armv7m_%.elf
|
|
|
|
$(ARM_OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
armv7m_%.inc: armv7m_%.bin
|
|
|
|
$(BIN2C) < $< > $@
|
|
|
|
|
2017-11-06 12:56:28 -06:00
|
|
|
stm8: stm8_erase_check.inc
|
|
|
|
|
|
|
|
stm8_%.elf: stm8_%.s
|
|
|
|
$(STM8_AS) $(STM8_AFLAGS) $< -o $@
|
|
|
|
|
|
|
|
stm8_%.bin: stm8_%.elf
|
|
|
|
$(STM8_OBJCOPY) -Obinary $< $@
|
|
|
|
|
|
|
|
stm8_%.inc: stm8_%.bin
|
|
|
|
$(BIN2C) < $< > $@
|
|
|
|
|
2015-11-28 20:09:46 -06:00
|
|
|
clean:
|
|
|
|
-rm -f *.elf *.bin *.inc
|