# or to 'FALSE' for release builds (smallest, fastest binaries)
DEBUGBUILD = FALSE
+##########################################################################
+# IDE Flags (Keeps various IDEs happy)
+##########################################################################
+
+OPTDEFINES = -D __NEWLIB__
+
##########################################################################
# Project-specific files
##########################################################################
OBJS += isl12022m.o
# TFT LCD support
-VPATH += drivers/displays/tft drivers/displays/tft/hw drivers/displays/tft/fonts
-VPATH += drivers/displays/tft/dialogues
-OBJS += drawing.o touchscreen.o bmp.o alphanumeric.o
+VPATH += drivers/displays/tft drivers/displays/tft/hw
+OBJS += drawing.o touchscreen.o colors.o bmp.o
+
+# GUI Controls
+VPATH += drivers/displays/tft/controls
+OBJS += button.o hsbchart.o huechart.o label.o
+OBJS += labelcentered.o progressbar.o
+
+# Bitmap (non-AA) fonts
+VPATH += drivers/displays/tft/fonts
+OBJS += fonts.o
OBJS += dejavusans9.o dejavusansbold9.o dejavusanscondensed9.o
OBJS += dejavusansmono8.o dejavusansmonobold8.o
OBJS += verdana9.o verdana14.o verdanabold14.o
+# Anti-aliased fonts
+VPATH += drivers/displays/tft/aafonts/aa2 drivers/displays/tft/aafonts/aa4
+OBJS += aafonts.o
+OBJS += DejaVuSansCondensed14_AA2.o DejaVuSansCondensedBold14_AA2.o
+OBJS += DejaVuSansMono10_AA2.o DejaVuSansMono13_AA2.o DejaVuSansMono14_AA2.o
+
# LCD Driver (Only one can be included at a time!)
+# OBJS += hx8340b.o
OBJS += ILI9328.o
# OBJS += ILI9325.o
# OBJS += ssd1331.o
VPATH += core core/adc core/cmd core/cpu core/gpio core/i2c core/pmu
VPATH += core/ssp core/systick core/timer16 core/timer32 core/uart
-VPATH += core/usbhid-rom core/libc core/wdt core/usbcdc core/pwm
-VPATH += core/iap
+VPATH += core/usbhid-rom core/wdt core/usbcdc core/pwm core/iap
+VPATH += core/libc
+OBJS += stdio.o string.o
OBJS += adc.o cpu.o cmd.o gpio.o i2c.o pmu.o ssp.o systick.o timer16.o
-OBJS += timer32.o uart.o uart_buf.o usbconfig.o usbhid.o stdio.o string.o
+OBJS += timer32.o uart.o uart_buf.o usbconfig.o usbhid.o
OBJS += wdt.o cdcuser.o cdc_buf.o usbcore.o usbdesc.o usbhw.o usbuser.o
OBJS += sysinit.o pwm.o iap.o
OBJDUMP = $(CROSS_COMPILE)objdump
OUTFILE = firmware
LPCRC = ./lpcrc
-CP = cp
##########################################################################
# GNU GCC compiler flags
# Compiler settings, parameters and flags
##########################################################################
ifeq (TRUE,$(DEBUGBUILD))
- CFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin
+ CFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin $(OPTDEFINES)
ASFLAGS = -c -g -O0 $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -D__ASSEMBLY__ -x assembler-with-cpp
else
- CFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin
+ CFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin $(OPTDEFINES)
ASFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -D__ASSEMBLY__ -x assembler-with-cpp
endif
$(SIZE) $(OUTFILE).elf
-@echo ""
$(OBJCOPY) $(OCFLAGS) -O binary $(OUTFILE).elf $(OUTFILE).bin
+ $(OBJCOPY) $(OCFLAGS) -O binary $(OUTFILE).elf $(OUTFILE).bin
$(OBJCOPY) $(OCFLAGS) -O ihex $(OUTFILE).elf $(OUTFILE).hex
-@echo ""
$(LPCRC) firmware.bin