]> git.sur5r.net Git - freertos/blob - FreeRTOS/Demo/ARM7_LPC2368_Eclipse/RTOSDemo/Makefile
7a96d3720234d8176d23ec91940292eca2b96429
[freertos] / FreeRTOS / Demo / ARM7_LPC2368_Eclipse / RTOSDemo / Makefile
1 #/*\r
2 # * FreeRTOS Kernel V10.3.0\r
3 # * Copyright (C) 2020 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.\r
14 # *\r
15 # * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r
16 # * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\r
17 # * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\r
18 # * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\r
19 # * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\r
20 # * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\r
21 # *\r
22 # * http://www.FreeRTOS.org\r
23 # * http://aws.amazon.com/freertos\r
24 # *\r
25 # * 1 tab == 4 spaces!\r
26 # */\r
27 \r
28 \r
29 RTOS_SOURCE_DIR=../../../Source\r
30 DEMO_COMMON_DIR=../../Common/Minimal\r
31 DEMO_INCLUDE_DIR=../../Common/include\r
32 UIP_COMMON_DIR=../../Common/ethernet/uIP/uip-1.0/uip\r
33 \r
34 CC=arm-elf-gcc\r
35 OBJCOPY=arm-elf-objcopy\r
36 LDSCRIPT=lpc2368.ld\r
37 \r
38 LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map\r
39 \r
40 DEBUG=-g\r
41 OPTIM=-O0\r
42 \r
43 \r
44 CFLAGS= $(DEBUG) \\r
45                 $(OPTIM) \\r
46                 -T$(LDSCRIPT) \\r
47                 -I . \\r
48                 -I $(RTOS_SOURCE_DIR)/include \\r
49                 -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx \\r
50                 -I $(DEMO_INCLUDE_DIR) \\r
51                 -I ./webserver \\r
52                 -I $(UIP_COMMON_DIR) \\r
53                 -D ROWLEY_LPC23xx \\r
54                 -D THUMB_INTERWORK \\r
55                 -mcpu=arm7tdmi \\r
56                 -D PACK_STRUCT_END=__attribute\(\(packed\)\) \\r
57                 -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \\r
58                 -fomit-frame-pointer \\r
59                 -mthumb-interwork \\r
60                 -fno-dwarf2-cfi-asm \\r
61                 -fno-strict-aliasing\r
62                 \r
63 THUMB_SOURCE= \\r
64                 main.c \\r
65                 ./ParTest/ParTest.c \\r
66                 ./LCD/portlcd.c \\r
67                 $(DEMO_COMMON_DIR)/BlockQ.c \\r
68                 $(DEMO_COMMON_DIR)/blocktim.c \\r
69                 $(DEMO_COMMON_DIR)/flash.c \\r
70                 $(DEMO_COMMON_DIR)/integer.c \\r
71                 $(DEMO_COMMON_DIR)/GenQTest.c \\r
72                 $(DEMO_COMMON_DIR)/QPeek.c \\r
73                 $(DEMO_COMMON_DIR)/dynamic.c \\r
74                 ./webserver/uIP_Task.c \\r
75                 ./webserver/emac.c \\r
76                 ./webserver/httpd.c \\r
77                 ./webserver/httpd-cgi.c \\r
78                 ./webserver/httpd-fs.c \\r
79                 ./webserver/http-strings.c \\r
80                 $(UIP_COMMON_DIR)/uip_arp.c \\r
81                 $(UIP_COMMON_DIR)/psock.c \\r
82                 $(UIP_COMMON_DIR)/timer.c \\r
83                 $(UIP_COMMON_DIR)/uip.c \\r
84                 $(RTOS_SOURCE_DIR)/list.c \\r
85                 $(RTOS_SOURCE_DIR)/queue.c \\r
86                 $(RTOS_SOURCE_DIR)/tasks.c \\r
87                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/port.c \\r
88                 $(RTOS_SOURCE_DIR)/portable/MemMang/heap_2.c \\r
89                 syscalls.c\r
90 \r
91 ARM_SOURCE= \\r
92                 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \\r
93                 ./webserver/EMAC_ISR.c\r
94 \r
95 THUMB_OBJS = $(THUMB_SOURCE:.c=.o)\r
96 ARM_OBJS = $(ARM_SOURCE:.c=.o)\r
97 \r
98 \r
99 all: RTOSDemo.bin\r
100 \r
101 RTOSDemo.bin : RTOSDemo.hex\r
102         $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin\r
103          \r
104 RTOSDemo.hex : RTOSDemo.elf\r
105         $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex\r
106 \r
107 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile\r
108         $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS) \r
109 \r
110 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
111         $(CC) -c $(CFLAGS) -mthumb $< -o $@\r
112 \r
113 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h\r
114         $(CC) -c $(CFLAGS) $< -o $@\r
115 \r
116 clean :\r
117         rm $(THUMB_OBJS)\r
118         rm $(ARM_OBJS)\r
119         touch Makefile\r
120         rm RTOSDemo.elf\r
121         rm RTOSDemo.hex\r
122         \r
123         \r
124         \r
125 \r
126 \r
127 \r
128 \r