2 # * FreeRTOS Kernel V10.0.0
\r
3 # * Copyright (C) 2017 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. If you wish to use our Amazon
\r
14 # * FreeRTOS name, please do so in a fair use way that does not cause confusion.
\r
16 # * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
17 # * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
18 # * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
19 # * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
20 # * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
21 # * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
23 # * http://www.FreeRTOS.org
\r
24 # * http://aws.amazon.com/freertos
\r
26 # * 1 tab == 4 spaces!
\r
30 OBJCOPY=arm-elf-objcopy
\r
35 LDSCRIPT=atmel-rom.ld
\r
38 # CFLAGS common to both the THUMB and ARM mode builds
\r
44 -I../Common/include \
\r
46 -I./lwip-1.1.0/src/include \
\r
47 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X \
\r
48 -I../../Source/include \
\r
49 -I../../Source/portable/GCC/ARM7_AT91SAM7S \
\r
50 -I./lwip-1.1.0/src/include/ipv4 \
\r
53 -Wstrict-prototypes \
\r
54 -Wmissing-prototypes \
\r
55 -Wmissing-declarations \
\r
56 -Wno-strict-aliasing \
\r
58 -D THUMB_INTERWORK \
\r
64 -fomit-frame-pointer
\r
67 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
\r
70 # Source files that can be built to THUMB mode.
\r
72 FREERTOS_THUMB_SRC= \
\r
73 ../../Source/tasks.c \
\r
74 ../../Source/queue.c \
\r
75 ../../Source/list.c \
\r
76 ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c
\r
78 DEMO_APP_THMUB_SRC= \
\r
79 ../../Source/portable/MemMang/heap_2.c \
\r
82 ../Common/Minimal/flash.c \
\r
83 ../Common/Minimal/BlockQ.c \
\r
84 ../Common/Minimal/integer.c \
\r
85 ../Common/Minimal/PollQ.c \
\r
86 ../Common/Minimal/semtest.c \
\r
91 lwip-1.1.0/src/core/tcp_out.c \
\r
92 lwip-1.1.0/src/core/inet.c \
\r
93 lwip-1.1.0/src/core/mem.c \
\r
94 lwip-1.1.0/src/core/memp.c \
\r
95 lwip-1.1.0/src/core/netif.c \
\r
96 lwip-1.1.0/src/core/pbuf.c \
\r
97 lwip-1.1.0/src/core/raw.c \
\r
98 lwip-1.1.0/src/core/stats.c \
\r
99 lwip-1.1.0/src/core/sys.c \
\r
100 lwip-1.1.0/src/core/tcp.c \
\r
101 lwip-1.1.0/src/core/tcp_in.c \
\r
102 lwip-1.1.0/src/core/ipv4/ip.c \
\r
103 lwip-1.1.0/src/core/ipv4/ip_addr.c \
\r
104 lwip-1.1.0/src/core/ipv4/icmp.c \
\r
105 lwip-1.1.0/src/api/tcpip.c \
\r
106 lwip-1.1.0/src/api/api_msg.c \
\r
107 lwip-1.1.0/src/api/err.c \
\r
108 lwip-1.1.0/src/api/api_lib.c \
\r
109 lwip-1.1.0/src/netif/etharp.c \
\r
110 lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \
\r
111 lwip-1.1.0/src/netif/ethernetif.c \
\r
113 lwip-1.1.0/src/core/udp.c \
\r
114 lwip-1.1.0/src/core/ipv4/ip_frag.c
\r
117 # Source files that must be built to ARM mode.
\r
120 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \
\r
121 EMAC/SAM7_EMAC_ISR.c \
\r
127 # Define all object files.
\r
129 ARM_OBJ = $(ARM_SRC:.c=.o)
\r
130 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)
\r
131 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)
\r
132 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)
\r
134 rtosdemo.bin : rtosdemo.elf
\r
135 $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin
\r
137 rtosdemo.hex : rtosdemo.elf
\r
138 $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
\r
140 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h
\r
141 $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
\r
143 $(DEMO_APP_THMUB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
144 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
146 $(LWIP_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
147 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
149 $(FREERTOS_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
150 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
152 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
153 $(CC) -c $(CFLAGS) $< -o $@
\r