1 ##########################################################################
2 # User configuration and firmware specific object files
3 ##########################################################################
5 # The target, flash and ram of the LPC1xxx microprocessor.
6 # Use for the target the value: LPC11xx, LPC13xx or LPC17xx
11 # For USB HID support the LPC134x reserves 384 bytes from the sram,
12 # if you don't want to use the USB features, just use 0 here.
16 ##########################################################################
18 ##########################################################################
20 # Set DEBUGBUILD to 'TRUE' for full debugging (larger, slower binaries),
21 # or to 'FALSE' for release builds (smallest, fastest binaries)
24 ##########################################################################
25 # IDE Flags (Keeps various IDEs happy)
26 ##########################################################################
28 OPTDEFINES
= -D__NEWLIB__
29 #OPTDEFINES += -DR0KET
30 #OPTDEFINES += -DUSBONLY
31 ##########################################################################
32 # Project-specific files
33 ##########################################################################
40 badge
/jumpnrun
/collision.c \
41 badge
/jumpnrun
/enemies.c \
42 badge
/jumpnrun
/game_state.c \
43 badge
/jumpnrun
/items.c \
44 badge
/jumpnrun
/jumpnrun.c \
45 badge
/jumpnrun
/level_load.c \
46 badge
/jumpnrun
/player.c \
47 badge
/jumpnrun
/render.c \
48 badge
/jumpnrun
/shots.c \
49 badge
/jumpnrun
/starter.c \
50 badge
/jumpnrun
/stats.c \
51 badge
/jumpnrun
/tiles.c \
63 dataflash
/at45db041d.c
72 project
/commands
/cmd_chibi_addr.c \
73 project
/commands
/cmd_chibi_tx.c \
74 project
/commands
/cmd_i2ceeprom_read.c \
75 project
/commands
/cmd_i2ceeprom_write.c \
76 project
/commands
/cmd_lm75b_gettemp.c \
77 project
/commands
/cmd_reset.c \
78 project
/commands
/cmd_sd_dir.c \
79 project
/commands
/cmd_sysinfo.c \
80 project
/commands
/cmd_uart.c \
81 project
/commands
/cmd_pwm.c
84 project
/commands
/drawing
/cmd_backlight.c \
85 project
/commands
/drawing
/cmd_bmp.c \
86 project
/commands
/drawing
/cmd_button.c \
87 project
/commands
/drawing
/cmd_calibrate.c \
88 project
/commands
/drawing
/cmd_circle.c \
89 project
/commands
/drawing
/cmd_clear.c \
90 project
/commands
/drawing
/cmd_line.c \
91 project
/commands
/drawing
/cmd_orientation.c \
92 project
/commands
/drawing
/cmd_pixel.c \
93 project
/commands
/drawing
/cmd_progress.c \
94 project
/commands
/drawing
/cmd_rectangle.c \
95 project
/commands
/drawing
/cmd_roundedcorner.c \
96 project
/commands
/drawing
/cmd_text.c \
97 project
/commands
/drawing
/cmd_textw.c \
98 project
/commands
/drawing
/cmd_tsthreshhold.c \
99 project
/commands
/drawing
/cmd_tswait.c \
100 project
/commands
/drawing
/cmd_triangle.c
102 ##########################################################################
103 # Optional driver files
104 ##########################################################################
106 # Chibi Light-Weight Wireless Stack (AT86RF212)
108 drivers
/rf
/chibi
/chb.c \
109 drivers
/rf
/chibi
/chb_buf.c \
110 drivers
/rf
/chibi
/chb_drvr.c \
111 drivers
/rf
/chibi
/chb_eeprom.c \
112 drivers
/rf
/chibi
/chb_spi.c
116 drivers
/storage
/eeprom
/eeprom.c \
117 drivers
/storage
/eeprom
/mcp24aa
/mcp24aa.c
119 # LM75B temperature sensor
121 drivers
/sensors
/lm75b
/lm75b.c
125 drivers
/rtc
/isl12022m
/isl12022m.c
129 drivers
/displays
/tft
/drawing.c \
130 drivers
/displays
/tft
/touchscreen.c \
131 drivers
/displays
/tft
/colors.c \
132 drivers
/displays
/tft
/theme.c \
133 drivers
/displays
/tft
/bmp.c
137 drivers
/displays
/tft
/controls
/button.c \
138 drivers
/displays
/tft
/controls
/hsbchart.c \
139 drivers
/displays
/tft
/controls
/huechart.c \
140 drivers
/displays
/tft
/controls
/label.c \
141 drivers
/displays
/tft
/controls
/labelcentered.c \
142 drivers
/displays
/tft
/controls
/progressbar.c
144 # Bitmap (non-AA) fonts
146 drivers
/displays
/tft
/fonts.c \
147 drivers
/displays
/tft
/fonts
/dejavusans9.c \
148 drivers
/displays
/tft
/fonts
/dejavusansbold9.c \
149 drivers
/displays
/tft
/fonts
/dejavusanscondensed9.c \
150 drivers
/displays
/tft
/fonts
/dejavusansmono8.c \
151 drivers
/displays
/tft
/fonts
/dejavusansmonobold8.c \
152 drivers
/displays
/tft
/fonts
/verdana9.c \
153 drivers
/displays
/tft
/fonts
/verdana14.c \
154 drivers
/displays
/tft
/fonts
/verdanabold14.c
158 drivers
/displays
/tft
/aafonts.c \
159 drivers
/displays
/tft
/aafonts
/aa2
/DejaVuSansCondensed14_AA2.c \
160 drivers
/displays
/tft
/aafonts
/aa2
/DejaVuSansCondensedBold14_AA2.c \
161 drivers
/displays
/tft
/aafonts
/aa2
/DejaVuSansMono10_AA2.c \
162 drivers
/displays
/tft
/aafonts
/aa2
/DejaVuSansMono13_AA2.c \
163 drivers
/displays
/tft
/aafonts
/aa2
/DejaVuSansMono14_AA2.c
165 # LCD Driver (Only one can be included at a time!)
166 # SRCS += drivers/displays/tft/hw/hx8340b.c
167 # SRCS += drivers/displays/tft/hw/hx8347d.c
168 # SRCS += drivers/displays/tft/hw/ILI9328.c
169 # SRCS += drivers/displays/tft/hw/ILI9325.c
170 # SRCS += drivers/displays/tft/hw/ssd1331.c
171 # SRCS += drivers/displays/tft/hw/ssd1351.c
172 # SRCS += drivers/displays/tft/hw/st7735.c
173 # SRCS += drivers/displays/tft/hw/st7783.c
175 # Bitmap/Monochrome LCD support (ST7565, SSD1306, etc.)
177 drivers
/displays
/smallfonts.c \
178 drivers
/displays
/bitmap
/sharpmem
/sharpmem.c \
179 drivers
/displays
/bitmap
/st7565
/st7565.c \
180 drivers
/displays
/bitmap
/ssd1306
/ssd1306.c
182 #Character Displays (VFD text displays, etc.)
184 drivers
/displays
/character
/samsung_20T202DA2JA
/samsung_20T202DA2JA.c
186 # ChaN FatFS and SD card support
189 # drivers/fatfs/mmc.c
193 drivers
/motor
/stepper
/stepper.c
195 # RSA Encryption/Descryption
201 drivers
/dac
/mcp4725
/mcp4725.c \
202 drivers
/dac
/mcp4901
/mcp4901.c
206 drivers
/rf
/pn532
/pn532.c \
207 drivers
/rf
/pn532
/pn532_bus_i2c.c \
208 drivers
/rf
/pn532
/pn532_bus_uart.c \
209 drivers
/rf
/pn532
/helpers
/pn532_mifare_classic.c \
210 drivers
/rf
/pn532
/helpers
/pn532_mifare_ultralight.c
214 drivers
/sensors
/tcs3414
/tcs3414.c \
215 drivers
/sensors
/tsl2561
/tsl2561.c
219 drivers
/storage
/spiflash
/w25q16bv
/w25q16bv.c
223 drivers
/audio
/tea5767
/tea5767.c
225 # IN219 Current Sensor
227 drivers
/sensors
/ina219
/ina219.c
229 # MPL115A2 Barometric Pressure Sensor
231 drivers
/sensors
/mpl115a2
/mpl115a2.c
235 drivers
/adc
/ads1015
/ads1015.c
237 ##########################################################################
239 ##########################################################################
252 core
/systick
/systick.c \
253 core
/timer16
/timer16.c \
254 core
/timer32
/timer32.c \
255 core
/usbcdc
/cdc_buf.c \
256 core
/usbcdc
/cdcuser.c \
257 core
/usbcdc
/usbcore.c \
258 core
/usbcdc
/usbdesc.c \
259 core
/usbcdc
/usbhw.c \
260 core
/usbcdc
/usbuser.c \
261 core
/usbhid-rom
/usbconfig.c \
262 core
/usbhid-rom
/usbhid.c \
263 core
/usbhid-rom
/usbmsc.c \
267 # core/uart/uart_buf.c
270 ##########################################################################
271 # GNU GCC compiler prefix and location
272 ##########################################################################
274 CROSS_COMPILE
= arm-none-eabi-
275 AS
= $(CROSS_COMPILE
)gcc
276 CC
= $(CROSS_COMPILE
)gcc
277 LD
= $(CROSS_COMPILE
)gcc
278 SIZE
= $(CROSS_COMPILE
)size
279 OBJCOPY
= $(CROSS_COMPILE
)objcopy
280 OBJDUMP
= $(CROSS_COMPILE
)objdump
286 ##########################################################################
287 # GNU GCC compiler flags
288 ##########################################################################
290 INCLUDE_PATHS
= -I
$(ROOT_PATH
) -I
$(ROOT_PATH
)/project
292 ##########################################################################
294 ##########################################################################
297 LD_SCRIPT
= $(LD_PATH
)/linkscript.
ld
298 LD_TEMP
= $(LD_PATH
)/memory.
ld
300 ifeq (LPC11xx
,$(TARGET
))
306 CPU_TYPE
= cortex-
$(CORTEX_TYPE
)
309 lpc1xxx
/$(TARGET
)_handlers.c \
310 lpc1xxx
/LPC1xxx_startup.c
312 OBJS
= $(SRCS
:%.c
=%.o
)
313 DEPS
= $(SRCS
:%.c
=%.dep
)
315 ##########################################################################
316 # Compiler settings, parameters and flags
317 ##########################################################################
318 ifeq (TRUE
,$(DEBUGBUILD
))
319 CFLAGS
= -c
-g
-O0
$(INCLUDE_PATHS
) -Wall
-mthumb
-ffunction-sections
-fdata-sections
-fmessage-length
=0 -mcpu
=$(CPU_TYPE
) -DTARGET
=$(TARGET
) -fno-builtin
$(OPTDEFINES
) -std
=c99
320 ASFLAGS
= -c
-g
-O0
$(INCLUDE_PATHS
) -Wall
-mthumb
-ffunction-sections
-fdata-sections
-fmessage-length
=0 -mcpu
=$(CPU_TYPE
) -D__ASSEMBLY__
-x assembler-with-cpp
322 CFLAGS
= -c
-g
-Os
$(INCLUDE_PATHS
) -Wall
-mthumb
-ffunction-sections
-fdata-sections
-fmessage-length
=0 -mcpu
=$(CPU_TYPE
) -DTARGET
=$(TARGET
) -fno-builtin
$(OPTDEFINES
) -std
=c99
323 ASFLAGS
= -c
-g
-Os
$(INCLUDE_PATHS
) -Wall
-mthumb
-ffunction-sections
-fdata-sections
-fmessage-length
=0 -mcpu
=$(CPU_TYPE
) -D__ASSEMBLY__
-x assembler-with-cpp
326 LDFLAGS
= -nostartfiles
-mthumb
-mcpu
=$(CPU_TYPE
) -Wl
,--gc-sections
328 OCFLAGS
= --strip-unneeded
330 all: dep size
$(OUTFILE
).bin
$(OUTFILE
).hex
334 $(DEPS
) : %.dep
: %.c
335 $(CC
) $(CPPFLAGS
) $(CFLAGS
) -MM
$< -MT
$@
-MT
$(@
:%.dep
=%.o
) -MF
$@
340 -@echo
"MEMORY" > $(LD_TEMP
)
341 -@echo
"{" >> $(LD_TEMP
)
342 -@echo
" flash(rx): ORIGIN = 0x00000000, LENGTH = $(FLASH)" >> $(LD_TEMP
)
343 -@echo
" sram(rwx): ORIGIN = 0x10000000+$(SRAM_USB), LENGTH = $(SRAM)-$(SRAM_USB)" >> $(LD_TEMP
)
344 -@echo
"}" >> $(LD_TEMP
)
345 -@echo
"INCLUDE $(LD_SCRIPT)" >> $(LD_TEMP
)
347 $(OUTFILE
).elf
: $(OBJS
) $(LD_TEMP
)
348 $(LD
) $(LDFLAGS
) -T
$(LD_TEMP
) -o
$(OUTFILE
).elf
$(OBJS
) $(LDLIBS
)
350 $(OUTFILE
).bin
: $(OUTFILE
).elf
$(LPCRC
)
351 $(OBJCOPY
) $(OCFLAGS
) -O binary
$(OUTFILE
).elf
$(OUTFILE
).bin
352 $(LPCRC
) $(OUTFILE
).bin
354 $(OUTFILE
).hex
: $(OUTFILE
).elf
355 $(OBJCOPY
) $(OCFLAGS
) -O ihex
$(OUTFILE
).elf
$(OUTFILE
).hex
358 $(SIZE
) $(OUTFILE
).elf
361 rm -f
$(OBJS
) $(LD_TEMP
) $(OUTFILE
).elf
$(OUTFILE
).bin
$(OUTFILE
).hex
364 rm -f
$(DEPS
) $(LPCRC
)
366 .PHONY
: all dep size
clean distclean
368 CFLAGS_FOR_BUILD
= -Wall
-Wextra
-std
=c99
-O0
-g
370 LPCRC_SRCS
= tools
/lpcrc
/lpcrc.c
371 LPCRC_OBJS
= $(LPCRC_SRCS
:%.c
=%.o
)
372 LPCRC_DEPS
= $(LPCRC_SRCS
:%.c
=%.dep
)
374 $(LPCRC_DEPS
) : %.dep
: %.c
375 $(CC_FOR_BUILD
) $(CPPFLAGS_FOR_BUILD
) $(CFLAGS_FOR_BUILD
) -MM
$< -MT
$@
-MT
$(@
:%.dep
=%.o
) -MF
$@
377 $(LPCRC_OBJS
): %.o
: %.c
378 $(CC_FOR_BUILD
) $(CPPFLAGS_FOR_BUILD
) $(CFLAGS_FOR_BUILD
) -o
$@
-c
$<
380 $(LPCRC
): $(LPCRC_OBJS
)
381 $(CC_FOR_BUILD
) $(CFLAGS_FOR_BUILD
) $(LDFLAGS_FOR_BUILD
) -o
$@
$+ $(LDLIBS_FOR_BUILD
)