contrib/loaders: Enforce Little Endian ARM machine code
arm-none-eabi target triplet defaults to Little Endian, and so far any submitted machine code snippets have been verified to be Little Endian. However a user might override [ARM_]CROSS_COMPILE with an armeb toolchain, potentially resulting in invalid machine code. Let's be safe and enforce Little Endian mode for assembler and compiler. Change-Id: I9cefe24689eaded25d60ffb1f254b254e8d76f9d Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-on: http://openocd.zylin.com/3498 Tested-by: jenkins Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
This commit is contained in:
committed by
Andreas Fritiofson
parent
0e95629eb1
commit
81631e49a6
@@ -4,10 +4,12 @@ CROSS_COMPILE ?= arm-none-eabi-
|
||||
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 $< $@
|
||||
|
||||
Reference in New Issue
Block a user