cppcheck added

This commit is contained in:
tkl 2016-07-23 10:33:26 +02:00
parent 866581be78
commit 7cf36fe7c1
4 changed files with 5 additions and 4 deletions

View File

@ -15,6 +15,8 @@ CFLAGS += \
$(addprefix -I, $(INCLUDES)) \ $(addprefix -I, $(INCLUDES)) \
-Wall -Wall
CPPCHECK_FLAGS = --template=gcc --error-exitcode=1 --enable=all --inline-suppr
include $(ROOT_DIR)/config/make/tools.mk include $(ROOT_DIR)/config/make/tools.mk
SRC_DIR = $(ROOT_DIR)/source SRC_DIR = $(ROOT_DIR)/source

View File

@ -7,7 +7,7 @@ CFLAGS += -DBOARD_STM32F4_DISCOVERY
endif endif
CROSS_COMPILE=arm-none-eabi- CROSS_COMPILE=arm-none-eabi-
INCLUDES := /opt/arm-2011.03/arm-none-eabi/include INCLUDES := /usr/lib/arm-none-eabi/include
ifeq ($(DEBUG),y) ifeq ($(DEBUG),y)
OPTIM = 0 OPTIM = 0
@ -40,11 +40,8 @@ LDFLAGS=\
ASFLAGS=-mapcs-32 -g ASFLAGS=-mapcs-32 -g
ARFLAGS=rcs ARFLAGS=rcs
OOCD_IMAGE=$(BINFILE) OOCD_IMAGE=$(BINFILE)
OOCD_CFG_FILE=$(EXE_DIR)/openocd.cfg OOCD_CFG_FILE=$(EXE_DIR)/openocd.cfg
PRE_PROGRAM = echo "telnet_port 4444\ninit\nreset halt\nflash write_image erase $(OOCD_IMAGE) 0x08000000 bin\nreset run\n shutdown\n" > $(OOCD_CFG_FILE) PRE_PROGRAM = echo "telnet_port 4444\ninit\nreset halt\nflash write_image erase $(OOCD_IMAGE) 0x08000000 bin\nreset run\n shutdown\n" > $(OOCD_CFG_FILE)
PROGRAM = openocd -f /usr/share/openocd/scripts/board/stm32f4discovery.cfg -f $(OOCD_CFG_FILE) PROGRAM = openocd -f /usr/share/openocd/scripts/board/stm32f4discovery.cfg -f $(OOCD_CFG_FILE)
#PROGRAM = st-flash write $(BINFILE) 0x8000000

View File

@ -13,3 +13,4 @@ RM = rm -f
MV = mv MV = mv
CP = cp CP = cp
MKDIR = mkdir -p MKDIR = mkdir -p
CPPCHECK = cppcheck

View File

@ -45,6 +45,7 @@ $(OBJ_DIR)/%.o: $(SRC_DIR)/%.c
@$(MKDIR) $(OBJ_DIR) @$(MKDIR) $(OBJ_DIR)
@$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder))) @$(foreach folder, $(SUB_FOLDER), $(shell mkdir -p $(OBJ_DIR)/$(folder)))
$(call makedep,$<,$@,$(subst .o,.d,$@)) $(call makedep,$<,$@,$(subst .o,.d,$@))
$(CPPCHECK) $(CPPCHECK_FLAGS) $<
$(CC) $(CFLAGS) -c $< -o $@ $(CC) $(CFLAGS) -c $< -o $@
$(OBJ_DIR)/%.o: $(SRC_DIR)/%.s $(OBJ_DIR)/%.o: $(SRC_DIR)/%.s