1 # FreeRTOS.org V4.6.1 - Copyright (C) 2003-2007 Richard Barry.
\r
3 # This file is part of the FreeRTOS.org distribution.
\r
5 # FreeRTOS.org is free software; you can redistribute it and/or modify
\r
6 # it under the terms of the GNU General Public License as published by
\r
7 # the Free Software Foundation; either version 2 of the License, or
\r
8 # (at your option) any later version.
\r
10 # FreeRTOS.org is distributed in the hope that it will be useful,
\r
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
13 # GNU General Public License for more details.
\r
15 # You should have received a copy of the GNU General Public License
\r
16 # along with FreeRTOS.org; if not, write to the Free Software
\r
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
19 # A special exception to the GPL can be applied should you wish to distribute
\r
20 # a 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 of how and when the exception
\r
25 # ***************************************************************************
\r
26 # See http://www.FreeRTOS.org for documentation, latest information, license
\r
27 # and contact details. Please ensure to read the configuration and relevant
\r
28 # port sections of the online documentation.
\r
29 # ***************************************************************************
\r
32 OBJCOPY=arm-elf-objcopy
\r
37 LDSCRIPT=atmel-rom.ld
\r
40 # CFLAGS common to both the THUMB and ARM mode builds
\r
46 -I../Common/include \
\r
48 -I./lwip-1.1.0/src/include \
\r
49 -I./lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X \
\r
50 -I../../Source/include \
\r
51 -I../../Source/portable/GCC/ARM7_AT91SAM7S \
\r
52 -I./lwip-1.1.0/src/include/ipv4 \
\r
55 -Wstrict-prototypes \
\r
56 -Wmissing-prototypes \
\r
57 -Wmissing-declarations \
\r
58 -Wno-strict-aliasing \
\r
60 -D THUMB_INTERWORK \
\r
66 -fomit-frame-pointer
\r
69 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
\r
72 # Source files that can be built to THUMB mode.
\r
74 FREERTOS_THUMB_SRC= \
\r
75 ../../Source/tasks.c \
\r
76 ../../Source/queue.c \
\r
77 ../../Source/list.c \
\r
78 ../../Source/portable/GCC/ARM7_AT91SAM7S/port.c
\r
80 DEMO_APP_THMUB_SRC= \
\r
81 ../../Source/portable/MemMang/heap_2.c \
\r
84 ../Common/Minimal/flash.c \
\r
85 ../Common/Minimal/BlockQ.c \
\r
86 ../Common/Minimal/integer.c \
\r
87 ../Common/Minimal/PollQ.c \
\r
88 ../Common/Minimal/semtest.c \
\r
93 lwip-1.1.0/src/core/tcp_out.c \
\r
94 lwip-1.1.0/src/core/inet.c \
\r
95 lwip-1.1.0/src/core/mem.c \
\r
96 lwip-1.1.0/src/core/memp.c \
\r
97 lwip-1.1.0/src/core/netif.c \
\r
98 lwip-1.1.0/src/core/pbuf.c \
\r
99 lwip-1.1.0/src/core/raw.c \
\r
100 lwip-1.1.0/src/core/stats.c \
\r
101 lwip-1.1.0/src/core/sys.c \
\r
102 lwip-1.1.0/src/core/tcp.c \
\r
103 lwip-1.1.0/src/core/tcp_in.c \
\r
104 lwip-1.1.0/src/core/ipv4/ip.c \
\r
105 lwip-1.1.0/src/core/ipv4/ip_addr.c \
\r
106 lwip-1.1.0/src/core/ipv4/icmp.c \
\r
107 lwip-1.1.0/src/api/tcpip.c \
\r
108 lwip-1.1.0/src/api/api_msg.c \
\r
109 lwip-1.1.0/src/api/err.c \
\r
110 lwip-1.1.0/src/api/api_lib.c \
\r
111 lwip-1.1.0/src/netif/etharp.c \
\r
112 lwip-1.1.0/contrib/port/FreeRTOS/AT91SAM7X/sys_arch.c \
\r
113 lwip-1.1.0/src/netif/ethernetif.c \
\r
115 lwip-1.1.0/src/core/udp.c \
\r
116 lwip-1.1.0/src/core/ipv4/ip_frag.c
\r
119 # Source files that must be built to ARM mode.
\r
122 ../../Source/portable/GCC/ARM7_AT91SAM7S/portISR.c \
\r
123 EMAC/SAM7_EMAC_ISR.c \
\r
129 # Define all object files.
\r
131 ARM_OBJ = $(ARM_SRC:.c=.o)
\r
132 FREERTOS_THUMB_OBJ = $(FREERTOS_THUMB_SRC:.c=.o)
\r
133 DEMO_APP_THMUB_OBJ = $(DEMO_APP_THMUB_SRC:.c=.o)
\r
134 LWIP_THUMB_OBJ = $(LWIP_THUMB_SRC:.c=.o)
\r
136 rtosdemo.bin : rtosdemo.elf
\r
137 $(OBJCOPY) rtosdemo.elf -O binary rtosdemo.bin
\r
139 rtosdemo.hex : rtosdemo.elf
\r
140 $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex
\r
142 rtosdemo.elf : $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) $(CRT0) Makefile FreeRTOSConfig.h
\r
143 $(CC) $(CFLAGS) $(ARM_OBJ) $(DEMO_APP_THMUB_OBJ) $(LWIP_THUMB_OBJ) $(FREERTOS_THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)
\r
145 $(DEMO_APP_THMUB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
146 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
148 $(LWIP_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
149 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
151 $(FREERTOS_THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
152 $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@
\r
154 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile FreeRTOSConfig.h
\r
155 $(CC) -c $(CFLAGS) $< -o $@
\r