Commit 6c03a6be authored by Christian Sponfeldner's avatar Christian Sponfeldner

compiler paht is now configurable for make

parent ed88a0d3
# DEFAULT MAKEFILE FOR NEW C++ PROJECTS
#
# Copyright (c) 2016 Roman Bendt
......@@ -96,7 +97,14 @@ MAKEFLAGS += --no-print-directory
MORE_WARNINGS = -Wall -Warray-bounds=2 -Wc++11-compat -Wc++14-compat -Wcast-align -Wcast-qual -Wchkp -Wcomments -Wconditionally-supported -Wconversion -Wdate-time -Wdelete-incomplete -Wdisabled-optimization -Wdouble-promotion -Wextra -Wfloat-conversion -Wformat-signedness -Winline -Winvalid-memory-model -Winvalid-pch -Wlogical-op -Wmissing-declarations -Wmissing-format-attribute -Wnormalized -Woverlength-strings -Wpointer-arith -Wredundant-decls -Wshadow -Wshift-count-negative -Wshift-count-overflow -Wsized-deallocation -Wsizeof-array-argument -Wstack-protector -Wstrict-aliasing -Wstrict-overflow=5 -Wsuggest-attribute=pure -Wsuggest-attribute=const -Wsuggest-attribute=format -Wsuggest-final-methods -Wsuggest-final-types -Wsuggest-override -Wswitch-bool -Wsync-nand -Wtrampolines -Wunsafe-loop-optimizations -Wunused -Wunused-but-set-variable -Wunused-local-typedefs -Wunused-macros -Wuseless-cast -Wvarargs -Wvariadic-macros -Wvector-operation-performance -Wvla -Wwrite-strings -Wzero-as-null-pointer-constant
#-Wsign-conversion -Wpacked -Wpacked-bitfield-compat -Wsuggest-attribute=noreturn
CC = arm-none-eabi-g++
#GCC_PATH = /Your_Compiler_Path/gcc-arm-none-eabi-5_4-2016q3
CCPREFIX = arm-none-eabi-
ifdef GCC_PATH
CC = $(GCC_PATH)/bin/$(CCPREFIX)g++
else
CC = $(CCPREFIX)g++
endif
WNORMAL = -Wall -Wno-reorder
PARANOID = -Wall -Wextra -Wunused-parameter -Wconversion -Wsign-compare -Wshadow -Wzero-as-null-pointer-constant -pedantic -Wno-reorder -Wcast-qual -Wuseless-cast
#AFLAGS = -D FREETYPE_ENABLED -D MTKERNEL -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mthumb -ffunction-sections -fdata-sections -O0 -ggdb -flto -fno-rtti -fno-exceptions $(INC) -Wl,-Map=$(BUILD_PATH)/bin/out.map,--gc-sections -specs=nano.specs -u _printf_float -static
......@@ -163,7 +171,7 @@ init:
@mkdir -p $(BUILD_PATH)/bin $(BUILD_PATH)/obj
prep:
@./prepare_and_copy_to_master.sh $(BUILD_PATH) $(OUTPUT) $(PROJECT_NAME) $(NANOTEC_BASE_PATH) $(NANOTEC_TOOLS_DIR) $(PATH_EM5) $(OUTPUT_NAME)
@./prepare_and_copy_to_master.sh $(BUILD_PATH) $(OUTPUT) $(PROJECT_NAME) $(NANOTEC_BASE_PATH) $(NANOTEC_TOOLS_DIR) $(PATH_EM5) $(OUTPUT_NAME) $(GCC_PATH)
build: $(BUILD_PATH)/bin/$(OUTPUT)
......@@ -184,3 +192,4 @@ clean: tidy
print-% : ; @echo $* = $($*)
#!/bin/bash
#HOWTO:
# Args: BUILD_DIR OUTPUT PROJECT_NAME NANOTEC_BASE_PATH NANOTEC_TOOLS_DIR PATH_EM5
# Args: BUILD_DIR OUTPUT PROJECT_NAME NANOTEC_BASE_PATH NANOTEC_TOOLS_DIR PATH_EM5 GCC_PATH
BUILD_DIR=$1
OUTPUT=$2
......@@ -12,7 +12,7 @@ PATH_EM5=$6
OUTPUT_NAME=$7
echo -e "[\033[94mobjcopy\033[0m]"
arm-none-eabi-objcopy -O binary $BUILD_DIR/bin/$OUTPUT $BUILD_DIR/bin/$PROJECT_NAME.emp
$GCC_PATH/bin/arm-none-eabi-objcopy -O binary $BUILD_DIR/bin/$OUTPUT $BUILD_DIR/bin/$PROJECT_NAME.emp
echo -e "[\033[94mstm32crc\033[0m]"
./$NANOTEC_BASE_PATH/$NANOTEC_TOOLS_DIR/stmcrc32.x $BUILD_DIR/bin/$PROJECT_NAME.emp a
echo -e "[\033[94mrenaming\033[0m]"
......
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