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!
29 OBJCOPY=arm-elf-objcopy
37 # CFLAGS common to both the THUMB and ARM mode builds
45 -I./lwip-1.1.0/src/include \
46 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X \
47 -I../../Source/include \
48 -I../../Source/portable/GCC/ARM7_AT91SAM7S \
49 -I./lwip-1.1.0/src/include/ipv4 \
53 -Wmissing-prototypes \
54 -Wmissing-declarations \
55 -Wno-strict-aliasing \
66 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
69 # Source files that can be built to THUMB mode.
72 ../../Source/tasks.c \
73 ../../Source/queue.c \
75 ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c
78 ../../Source/portable/MemMang/heap_2.c \
81 ../Common/Minimal/flash.c \
82 ../Common/Minimal/BlockQ.c \
83 ../Common/Minimal/integer.c \
84 ../Common/Minimal/PollQ.c \
85 ../Common/Minimal/semtest.c \
90 lwip-1.1.0/src/core/tcp_out.c \
91 lwip-1.1.0/src/core/inet.c \
92 lwip-1.1.0/src/core/mem.c \
93 lwip-1.1.0/src/core/memp.c \
94 lwip-1.1.0/src/core/netif.c \
95 lwip-1.1.0/src/core/pbuf.c \
96 lwip-1.1.0/src/core/raw.c \
97 lwip-1.1.0/src/core/stats.c \
98 lwip-1.1.0/src/core/sys.c \
99 lwip-1.1.0/src/core/tcp.c \
100 lwip-1.1.0/src/core/tcp_in.c \
101 lwip-1.1.0/src/core/ipv4/ip.c \
102 lwip-1.1.0/src/core/ipv4/ip_addr.c \
103 lwip-1.1.0/src/core/ipv4/icmp.c \
104 lwip-1.1.0/src/api/tcpip.c \
105 lwip-1.1.0/src/api/api_msg.c \
106 lwip-1.1.0/src/api/err.c \
107 lwip-1.1.0/src/api/api_lib.c \
108 lwip-1.1.0/src/netif/etharp.c \
109 lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \
110 lwip-1.1.0/src/netif/ethernetif.c \
112 lwip-1.1.0/src/core/udp.c \
113 lwip-1.1.0/src/core/ipv4/ip_frag.c
116 # Source files that must be built to ARM mode.
119 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \
120 EMAC/SAM7_EMAC_ISR.c \
126 # Define all object files.
128 ARM_OBJ = $(ARM_SRC:.c=.o)
129 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)
130 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)
131 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)
133 rtosdemo.bin : rtosdemo.elf
134 $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin
136 rtosdemo.hex : rtosdemo.elf
137 $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
139 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h
140 $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
142 $(DEMO_APP_THMUB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
143 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
145 $(LWIP_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
146 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
148 $(FREERTOS_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
149 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
151 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
152 $(CC) -c $(CFLAGS) $< -o $@