Disable compilation of unused can/cec/crc libraries.

This commit is contained in:
Dominic Clifton 2015-01-08 05:02:23 +00:00
parent 1ef76f2f3f
commit 1efe530ea3
3 changed files with 18 additions and 5 deletions

View File

@ -105,6 +105,12 @@ STDPERIPH_DIR = $(ROOT)/lib/main/STM32F10x_StdPeriph_Driver
STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c)) STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c))
EXCLUDES = stm32f10x_crc.c \
stm32f10x_cec.c \
stm32f10x_can.c
STDPERIPH_SRC := $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC))
# Search path and source files for the CMSIS sources # Search path and source files for the CMSIS sources
VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x
CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \ CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \
@ -129,6 +135,12 @@ STDPERIPH_DIR = $(ROOT)/lib/main/STM32F10x_StdPeriph_Driver
STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c)) STDPERIPH_SRC = $(notdir $(wildcard $(STDPERIPH_DIR)/src/*.c))
EXCLUDES = stm32f10x_crc.c \
stm32f10x_cec.c \
stm32f10x_can.c
STDPERIPH_SRC := $(filter-out ${EXCLUDES}, $(STDPERIPH_SRC))
# Search path and source files for the CMSIS sources # Search path and source files for the CMSIS sources
VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x VPATH := $(VPATH):$(CMSIS_DIR)/CM3/CoreSupport:$(CMSIS_DIR)/CM3/DeviceSupport/ST/STM32F10x
CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \ CMSIS_SRC = $(notdir $(wildcard $(CMSIS_DIR)/CM3/CoreSupport/*.c \
@ -355,6 +367,7 @@ CJMCU_SRC = startup_stm32f10x_md_gcc.S \
drivers/system_stm32f10x.c \ drivers/system_stm32f10x.c \
drivers/timer.c \ drivers/timer.c \
drivers/timer_stm32f10x.c \ drivers/timer_stm32f10x.c \
blackbox/blackbox.c \
hardware_revision.c \ hardware_revision.c \
$(COMMON_SRC) $(COMMON_SRC)

View File

@ -32,8 +32,8 @@
/* Includes ------------------------------------------------------------------*/ /* Includes ------------------------------------------------------------------*/
/* Comment the line below to disable peripheral header file inclusion */ /* Comment the line below to disable peripheral header file inclusion */
#include "stm32f30x_adc.h" #include "stm32f30x_adc.h"
#include "stm32f30x_can.h" //#include "stm32f30x_can.h"
#include "stm32f30x_crc.h" //#include "stm32f30x_crc.h"
#include "stm32f30x_comp.h" #include "stm32f30x_comp.h"
#include "stm32f30x_dac.h" #include "stm32f30x_dac.h"
#include "stm32f30x_dbgmcu.h" #include "stm32f30x_dbgmcu.h"

View File

@ -27,9 +27,9 @@
/* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */ /* Uncomment/Comment the line below to enable/disable peripheral header file inclusion */
#include "stm32f10x_adc.h" #include "stm32f10x_adc.h"
#include "stm32f10x_bkp.h" #include "stm32f10x_bkp.h"
#include "stm32f10x_can.h" //#include "stm32f10x_can.h"
#include "stm32f10x_cec.h" //#include "stm32f10x_cec.h"
#include "stm32f10x_crc.h" //#include "stm32f10x_crc.h"
#include "stm32f10x_dac.h" #include "stm32f10x_dac.h"
#include "stm32f10x_dbgmcu.h" #include "stm32f10x_dbgmcu.h"
#include "stm32f10x_dma.h" #include "stm32f10x_dma.h"