2011-05-11 21:18:46 +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
|
|
|
|
|
|
|
|
OBJS =
|
|
|
|
OBJS += smallfonts.o
|
2011-05-11 23:37:26 +00:00
|
|
|
|
2011-05-15 23:10:48 +00:00
|
|
|
OBJS += ubuntu18.o
|
2011-05-13 13:20:08 +00:00
|
|
|
|
2011-05-11 21:18:46 +00:00
|
|
|
OBJS += display.o
|
|
|
|
OBJS += render.o
|
2011-05-14 20:23:55 +00:00
|
|
|
OBJS += decoder.o
|
2011-05-11 21:18:46 +00:00
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# GNU GCC compiler prefix and location
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
CROSS_COMPILE = arm-none-eabi-
|
|
|
|
AS = $(CROSS_COMPILE)gcc
|
|
|
|
CC = $(CROSS_COMPILE)gcc
|
|
|
|
LD = $(CROSS_COMPILE)gcc
|
|
|
|
AR = $(CROSS_COMPILE)ar
|
|
|
|
SIZE = $(CROSS_COMPILE)size
|
|
|
|
OBJCOPY = $(CROSS_COMPILE)objcopy
|
|
|
|
OBJDUMP = $(CROSS_COMPILE)objdump
|
|
|
|
OUTFILE = firmware
|
|
|
|
LPCRC = ./lpcrc
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# GNU GCC compiler flags
|
|
|
|
##########################################################################
|
|
|
|
ROOT_PATH = .
|
|
|
|
INCLUDE_PATHS = -I$(ROOT_PATH) -I../core
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Startup files
|
|
|
|
##########################################################################
|
|
|
|
|
|
|
|
ifeq (LPC11xx,$(TARGET))
|
|
|
|
CORTEX_TYPE=m0
|
|
|
|
else
|
|
|
|
CORTEX_TYPE=m3
|
|
|
|
endif
|
|
|
|
|
|
|
|
CPU_TYPE = cortex-$(CORTEX_TYPE)
|
|
|
|
|
|
|
|
##########################################################################
|
|
|
|
# Compiler settings, parameters and flags
|
|
|
|
##########################################################################
|
|
|
|
|
2011-05-14 20:23:55 +00:00
|
|
|
CFLAGS = -std=c99 -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin
|
2011-05-11 21:18:46 +00:00
|
|
|
LDFLAGS = -nostartfiles -mthumb -mcpu=$(CPU_TYPE) -Wl,--gc-sections
|
|
|
|
|
|
|
|
all: libfont.a
|
|
|
|
|
|
|
|
libfont.a: $(OBJS)
|
|
|
|
$(AR) rcs libfont.a $(OBJS)
|
|
|
|
|
|
|
|
%.o : %.c
|
|
|
|
$(CC) $(CFLAGS) -o $@ $<
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -f $(OBJS) libfont.a
|
|
|
|
|
|
|
|
render.o: render.c render.h display.h fonts.h
|
|
|
|
smallfonts.o: smallfonts.c smallfonts.h fonts.h
|
|
|
|
veramono9.o: veramono9.c veramono9.h fonts.h
|
|
|
|
|