mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-10-17 18:27:47 -04:00
* Add IPv6 Demo (#937) * Add demo changes * Update kernel and library paths * Update main.c * Run uncrustify * Fix spell checker * CI check file headers update * Add IPv6/v4 UDP echo server with zero copy/non-zero copy versions * Add VS proj file changes to include the UDP echo sample code * readme update --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Update Backward Compatibility Flag (#954) * Update Backward Compatibility Flag * Update FreeRTOS_GetUDPPayloadBuffer_ByIPType * Update FreeRTOS_IPStart to FreeRTOS_IPInit_Multi * Update Application APIs * Remove ipconfigCOMPATIBLE_WITH_SINGLE * Update Static Lib files (#956) * Update Static Lib files * making vApplicationIPNetworkEventHook backward compatible in demos * Update CI check file headers --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com> * Add WinPCap NetworkInterface Changes (#958) * Update winpcap network interface * Run uncrustify * Update function to include NetworkInterface_t parameters * Adding compatibility for xApplicationDNSQueryHook with latest dev branch for old demos (#957) * adding compatibility for xApplicationDNSQueryHook with latest dev branch * adding tcp echo server source * removing unused sub demos * fix build issues (#969) * Update demo to latest +TCP dev/IPv6_integration (#978) * remove macro namings * rename sin_addr to sin_address.ulIP_IPv4 for ipv6 demo * replace in6addr_any with FreeRTOS_in6addr_any * replace mainCREATE_UDP_ECHO_SERVER_TASK with mainCREATE_UDP_ECHO_TASKS_SINGLE * handle removal of sin_addr macro to sin_address.ulIP_IPv4 * updating +TCP repo to latest dev/IPv6_integration * minor update to more clear code * more sin_addr to sin_address.ulIP_IPv4 replacements * fix makefiles for qemu and posix demos * review feedback changes * Update FreeRTOS-Plus-TCP for RC2 * Change from PR (#994) * Update FreeRTOS-Plus-TCP for RC2 * Update copyright * Ignore WinPCap for files header check failure. * Update checker * Update manifest * Point manifest to latest commit * Fix Spell-checker * Update doxygen * Update xApplicationDHCPHook for backward compatibility (#999) * Update xApplicationDHCPHook for backward compatability * Update IPv6 * Update VisualStudio Static Project files * Update pxEndPoint error (#1002) * Update IPv6 demo ReadMe (#1004) * Update ReadMe * Update setup requirement * Update UDP demo info * Update comment * TCP demo changes post build separation (#1011) * adding sin_family to dest adddr for FreeRTOS_sendto * updating FreeRTOS_bind to input sin_family post build separation changes * updating FreeRTOS_connect to input sin_family post build separation changes * minor fix * updating copyright year * updating file headers * updating +TCP submodule * updating file headers * updating file headers * updating manifest file to have latest +TCP submodule hash * Fix issue with posix demo while running with ipconfigIPv4_BACKWARD_COMPATIBLE enabled for +TCP stack (#1027) * Update the submodule pointer to IPv6 main * Update manifest with latest TCP commit * Update file checker exception * Ignore Visual studio project file from file header checker --------- Co-authored-by: Tony Josi <tonyjosi@amazon.com>
111 lines
3.7 KiB
Makefile
111 lines
3.7 KiB
Makefile
CC := gcc
|
|
BIN := posix_tcp_demo
|
|
|
|
BUILD_DIR := build
|
|
BUILD_DIR_ABS := $(abspath $(BUILD_DIR))
|
|
|
|
FREERTOS_DIR_REL := ../../../FreeRTOS
|
|
FREERTOS_DIR := $(abspath $(FREERTOS_DIR_REL))
|
|
|
|
FREERTOS_PLUS_DIR_REL := ../../../FreeRTOS-Plus
|
|
FREERTOS_PLUS_DIR := $(abspath $(FREERTOS_PLUS_DIR_REL))
|
|
|
|
KERNEL_DIR := ${FREERTOS_DIR}/Source
|
|
|
|
INCLUDE_DIRS := -I.
|
|
INCLUDE_DIRS += -I./Trace_Recorder_Configuration
|
|
INCLUDE_DIRS += -I${KERNEL_DIR}/include
|
|
INCLUDE_DIRS += -I${KERNEL_DIR}/portable/ThirdParty/GCC/Posix
|
|
INCLUDE_DIRS += -I${KERNEL_DIR}/portable/ThirdParty/GCC/Posix/utils
|
|
INCLUDE_DIRS += -I${FREERTOS_DIR}/Demo/Common/include
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/linux/
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/include/
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/portable/Compiler/GCC/
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/Include
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/config
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/streamports/File/include
|
|
INCLUDE_DIRS += -I${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/streamports/File/config
|
|
|
|
# FreeRTOS Kernel source files
|
|
SOURCE_FILES :=
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/event_groups.c
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/list.c
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/queue.c
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/stream_buffer.c
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/tasks.c
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/timers.c
|
|
|
|
# FreeRTOS Kernel POSIX Port
|
|
SOURCE_FILES += ${KERNEL_DIR}/portable/ThirdParty/GCC/Posix/utils/wait_for_event.c
|
|
SOURCE_FILES += ${KERNEL_DIR}/portable/ThirdParty/GCC/Posix/port.c
|
|
|
|
# FreeRTOS+TCP demo source file
|
|
SOURCE_FILES += SimpleTCPEchoServer.c
|
|
SOURCE_FILES += TCPEchoClient_SingleTasks.c
|
|
SOURCE_FILES += console.c
|
|
SOURCE_FILES += main.c
|
|
SOURCE_FILES += main_networking.c
|
|
SOURCE_FILES += runtime_stats_hooks.c
|
|
|
|
# Memory manager (use malloc() / free() )
|
|
SOURCE_FILES += ${FREERTOS_DIR}/Source/portable/MemMang/heap_3.c
|
|
|
|
|
|
# FreeRTOS TCP
|
|
SOURCE_FILES += $(wildcard ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/*.c )
|
|
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/portable/BufferManagement/BufferAllocation_2.c
|
|
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-TCP/source/portable/NetworkInterface/linux/NetworkInterface.c
|
|
|
|
CFLAGS := -ggdb3
|
|
LDFLAGS := -ggdb3 -pthread -lpcap
|
|
CPPFLAGS := $(INCLUDE_DIRS) -DBUILD_DIR=\"$(BUILD_DIR_ABS)\"
|
|
|
|
ifeq ($(TRACE_ON_ENTER),1)
|
|
CPPFLAGS += -DTRACE_ON_ENTER=1
|
|
else
|
|
CPPFLAGS += -DTRACE_ON_ENTER=0
|
|
endif
|
|
|
|
ifeq ($(COVERAGE_TEST),1)
|
|
CPPFLAGS += -DprojCOVERAGE_TEST=1
|
|
else
|
|
CPPFLAGS += -DprojCOVERAGE_TEST=0
|
|
# Trace library.
|
|
SOURCE_FILES += ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/trcKernelPort.c
|
|
SOURCE_FILES += $(wildcard ${FREERTOS_PLUS_DIR}/Source/FreeRTOS-Plus-Trace/*.c )
|
|
endif
|
|
|
|
ifdef PROFILE
|
|
CFLAGS += -pg -O0
|
|
LDFLAGS += -pg -O0
|
|
else
|
|
CFLAGS += -O3
|
|
LDFLAGS += -O3
|
|
endif
|
|
|
|
OBJ_FILES = $(SOURCE_FILES:%.c=$(BUILD_DIR)/%.o)
|
|
|
|
DEP_FILE = $(OBJ_FILES:%.o=%.d)
|
|
|
|
${BIN} : $(BUILD_DIR)/$(BIN)
|
|
|
|
${BUILD_DIR}/${BIN} : ${OBJ_FILES}
|
|
-mkdir -p ${@D}
|
|
$(CC) $^ ${LDFLAGS} -o $@
|
|
|
|
|
|
-include ${DEP_FILE}
|
|
|
|
${BUILD_DIR}/%.o : %.c Makefile
|
|
-mkdir -p $(@D)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) -MMD -c $< -o $@
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
|
-rm -rf $(BUILD_DIR)
|
|
|
|
GPROF_OPTIONS := --directory-path=$(INCLUDE_DIRS)
|
|
profile:
|
|
gprof -a -p --all-lines $(GPROF_OPTIONS) $(BUILD_DIR)/$(BIN) $(BUILD_DIR)/gmon.out > $(BUILD_DIR)/prof_flat.txt
|
|
gprof -a --graph $(GPROF_OPTIONS) $(BUILD_DIR)/$(BIN) $(BUILD_DIR)/gmon.out > $(BUILD_DIR)/prof_call_graph.txt
|