]> git.sur5r.net Git - freertos/blob - Demo/ARM7_LPC2106_GCC/Makefile
Add the -fomit-frame-pointer option to GCC ARM7 builds.
[freertos] / Demo / ARM7_LPC2106_GCC / Makefile
1 #       FreeRTOS.org V4.1.2 - Copyright (C) 2003-2006 Richard Barry.\r
2 #\r
3 #       This file is part of the FreeRTOS.org distribution.\r
4 #\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
9 #\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
14 #\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
18 #\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
23 #       can be applied.\r
24 #\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
30 \r
31 # Changes from V2.4.2\r
32 #\r
33 #       + Replaced source/portable/gcc/arm7/portheap.c with source/portable/memmang/heap_2.c.\r
34 \r
35 CC=arm-elf-gcc\r
36 OBJCOPY=arm-elf-objcopy\r
37 ARCH=arm-elf-ar\r
38 CRT0=boot.s\r
39 WARNINGS=-Wall -Wextra -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare \\r
40                 -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wunused\r
41 \r
42 #\r
43 # CFLAGS common to both the THUMB and ARM mode builds\r
44 #\r
45 CFLAGS=$(WARNINGS) -D $(RUN_MODE) -D GCC_ARM7 -I. -I../../Source/include \\r
46                 -I../Common/include $(DEBUG) -mcpu=arm7tdmi -T$(LDSCRIPT) \\r
47                  $(OPTIM) -fomit-frame-pointer\r
48 \r
49 ifeq ($(USE_THUMB_MODE),YES)\r
50         CFLAGS += -mthumb-interwork -D THUMB_INTERWORK\r
51         THUMB_FLAGS=-mthumb\r
52 endif\r
53 \r
54 \r
55 LINKER_FLAGS=-Xlinker -ortosdemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
56 \r
57 RTOS_SOURCE_DIR=../../Source\r
58 DEMO_SOURCE_DIR=../Common/Minimal\r
59 #\r
60 # Source files that can be built to THUMB mode.\r
61 #\r
62 THUMB_SRC = \\r
63 main.c \\r
64 serial/serial.c \\r
65 ParTest/ParTest.c \\r
66 $(DEMO_SOURCE_DIR)/integer.c \\r
67 $(DEMO_SOURCE_DIR)/flash.c \\r
68 $(DEMO_SOURCE_DIR)/PollQ.c \\r
69 $(DEMO_SOURCE_DIR)/comtest.c \\r
70 $(DEMO_SOURCE_DIR)/flop.c \\r
71 $(DEMO_SOURCE_DIR)/semtest.c \\r
72 $(DEMO_SOURCE_DIR)/dynamic.c \\r
73 $(DEMO_SOURCE_DIR)/BlockQ.c \\r
74 $(RTOS_SOURCE_DIR)/tasks.c \\r
75 $(RTOS_SOURCE_DIR)/queue.c \\r
76 $(RTOS_SOURCE_DIR)/list.c \\r
77 $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \\r
78 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC2000/port.c\r
79 \r
80 #\r
81 # Source files that must be built to ARM mode.\r
82 #\r
83 ARM_SRC = \\r
84 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC2000/portISR.c \\r
85 serial/serialISR.c\r
86 \r
87 #\r
88 # Define all object files.\r
89 #\r
90 ARM_OBJ = $(ARM_SRC:.c=.o)\r
91 THUMB_OBJ = $(THUMB_SRC:.c=.o)\r
92 \r
93 rtosdemo.hex : rtosdemo.elf\r
94         $(OBJCOPY) rtosdemo.elf -O ihex rtosdemo.hex\r
95 \r
96 rtosdemo.elf : $(ARM_OBJ) $(THUMB_OBJ) $(CRT0) Makefile\r
97         $(CC) $(CFLAGS) $(ARM_OBJ) $(THUMB_OBJ) -nostartfiles $(CRT0) $(LINKER_FLAGS)\r
98 \r
99 $(THUMB_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
100         $(CC) -c $(THUMB_FLAGS) $(CFLAGS) $< -o $@\r
101 \r
102 $(ARM_OBJ) : %.o : %.c $(LDSCRIPT) Makefile\r
103         $(CC) -c $(CFLAGS) $< -o $@\r
104 \r
105 clean :\r
106         touch Makefile\r
107 \r
108 \r
109 \r
110 \r
111 \r
112 \r
113 \r
114 \r
115 \r
116         \r
117 \r
118 \r