Skip to content

Commit

Permalink
Make it possible to use another toolchain by defining CROSS_COMPILE
Browse files Browse the repository at this point in the history
It's much easier to use e.g.

CROSS_COMPILE=arm-cortexm3-eabi- make

than to change a dozen lines in two Makefiles.
  • Loading branch information
aholler authored and dominicgs committed Mar 4, 2014
1 parent d242bca commit 8eb6e9b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
19 changes: 10 additions & 9 deletions firmware/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,16 @@ PROGDEV ?= /dev/ttyUSB0
#============================================================================

# Define programs and commands.
CC = arm-none-eabi-gcc
LD = arm-none-eabi-gcc -T
AS = arm-none-eabi-as
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
READELF = arm-none-eabi-readelf
SIZE = arm-none-eabi-size
AR = arm-none-eabi-ar -r
NM = arm-none-eabi-nm
CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)gcc -T
AS = $(CROSS_COMPILE)as
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf
SIZE = $(CROSS_COMPILE)size
AR = $(CROSS_COMPILE)ar -r
NM = $(CROSS_COMPILE)nm
REMOVE = rm -f

# Define Messages
Expand Down
19 changes: 10 additions & 9 deletions firmware/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -244,15 +244,16 @@ PROGDEV ?= /dev/ttyUSB0
#============================================================================

# Define programs and commands.
CC = arm-none-eabi-gcc
LD = arm-none-eabi-gcc -T
AS = arm-none-eabi-as
OBJCOPY = arm-none-eabi-objcopy
OBJDUMP = arm-none-eabi-objdump
READELF = arm-none-eabi-readelf
SIZE = arm-none-eabi-size
AR = arm-none-eabi-ar -r
NM = arm-none-eabi-nm
CROSS_COMPILE ?= arm-none-eabi-
CC = $(CROSS_COMPILE)gcc
LD = $(CROSS_COMPILE)gcc -T
AS = $(CROSS_COMPILE)as
OBJCOPY = $(CROSS_COMPILE)objcopy
OBJDUMP = $(CROSS_COMPILE)objdump
READELF = $(CROSS_COMPILE)readelf
SIZE = $(CROSS_COMPILE)size
AR = $(CROSS_COMPILE)ar -r
NM = $(CROSS_COMPILE)nm
REMOVE = rm -f

#
Expand Down

0 comments on commit 8eb6e9b

Please sign in to comment.