2 # FreeRTOS V5.4.0 - Copyright (C) 2003-2009 Richard Barry.
\r
4 # This file is part of the FreeRTOS distribution.
\r
6 # FreeRTOS is free software; you can redistribute it and/or modify it under
\r
7 # the terms of the GNU General Public License (version 2) as published by the
\r
8 # Free Software Foundation and modified by the FreeRTOS exception.
\r
9 # **NOTE** The exception to the GPL is included to allow you to distribute a
\r
10 # combined work that includes FreeRTOS without being obliged to provide the
\r
11 # source code for proprietary components outside of the FreeRTOS kernel.
\r
12 # Alternative commercial license and support terms are also available upon
\r
13 # request. See the licensing section of http://www.FreeRTOS.org for full
\r
16 # FreeRTOS is distributed in the hope that it will be useful, but WITHOUT
\r
17 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
18 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
21 # You should have received a copy of the GNU General Public License along
\r
22 # with FreeRTOS; if not, write to the Free Software Foundation, Inc., 59
\r
23 # Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\r
26 # ***************************************************************************
\r
28 # * Looking for a quick start? Then check out the FreeRTOS eBook! *
\r
29 # * See http://www.FreeRTOS.org/Documentation for details *
\r
31 # ***************************************************************************
\r
33 # 1 tab == 4 spaces!
\r
35 # Please ensure to read the configuration and relevant port sections of the
\r
36 # online documentation.
\r
38 # http://www.FreeRTOS.org - Documentation, latest information, license and
\r
41 # http://www.SafeRTOS.com - A version that is certified for use in safety
\r
44 # http://www.OpenRTOS.com - Commercial support, development, porting,
\r
45 # licensing and training services.
\r
49 OBJCOPY=arm-elf-objcopy
\r
54 LDSCRIPT=atmel-rom.ld
\r
57 # CFLAGS common to both the THUMB and ARM mode builds
\r
63 -I../Common/include \
\r
65 -I./lwip-1.1.0/src/include \
\r
66 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X \
\r
67 -I../../Source/include \
\r
68 -I../../Source/portable/GCC/ARM7_AT91SAM7S \
\r
69 -I./lwip-1.1.0/src/include/ipv4 \
\r
72 -Wstrict-prototypes \
\r
73 -Wmissing-prototypes \
\r
74 -Wmissing-declarations \
\r
75 -Wno-strict-aliasing \
\r
77 -D THUMB_INTERWORK \
\r
83 -fomit-frame-pointer
\r
86 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
\r
89 # Source files that can be built to THUMB mode.
\r
91 FREERTOS_THUMB_SRC= \
\r
92 ../../Source/tasks.c \
\r
93 ../../Source/queue.c \
\r
94 ../../Source/list.c \
\r
95 ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c
\r
97 DEMO_APP_THMUB_SRC= \
\r
98 ../../Source/portable/MemMang/heap_2.c \
\r
101 ../Common/Minimal/flash.c \
\r
102 ../Common/Minimal/BlockQ.c \
\r
103 ../Common/Minimal/integer.c \
\r
104 ../Common/Minimal/PollQ.c \
\r
105 ../Common/Minimal/semtest.c \
\r
110 lwip-1.1.0/src/core/tcp_out.c \
\r
111 lwip-1.1.0/src/core/inet.c \
\r
112 lwip-1.1.0/src/core/mem.c \
\r
113 lwip-1.1.0/src/core/memp.c \
\r
114 lwip-1.1.0/src/core/netif.c \
\r
115 lwip-1.1.0/src/core/pbuf.c \
\r
116 lwip-1.1.0/src/core/raw.c \
\r
117 lwip-1.1.0/src/core/stats.c \
\r
118 lwip-1.1.0/src/core/sys.c \
\r
119 lwip-1.1.0/src/core/tcp.c \
\r
120 lwip-1.1.0/src/core/tcp_in.c \
\r
121 lwip-1.1.0/src/core/ipv4/ip.c \
\r
122 lwip-1.1.0/src/core/ipv4/ip_addr.c \
\r
123 lwip-1.1.0/src/core/ipv4/icmp.c \
\r
124 lwip-1.1.0/src/api/tcpip.c \
\r
125 lwip-1.1.0/src/api/api_msg.c \
\r
126 lwip-1.1.0/src/api/err.c \
\r
127 lwip-1.1.0/src/api/api_lib.c \
\r
128 lwip-1.1.0/src/netif/etharp.c \
\r
129 lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \
\r
130 lwip-1.1.0/src/netif/ethernetif.c \
\r
132 lwip-1.1.0/src/core/udp.c \
\r
133 lwip-1.1.0/src/core/ipv4/ip_frag.c
\r
136 # Source files that must be built to ARM mode.
\r
139 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \
\r
140 EMAC/SAM7_EMAC_ISR.c \
\r
146 # Define all object files.
\r
148 ARM_OBJ = $(ARM_SRC:.c=.o)
\r
149 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)
\r
150 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)
\r
151 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)
\r
153 rtosdemo.bin : rtosdemo.elf
\r
154 $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin
\r
156 rtosdemo.hex : rtosdemo.elf
\r
157 $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
\r
159 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h
\r
160 $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
\r
162 $(DEMO_APP_THMUB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
163 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
165 $(LWIP_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
166 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
168 $(FREERTOS_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
169 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
171 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
172 $(CC) -c $(CFLAGS) $< -o $@
\r