summaryrefslogtreecommitdiff
path: root/config/toolchain.mk
blob: 4e58227c4e2291f8799c1f18dbfecc8f69dea4ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
ifeq ($(CPU),arm)
TOOLCHAIN = arm-none-eabi
ifeq ($(CPU_FLAVOR),lpc1768)
TARGET_CPPFLAGS += -mcpu=cortex-m3 -mtune=cortex-m3 -D__thumb2__=1 -march=armv7-m -mfix-cortex-m3-ldrd
endif
TARGET_CPPFLAGS += -Os -mapcs-frame -msoft-float -mno-sched-prolog -fno-hosted -ffunction-sections -fdata-sections -fshort-wchar
TARGET_CFLAGS += -mthumb
endif

TARGET_CC = $(TOOLCHAIN)-gcc
TARGET_CXX = $(TOOLCHAIN)-g++
TARGET_LD = $(TOOLCHAIN)-gcc
TARGET_RANLIB = $(TOOLCHAIN)-ranlib
TARGET_AR = $(TOOLCHAIN)-ar
TARGET_AS = $(TOOLCHAIN)-gcc
TARGET_OBJCOPY = $(TOOLCHAIN)-objcopy