Commit daf70521 authored by yoogx's avatar yoogx

* Add support for FreeRTOS

        For issue #21
parent ef211dc0
......@@ -5,7 +5,7 @@
CYGPATH_U = @CYGPATH_U@
CYGPATH_W = @CYGPATH_U@
GCC_GENERIC_CFLAGS= -g -Wall -Wextra -fdiagnostics-show-option -Wcast-align -Wjump-misses-init -Wswitch-enum -fprofile-arcs -ftest-coverage
GCC_GENERIC_CFLAGS= -g -Wall -Wextra -fdiagnostics-show-option -Wcast-align -Wjump-misses-init -Wswitch-enum
all: build-node
......@@ -41,9 +41,9 @@ ifneq ($(USER_LD),)
LD=$(USER_LD)
endif
CFLAGS=$(TARGET_CFLAGS) $(USER_CFLAGS)$(GCC_GENERIC_CFLAGS)
CFLAGS=$(TARGET_CFLAGS) $(USER_CFLAGS) $(GCC_GENERIC_CFLAGS)
CPPFLAGS=$(CFLAGS) $(USER_CPPFLAGS)
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS) -lgcov
LDFLAGS=$(TARGET_LDFLAGS) $(USER_LDFLAGS)
ifdef USE_GPROF
CFLAGS+=-D__PO_HI_USE_GPROF -pg
......@@ -356,6 +356,13 @@ $(BINARY): check-linuxtaste generate-asn1-deployment target-objects compile-po-h
$(CC) -o $(BINARY) $(EXTERNAL_OBJECTS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(USER_OBJS) $(LDFLAGS)
endif
ifeq ($(TARGET), freertos)
OBJS = $(USER_OBJS) $(PO_HI_OBJS) $(GENERATED_OBJS) $(EXTERNAL_OBJECTS)
$(BINARY): generate-asn1-deployment compile-po-hi compile-c-files compile-cpp-files $(USER_OBJS) $(GENERATED_OBJS) $(COMPILE_FREERTOS_OBJ)
$(make-exe)
$(LD) $(LDFLAGS) -T $(AADL_FOLDER)/LinkerScript.ld -o $(EXE).elf $(PO_HI_OBJS) $(GENERATED_OBJS) $(COMPILE_FREERTOS_OBJ) $(USER_OBJS) $(USER_LIBS)
endif
%.o: %.cpp
$(CXX) $(INCLUDE) $(CPPFLAGS) -c -o $@ $<
......@@ -365,6 +372,9 @@ endif
%.o: %.c
$(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
%.o: %.s
$(AS) $(INCLUDE) $(CFLAGS) -c -o $@ $<
clean: #target-clean
@-rm -f *~ *.o *.al temp.* *.metrix $(BINARY) $(BINARY).bin $(BINARY).bt $(BINARY).num $(BINARY).nxe b~*.* *.ali *.gcda *.gcno *.log *.xml
@-rm -rf drivers
......@@ -405,6 +415,10 @@ sonar_run: clean
make coverage
sonar-scanner
export SONAR_PROJECT_DIR=$(PWD)/..
export SONAR_RESULTS_RELATIVE_PATH=$(shell echo "$(PWD)" | sed 's:$(SONAR_PROJECT_DIR)/::g')
export TEMPLATE_PATH=$(shell sed -e 's:polyorb-hi-c/.*:polyorb-hi-c:' <<< $(PWD))
################################################################################
# sonarproperties: generation of configuration file for sonarqube
#
......
## This file is a template of a specific Makefile
## for PolyORB-HI-C. The name of the file must respect
## the form Makefile.targetname where targetname
## is the name of the execution platform in the model.
## This file set some variables useful to compile
## the source code to the target.
CC = your_c_compiler
CFLAGS = options and flags useful for your compiler
LD = the linker used (not used at this time)
LDFLAGS = flags useful for the link step
## The target-clean rule is useful if you have to handle
## specific actions to clean the target.
target-clean:
# This file is an empty placeholder for the FreeRTOS target. Given the
# many supported targets of FreeRTOS, and its model of compilation,
# the user has to provide all information in a user-defined
# makefile. See examples for more details.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment