2011-07-19 08:09:03 +00:00
|
|
|
##########################################################################
|
|
|
|
# User configuration and firmware specific object files
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
# The target, flash and ram of the LPC1xxx microprocessor.
|
|
|
|
# Use for the target the value: LPC11xx, LPC13xx or LPC17xx
|
|
|
|
TARGET = LPC13xx
|
|
|
|
FLASH = 32K
|
|
|
|
SRAM = 8K
|
|
|
|
RAMCODE=1K
|
|
|
|
|
|
|
|
# For USB HID support the LPC134x reserves 384 bytes from the sram,
|
|
|
|
# if you don't want to use the USB features, just use 0 here.
|
|
|
|
SRAM_USB = 384
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# GNU GCC compiler prefix and location
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
#CROSS_COMPILE = arm-none-eabi-
|
|
|
|
AS = $(CROSS_COMPILE)gcc
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
|
|
LD = $(CROSS_COMPILE)ld
|
|
|
|
REALLD = $(CROSS_COMPILE)ld
|
|
|
|
SIZE = $(CROSS_COMPILE)size
|
2011-07-31 19:52:28 +00:00
|
|
|
AR = $(CROSS_COMPILE)ar
|
|
|
|
RANLIB = $(CROSS_COMPILE)ranlib
|
2011-07-19 08:09:03 +00:00
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
|
|
OUTFILE = firmware
|
|
|
|
LPCFIX = /bin/echo
|
|
|
|
|
|
|
|
ifeq (LPC11xx,$(TARGET))
|
|
|
|
CORTEX_TYPE=m0
|
|
|
|
else
|
|
|
|
CORTEX_TYPE=m3
|
|
|
|
endif
|
|
|
|
|
|
|
|
#CPU_TYPE = cortex-$(CORTEX_TYPE)
|
|
|
|
#CPU_TYPE=i686
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Compiler settings, parameters and flags
|
|
|
|
##########################################################################
|
|
|
|
|
2011-07-29 02:33:29 +00:00
|
|
|
CFLAGS = -std=c99 -c -g -O0 $(INCLUDE_PATHS) -Wall -funsigned-char -ffunction-sections -fdata-sections -fmessage-length=0 -DRAMCODE=$(RAMCODE) -fno-builtin -DSIMULATOR -I$(ROOT_PATH)/../simcore -include libc-unc0llide.h $(CONFIG_GCC_SHOWCOLUMN)
|
2011-07-19 08:09:03 +00:00
|
|
|
#LDFLAGS = -nostartfiles
|
|
|
|
|
2011-07-31 19:52:28 +00:00
|
|
|
ifeq ($(shell uname), Darwin)
|
|
|
|
# Mac OS X provides a stdio.h with unwanted defines
|
|
|
|
CFLAGS += -D_FORTIFY_SOURCE=0
|
|
|
|
# ld64 has problems with common symbols <rdar://problem/9870713>, apply a workaround
|
|
|
|
RANLIBFLAGS = -c
|
|
|
|
endif
|
2011-07-29 02:33:29 +00:00
|
|
|
|
|
|
|
CONFIG_MAKE_PRINTDIRECTORY = --no-print-directory
|
|
|
|
CONFIG_GCC_SHOWCOLUMN =
|
|
|
|
|
|
|
|
-include Makefile.sitespecific
|