]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
ecf6e846a2603c6d45b3baabdf337cf4513e7b66
[freertos] / FreeRTOS / Demo / ARM7_LPC2368_Eclipse / RTOSDemo / Makefile
1 #/*\r
2 # * FreeRTOS Kernel V10.0.0\r
3 # * Copyright (C) 2017 Amazon.com, Inc. or its affiliates.  All Rights Reserved.\r
4 # *\r
5 # * Permission is hereby granted, free of charge, to any person obtaining a copy of\r
6 # * this software and associated documentation files (the "Software"), to deal in\r
7 # * the Software without restriction, including without limitation the rights to\r
8 # * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\r
9 # * the Software, and to permit persons to whom the Software is furnished to do so,\r
10 # * subject to the following conditions:\r
11 # *\r
12 # * The above copyright notice and this permission notice shall be included in all\r
13 # * copies or substantial portions of the Software. If you wish to use our Amazon\r
14 # * FreeRTOS name, please do so in a fair use way that does not cause confusion.\r
15 # *\r
16 # * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
17 # * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
18 # * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
19 # * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
20 # * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
21 # * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
22 # *\r
23 # * http://www.FreeRTOS.org\r
24 # * http://aws.amazon.com/freertos\r
25 # *\r
26 # * 1 tab == 4 spaces!\r
27 # */\r
28 \r
29 \r
30 RTOS_SOURCE_DIR=../../../Source\r
31 DEMO_COMMON_DIR=../../Common/Minimal\r
32 DEMO_INCLUDE_DIR=../../Common/include\r
33 UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip\r
34 \r
35 CC=arm-elf-gcc\r
36 OBJCOPY=arm-elf-objcopy\r
37 LDSCRIPT=lpc2368.ld\r
38 \r
39 LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
40 \r
41 DEBUG=-g\r
42 OPTIM=-O0\r
43 \r
44 \r
45 CFLAGS= $(DEBUG) \\r
46                 $(OPTIM) \\r
47                 -T$(LDSCRIPT) \\r
48                 -I . \\r
49                 -I $(RTOS_SOURCE_DIR)/include \\r
50                 -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx \\r
51                 -I $(DEMO_INCLUDE_DIR) \\r
52                 -I ./webserver \\r
53                 -I $(UIP_COMMON_DIR) \\r
54                 -D ROWLEY_LPC23xx \\r
55                 -D THUMB_INTERWORK \\r
56                 -mcpu=arm7tdmi \\r
57                 -D PACK_STRUCT_END=__attribute\(\(packed\)\) \\r
58                 -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \\r
59                 -fomit-frame-pointer \\r
60                 -mthumb-interwork \\r
61                 -fno-dwarf2-cfi-asm \\r
62                 -fno-strict-aliasing\r
63                 \r
64 THUMB_SOURCE= \\r
65                 main.c \\r
66                 ./ParTest/ParTest.c \\r
67                 ./LCD/portlcd.c \\r
68                 $(DEMO_COMMON_DIR)/BlockQ.c \\r
69                 $(DEMO_COMMON_DIR)/blocktim.c \\r
70                 $(DEMO_COMMON_DIR)/flash.c \\r
71                 $(DEMO_COMMON_DIR)/integer.c \\r
72                 $(DEMO_COMMON_DIR)/GenQTest.c \\r
73                 $(DEMO_COMMON_DIR)/QPeek.c \\r
74                 $(DEMO_COMMON_DIR)/dynamic.c \\r
75                 ./webserver/uIP_Task.c \\r
76                 ./webserver/emac.c \\r
77                 ./webserver/httpd.c \\r
78                 ./webserver/httpd-cgi.c \\r
79                 ./webserver/httpd-fs.c \\r
80                 ./webserver/http-strings.c \\r
81                 $(UIP_COMMON_DIR)/uip_arp.c \\r
82                 $(UIP_COMMON_DIR)/psock.c \\r
83                 $(UIP_COMMON_DIR)/timer.c \\r
84                 $(UIP_COMMON_DIR)/uip.c \\r
85                 $(RTOS_SOURCE_DIR)/list.c \\r
86                 $(RTOS_SOURCE_DIR)/queue.c \\r
87                 $(RTOS_SOURCE_DIR)/tasks.c \\r
88                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \\r
89                 $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \\r
90                 syscalls.c\r
91 \r
92 ARM_SOURCE= \\r
93                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \\r
94                 ./webserver/EMAC_ISR.c\r
95 \r
96 THUMB_OBJS = $(THUMB_SOURCE:.c=.o)\r
97 ARM_OBJS = $(ARM_SOURCE:.c=.o)\r
98 \r
99 \r
100 all: RTOSDemo.bin\r
101 \r
102 RTOSDemo.bin : RTOSDemo.hex\r
103         $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin\r
104          \r
105 RTOSDemo.hex : RTOSDemo.elf\r
106         $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex\r
107 \r
108 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile\r
109         $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) \r
110 \r
111 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
112         $(CC) -c $(CFLAGS) -mthumb $< -o $@\r
113 \r
114 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
115         $(CC) -c $(CFLAGS) $< -o $@\r
116 \r
117 clean :\r
118         rm $(THUMB_OBJS)\r
119         rm $(ARM_OBJS)\r
120         touch Makefile\r
121         rm RTOSDemo.elf\r
122         rm RTOSDemo.hex\r
123         \r
124         \r
125         \r
126 \r
127 \r
128 \r
129 \r