X-Git-Url: http://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/c274a159f4b46ad139db87f3c4b58ee842ce854a..8329716b52b5047578be5f8f0e8f08a8707f2f06:/Makefile diff --git a/Makefile b/Makefile index 46c1220..14e1c26 100644 --- a/Makefile +++ b/Makefile @@ -15,6 +15,14 @@ SRAM_USB = 384 VPATH = OBJS = main.o +########################################################################## +# Debug settings +########################################################################## + +# Set DEBUGBUILD to 'TRUE' for full debugging (larger, slower binaries), +# or to 'FALSE' for release builds (smallest, fastest binaries) +DEBUGBUILD = FALSE + ########################################################################## # Project-specific files ########################################################################## @@ -66,6 +74,7 @@ OBJS += verdana9.o verdana14.o verdanabold14.o OBJS += ILI9328.o # OBJS += ILI9325.o # OBJS += ssd1331.o +# OBJS += ssd1351.o # OBJS += st7735.o # OBJS += st7783.o @@ -91,13 +100,18 @@ VPATH += drivers/dac/mcp4725 OBJS += mcp4725.o # RFID/NFC -VPATH += drivers/sensors/pn532 -OBJS += pn532.o +VPATH += drivers/sensors/pn532 drivers/sensors/pn532/helpers +OBJS += pn532.o pn532_bus_i2c.o pn532_bus_uart.o +OBJS += pn532_mifare_classic.o pn532_mifare_ultralight.o # TAOS Light Sensors VPATH += drivers/sensors/tcs3414 drivers/sensors/tsl2561 OBJS += tcs3414.o tsl2561.o +# SPI Flash +VPATH += drivers/spiflash/w25q16bv +OBJS += w25q16bv.o + ########################################################################## # Library files ########################################################################## @@ -153,9 +167,14 @@ OBJS += $(TARGET)_handlers.o LPC1xxx_startup.o ########################################################################## # 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 + 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 + 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 -CFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -DTARGET=$(TARGET) -fno-builtin -ASFLAGS = -c -g -Os $(INCLUDE_PATHS) -Wall -mthumb -ffunction-sections -fdata-sections -fmessage-length=0 -mcpu=$(CPU_TYPE) -D__ASSEMBLY__ -x assembler-with-cpp LDFLAGS = -nostartfiles -mthumb -mcpu=$(CPU_TYPE) -Wl,--gc-sections LDLIBS = -lm OCFLAGS = --strip-unneeded