2 # * FreeRTOS Kernel V10.0.1
3 # * Copyright (C) 2017 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5 # * Permission is hereby granted, free of charge, to any person obtaining a copy of
6 # * this software and associated documentation files (the "Software"), to deal in
7 # * the Software without restriction, including without limitation the rights to
8 # * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 # * the Software, and to permit persons to whom the Software is furnished to do so,
10 # * subject to the following conditions:
12 # * The above copyright notice and this permission notice shall be included in all
13 # * copies or substantial portions of the Software.
15 # * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 # * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17 # * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 # * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 # * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 # * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22 # * http://www.FreeRTOS.org
23 # * http://aws.amazon.com/freertos
25 # * 1 tab == 4 spaces!
30 OBJCOPY=arm-elf-objcopy
37 LDSCRIPT=lpc2106-rom.ld
41 # CFLAGS common to both the THUMB and ARM mode builds
43 CFLAGS=-Wall -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \
44 -I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \
45 -Wcast-align $(OPTIM) -fomit-frame-pointer
47 ifeq ($(USE_THUMB_MODE),YES)
48 CFLAGS += -mthumb-interwork -D THUMB_INTERWORK
53 LINKER_FLAGS=-Xlinker -oWebServeDemo.elf -Xlinker -M -Xlinker -Map=WebServeDemo.map
56 # Source files that can be built to THUMB mode.
59 ../../Source/tasks.c \
60 ../../Source/queue.c \
62 ../../Source/portable/MemMang/heap_2.c \
63 ../../Source/portable/GCC/ARM7_LPC2000/port.c \
64 ../Common/Minimal/flash.c \
65 ../Common/Minimal/dynamic.c \
66 ../Common/Minimal/semtest.c \
67 ../Common/Minimal/PollQ.c \
68 ../Common/Minimal/BlockQ.c \
69 ../Common/Minimal/integer.c \
70 ../ARM7_LPC2106_GCC/ParTest/ParTest.c \
77 # Source files that must be built to ARM mode.
80 ../../Source/portable/GCC/ARM7_LPC2000/portISR.c \
85 # Define all object files.
87 ARM_OBJ = $(ARM_SRC:.c=.o)
88 THUMB_OBJ = $(THUMB_SRC:.c=.o)
90 WebServeDemo.hex : WebServeDemo.elf
91 $(OBJCOPY) WebServeDemo.elf -O ihex WebServeDemo.hex
93 WebServeDemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile
94 $(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
96 $(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
97 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
99 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile
100 $(CC) -c $(CFLAGS) $< -o $@