2 # FreeRTOS.org V5.2.0 - Copyright (C) 2003-2009 Richard Barry.
\r
4 # This file is part of the FreeRTOS.org distribution.
\r
6 # FreeRTOS.org is free software; you can redistribute it and/or modify it
\r
7 # under the terms of the GNU General Public License (version 2) as published
\r
8 # by the Free Software Foundation and modified by the FreeRTOS exception.
\r
10 # FreeRTOS.org is distributed in the hope that it will be useful, but WITHOUT
\r
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
\r
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
\r
15 # You should have received a copy of the GNU General Public License along
\r
16 # with FreeRTOS.org; if not, write to the Free Software Foundation, Inc., 59
\r
17 # Temple Place, Suite 330, Boston, MA 02111-1307 USA.
\r
19 # A special exception to the GPL is included to allow you to distribute a
\r
20 # combined work that includes FreeRTOS.org without being obliged to provide
\r
21 # the source code for any proprietary components. See the licensing section
\r
22 # of http://www.FreeRTOS.org for full details.
\r
25 # ***************************************************************************
\r
27 # * Get the FreeRTOS eBook! See http://www.FreeRTOS.org/Documentation *
\r
29 # * This is a concise, step by step, 'hands on' guide that describes both *
\r
30 # * general multitasking concepts and FreeRTOS specifics. It presents and *
\r
31 # * explains numerous examples that are written using the FreeRTOS API. *
\r
32 # * Full source code for all the examples is provided in an accompanying *
\r
35 # ***************************************************************************
\r
37 # 1 tab == 4 spaces!
\r
39 # Please ensure to read the configuration and relevant port sections of the
\r
40 # online documentation.
\r
42 # http://www.FreeRTOS.org - Documentation, latest information, license and
\r
45 # http://www.SafeRTOS.com - A version that is certified for use in safety
\r
48 # http://www.OpenRTOS.com - Commercial support, development, porting,
\r
49 # licensing and training services.
\r
53 OBJCOPY=arm-elf-objcopy
\r
58 LDSCRIPT=atmel-rom.ld
\r
61 # CFLAGS common to both the THUMB and ARM mode builds
\r
67 -I../Common/include \
\r
69 -I./lwip-1.1.0/src/include \
\r
70 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X \
\r
71 -I../../Source/include \
\r
72 -I../../Source/portable/GCC/ARM7_AT91SAM7S \
\r
73 -I./lwip-1.1.0/src/include/ipv4 \
\r
76 -Wstrict-prototypes \
\r
77 -Wmissing-prototypes \
\r
78 -Wmissing-declarations \
\r
79 -Wno-strict-aliasing \
\r
81 -D THUMB_INTERWORK \
\r
87 -fomit-frame-pointer
\r
90 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
\r
93 # Source files that can be built to THUMB mode.
\r
95 FREERTOS_THUMB_SRC= \
\r
96 ../../Source/tasks.c \
\r
97 ../../Source/queue.c \
\r
98 ../../Source/list.c \
\r
99 ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c
\r
101 DEMO_APP_THMUB_SRC= \
\r
102 ../../Source/portable/MemMang/heap_2.c \
\r
103 ParTest/ParTest.c \
\r
105 ../Common/Minimal/flash.c \
\r
106 ../Common/Minimal/BlockQ.c \
\r
107 ../Common/Minimal/integer.c \
\r
108 ../Common/Minimal/PollQ.c \
\r
109 ../Common/Minimal/semtest.c \
\r
114 lwip-1.1.0/src/core/tcp_out.c \
\r
115 lwip-1.1.0/src/core/inet.c \
\r
116 lwip-1.1.0/src/core/mem.c \
\r
117 lwip-1.1.0/src/core/memp.c \
\r
118 lwip-1.1.0/src/core/netif.c \
\r
119 lwip-1.1.0/src/core/pbuf.c \
\r
120 lwip-1.1.0/src/core/raw.c \
\r
121 lwip-1.1.0/src/core/stats.c \
\r
122 lwip-1.1.0/src/core/sys.c \
\r
123 lwip-1.1.0/src/core/tcp.c \
\r
124 lwip-1.1.0/src/core/tcp_in.c \
\r
125 lwip-1.1.0/src/core/ipv4/ip.c \
\r
126 lwip-1.1.0/src/core/ipv4/ip_addr.c \
\r
127 lwip-1.1.0/src/core/ipv4/icmp.c \
\r
128 lwip-1.1.0/src/api/tcpip.c \
\r
129 lwip-1.1.0/src/api/api_msg.c \
\r
130 lwip-1.1.0/src/api/err.c \
\r
131 lwip-1.1.0/src/api/api_lib.c \
\r
132 lwip-1.1.0/src/netif/etharp.c \
\r
133 lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \
\r
134 lwip-1.1.0/src/netif/ethernetif.c \
\r
136 lwip-1.1.0/src/core/udp.c \
\r
137 lwip-1.1.0/src/core/ipv4/ip_frag.c
\r
140 # Source files that must be built to ARM mode.
\r
143 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \
\r
144 EMAC/SAM7_EMAC_ISR.c \
\r
150 # Define all object files.
\r
152 ARM_OBJ = $(ARM_SRC:.c=.o)
\r
153 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)
\r
154 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)
\r
155 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)
\r
157 rtosdemo.bin : rtosdemo.elf
\r
158 $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin
\r
160 rtosdemo.hex : rtosdemo.elf
\r
161 $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
\r
163 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h
\r
164 $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
\r
166 $(DEMO_APP_THMUB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
167 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
169 $(LWIP_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
170 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
172 $(FREERTOS_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
173 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
175 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
176 $(CC) -c $(CFLAGS) $< -o $@
\r