2 # * FreeRTOS Kernel V10.3.1
3 # * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
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:
12 # * The above copyright notice and this permission notice shall be included in all
13 # * copies or substantial portions of the Software.
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.
22 # * http://www.FreeRTOS.org
23 # * http://aws.amazon.com/freertos
25 # * 1 tab == 4 spaces!
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
35 OBJCOPY=arm-elf-objcopy
38 LINKER_FLAGS=-mthumb -nostartfiles -Xlinker -oRTOSDemo.elf -Xlinker -M -Xlinker -Map=rtosdemo.map
48 -I $(RTOS_SOURCE_DIR)/include \
49 -I $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx \
50 -I $(DEMO_INCLUDE_DIR) \
52 -I $(UIP_COMMON_DIR) \
56 -D PACK_STRUCT_END=__attribute\(\(packed\)\) \
57 -D ALIGN_STRUCT_END=__attribute\(\(aligned\(4\)\)\) \
58 -fomit-frame-pointer \
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 \
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 \
92 $(RTOS_SOURCE_DIR)/portable/GCC/ARM7_LPC23xx/portISR.c \
93 ./webserver/EMAC_ISR.c
95 THUMB_OBJS = $(THUMB_SOURCE:.c=.o)
96 ARM_OBJS = $(ARM_SOURCE:.c=.o)
101 RTOSDemo.bin : RTOSDemo.hex
102 $(OBJCOPY) RTOSDemo.elf -O binary RTOSDemo.bin
104 RTOSDemo.hex : RTOSDemo.elf
105 $(OBJCOPY) RTOSDemo.elf -O ihex RTOSDemo.hex
107 RTOSDemo.elf : $(THUMB_OBJS) $(ARM_OBJS) boot.s Makefile
108 $(CC) $(CFLAGS) $(ARM_OBJS) $(THUMB_OBJS) $(LIBS) boot.s $(LINKER_FLAGS)
110 $(THUMB_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
111 $(CC) -c $(CFLAGS) -mthumb $< -o $@
113 $(ARM_OBJS) : %.o : %.c Makefile FreeRTOSConfig.h
114 $(CC) -c $(CFLAGS) $< -o $@