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