1
0
forked from me/IronOS

Update Makefile

This commit is contained in:
Ben V. Brown
2020-11-01 13:36:50 +11:00
parent 1b579febcd
commit f445e2771c

View File

@@ -7,11 +7,6 @@ ifndef lang
lang:= EN lang:= EN
endif endif
# Discover the source files to build
# Enumerate all of the include directories # Enumerate all of the include directories
APP_INC_DIR = ./Core/Inc APP_INC_DIR = ./Core/Inc
INC_CMSIS_DEVICE = ./Core/BSP/Miniware/Vendor/CMSIS/Device/ST/STM32F1xx/Include INC_CMSIS_DEVICE = ./Core/BSP/Miniware/Vendor/CMSIS/Device/ST/STM32F1xx/Include
@@ -49,15 +44,16 @@ LDSCRIPT=stm32f103.ld
DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D GCC_ARMCM3 \ DEV_GLOBAL_DEFS= -D STM32F103T8Ux -D STM32F1 -D STM32 -D USE_HAL_DRIVER -D STM32F103xB -D USE_RTOS_SYSTICK -D GCC_ARMCM3 \
-D ARM_MATH_CM3 \ -D ARM_MATH_CM3 \
-D STM32F10X_MD -D STM32F10X_MD
DEV_LDFLAGS=-lm -Wl,--gc-sections DEV_LDFLAGS=-lm -Wl,--gc-sections -flto
DEV_AFLAGS= DEV_AFLAGS=-flto
DEV_CFLAGS= DEV_CFLAGS=-flto
DEV_CXXFLAGS= DEV_CXXFLAGS=-flto
flash_size=64k flash_size=64k
bootldr_size=0x4000 bootldr_size=0x4000
endif endif
ifeq ($(model),Pinecil) ifeq ($(model),Pinecil)
$(info Building for Pine64 )
DEVICE_INCLUDES = -I$(PINE_INC_DIR) \ DEVICE_INCLUDES = -I$(PINE_INC_DIR) \
-I$(PINE_INC_DIR)/N200 \ -I$(PINE_INC_DIR)/N200 \
-I$(PINE_VENDOR_INC_DIR) \ -I$(PINE_VENDOR_INC_DIR) \
@@ -103,7 +99,7 @@ OUTPUT_DIR=Objects
# code optimisation ------------------------------------------------------------ # code optimisation ------------------------------------------------------------
OPTIM_AS= -Wall OPTIM_AS= -Wall
OPTIM=-Os -flto -finline-small-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections OPTIM=-Os -finline-small-functions -findirect-inlining -fdiagnostics-color -ffunction-sections -fdata-sections
# global defines --------------------------------------------------------------- # global defines ---------------------------------------------------------------
@@ -134,7 +130,6 @@ endif
CC=$(COMPILER_PREFIX)-gcc CC=$(COMPILER_PREFIX)-gcc
CPP=$(COMPILER_PREFIX)-g++ CPP=$(COMPILER_PREFIX)-g++
AS=$(COMPILER_PREFIX)-as AS=$(COMPILER_PREFIX)-as
GCOV=$(COMPILER_PREFIX)-gcov
OBJCOPY=$(COMPILER_PREFIX)-objcopy OBJCOPY=$(COMPILER_PREFIX)-objcopy
OBJDUMP=$(COMPILER_PREFIX)-objdump OBJDUMP=$(COMPILER_PREFIX)-objdump
SIZE=$(COMPILER_PREFIX)-size SIZE=$(COMPILER_PREFIX)-size
@@ -168,8 +163,8 @@ LINKER_FLAGS=$(CPUFLAGS) \
-MMD \ -MMD \
-std=c++11 \ -std=c++11 \
$(OPTIM) \ $(OPTIM) \
-fno-common \
-ffreestanding \ -ffreestanding \
-fno-common \
-fno-rtti \ -fno-rtti \
-fno-exceptions \ -fno-exceptions \
-fno-non-call-exceptions \ -fno-non-call-exceptions \
@@ -230,8 +225,8 @@ CXXFLAGS=$(CPUFLAGS) \
$(CHECKOPTIONS) \ $(CHECKOPTIONS) \
-std=c++11 \ -std=c++11 \
$(OPTIM) \ $(OPTIM) \
-fno-common \
-ffreestanding \ -ffreestanding \
-fno-common \
-fno-rtti \ -fno-rtti \
-fno-exceptions \ -fno-exceptions \
-fno-non-call-exceptions \ -fno-non-call-exceptions \
@@ -248,11 +243,11 @@ CFLAGS=$(CPUFLAGS) \
$(GLOBAL_DEFINES) \ $(GLOBAL_DEFINES) \
-D${COMPILER} \ -D${COMPILER} \
-MMD \ -MMD \
-ffreestanding \
-std=gnu99 \ -std=gnu99 \
$(OPTIM) \ $(OPTIM) \
$(DEV_CFLAGS) \ $(DEV_CFLAGS) \
-fno-common \ -fno-common \
-ffreestanding \
-c -c