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