mirror of
https://github.com/pine64/bl_iot_sdk.git
synced 2024-09-02 04:59:20 +00:00
fix makefile
This commit is contained in:
parent
1e0e36fd98
commit
a0bb1717d6
@ -129,7 +129,7 @@ include_path += $(filter %/$(1), $(COMPONENTS_REAL_PATH))
|
|||||||
endef
|
endef
|
||||||
$(foreach comp,$(INCLUDE_COMPONENTS),$(eval $(call include_comps_add,$(comp))))
|
$(foreach comp,$(INCLUDE_COMPONENTS),$(eval $(call include_comps_add,$(comp))))
|
||||||
INCLUDE_COMPONENTS_REAL_PATH := $(include_path)
|
INCLUDE_COMPONENTS_REAL_PATH := $(include_path)
|
||||||
# include components
|
# include components
|
||||||
COMPONENTS := $(filter $(INCLUDE_COMPONENTS), $(COMPONENTS))
|
COMPONENTS := $(filter $(INCLUDE_COMPONENTS), $(COMPONENTS))
|
||||||
COMPONENTS_REAL_PATH := $(filter $(INCLUDE_COMPONENTS_REAL_PATH), $(COMPONENTS_REAL_PATH))
|
COMPONENTS_REAL_PATH := $(filter $(INCLUDE_COMPONENTS_REAL_PATH), $(COMPONENTS_REAL_PATH))
|
||||||
endif
|
endif
|
||||||
@ -214,7 +214,7 @@ BL_CHIP_NAME := ${CONFIG_CHIP_NAME}
|
|||||||
|
|
||||||
# Set default LDFLAGS
|
# Set default LDFLAGS
|
||||||
# -nostdlib
|
# -nostdlib
|
||||||
# --specs=nosys.specs
|
# --specs=nosys.specs
|
||||||
EXTRA_LDFLAGS ?= -Wl,--cref -nostartfiles
|
EXTRA_LDFLAGS ?= -Wl,--cref -nostartfiles
|
||||||
ifeq ($(CONFIG_ZIGBEE), 1)
|
ifeq ($(CONFIG_ZIGBEE), 1)
|
||||||
EXTRA_LDFLAGS += --specs=nosys.specs
|
EXTRA_LDFLAGS += --specs=nosys.specs
|
||||||
@ -242,7 +242,7 @@ LDFLAGS ?= $(E21_CPU_LDFLAGS) \
|
|||||||
# before including project.mk. Default flags will be added before the ones provided in application Makefile.
|
# before including project.mk. Default flags will be added before the ones provided in application Makefile.
|
||||||
|
|
||||||
# CPPFLAGS used by C preprocessor
|
# CPPFLAGS used by C preprocessor
|
||||||
# If any flags are defined in application Makefile, add them at the end.
|
# If any flags are defined in application Makefile, add them at the end.
|
||||||
CPPFLAGS ?=
|
CPPFLAGS ?=
|
||||||
ifeq ($(CONFIG_ENABLE_ACP),1)
|
ifeq ($(CONFIG_ENABLE_ACP),1)
|
||||||
CPPFLAGS += -DCONF_USER_ENABLE_ACP
|
CPPFLAGS += -DCONF_USER_ENABLE_ACP
|
||||||
@ -291,7 +291,7 @@ COMMON_FLAGS_M4_EXT := \
|
|||||||
-ffreestanding \
|
-ffreestanding \
|
||||||
-fno-strict-aliasing
|
-fno-strict-aliasing
|
||||||
|
|
||||||
|
|
||||||
COMMON_FLAGS += $(COMMON_FLAGS_M4_EXT)
|
COMMON_FLAGS += $(COMMON_FLAGS_M4_EXT)
|
||||||
|
|
||||||
ifdef CONFIG_STACK_CHECK_NORM
|
ifdef CONFIG_STACK_CHECK_NORM
|
||||||
@ -341,8 +341,11 @@ CFLAGS := $(strip \
|
|||||||
-save-temps=obj
|
-save-temps=obj
|
||||||
|
|
||||||
CXXFLAGS := $(strip \
|
CXXFLAGS := $(strip \
|
||||||
$(CPPFLAGS) \
|
-std=c++11 \
|
||||||
$(OPTIMIZATION_FLAGS) \
|
$(OPTIMIZATION_FLAGS) $(DEBUG_FLAGS) \
|
||||||
|
$(COMMON_FLAGS) \
|
||||||
|
$(COMMON_WARNING_FLAGS) \
|
||||||
|
$(CXXFLAGS) \
|
||||||
$(E21_CPU_CFLAGS) \
|
$(E21_CPU_CFLAGS) \
|
||||||
-nostdlib \
|
-nostdlib \
|
||||||
-g3 \
|
-g3 \
|
||||||
@ -357,7 +360,9 @@ CXXFLAGS := $(strip \
|
|||||||
-Wswitch-default \
|
-Wswitch-default \
|
||||||
-Wunused \
|
-Wunused \
|
||||||
-Wundef \
|
-Wundef \
|
||||||
-fno-rtti -fno-exceptions)
|
-fno-rtti -fno-exceptions \
|
||||||
|
-save-temps=obj \
|
||||||
|
)
|
||||||
|
|
||||||
export CFLAGS CPPFLAGS CXXFLAGS ASMFLAGS
|
export CFLAGS CPPFLAGS CXXFLAGS ASMFLAGS
|
||||||
|
|
||||||
@ -430,7 +435,7 @@ all_binaries: $(APP_BIN)
|
|||||||
$(APP_BIN): $(APP_ELF)
|
$(APP_BIN): $(APP_ELF)
|
||||||
@echo "Generating BIN File to $@"
|
@echo "Generating BIN File to $@"
|
||||||
ifeq ($(CONFIG_ENABLE_ACP),1)
|
ifeq ($(CONFIG_ENABLE_ACP),1)
|
||||||
$(OBJCOPY) -S -O binary -R .rom.cpu1 $< $(@:.bin=.cpu0.bin)
|
$(OBJCOPY) -S -O binary -R .rom.cpu1 $< $(@:.bin=.cpu0.bin)
|
||||||
$(OBJCOPY) -S -O binary -j .rom.cpu1 $< $(@:.bin=.cpu1.bin)
|
$(OBJCOPY) -S -O binary -j .rom.cpu1 $< $(@:.bin=.cpu1.bin)
|
||||||
cp $(@:.bin=.cpu0.bin) $(@:.bin=.acp.bin)
|
cp $(@:.bin=.cpu0.bin) $(@:.bin=.acp.bin)
|
||||||
dd if=$(@:.bin=.cpu1.bin) of=$(@:.bin=.acp.bin) bs=512 seek=2 conv=notrunc
|
dd if=$(@:.bin=.cpu1.bin) of=$(@:.bin=.acp.bin) bs=512 seek=2 conv=notrunc
|
||||||
@ -438,23 +443,23 @@ ifeq ($(CONFIG_ENABLE_ACP),1)
|
|||||||
else
|
else
|
||||||
ifeq ($(CONFIG_LINK_ROM),1)
|
ifeq ($(CONFIG_LINK_ROM),1)
|
||||||
$(OBJCOPY) -S -O binary -R .romdata -R .rom $< $@
|
$(OBJCOPY) -S -O binary -R .romdata -R .rom $< $@
|
||||||
$(OBJCOPY) -S -O binary -j .rom $< $(@:.bin=.rom.bin)
|
$(OBJCOPY) -S -O binary -j .rom $< $(@:.bin=.rom.bin)
|
||||||
$(OBJCOPY) -S -O binary -j .romdata $< $(@:.bin=.romdata.bin)
|
$(OBJCOPY) -S -O binary -j .romdata $< $(@:.bin=.romdata.bin)
|
||||||
$(OBJCOPY) -S -O binary -R .romdata -R .rom $< $(@:.bin=.flash.bin)
|
$(OBJCOPY) -S -O binary -R .romdata -R .rom $< $(@:.bin=.flash.bin)
|
||||||
else
|
else
|
||||||
ifeq ($(CONFIG_GEN_ROM),1)
|
ifeq ($(CONFIG_GEN_ROM),1)
|
||||||
$(OBJCOPY) -S -O binary -R .bleromro -R .bleromrw -R .rtosromro -R .rtosromrw $< $@
|
$(OBJCOPY) -S -O binary -R .bleromro -R .bleromrw -R .rtosromro -R .rtosromrw $< $@
|
||||||
$(OBJCOPY) -S -O binary -j .bleromro $< $(@:.bin=.bleromro.bin)
|
$(OBJCOPY) -S -O binary -j .bleromro $< $(@:.bin=.bleromro.bin)
|
||||||
$(OBJCOPY) -S -O binary -j .bleromrw $< $(@:.bin=.bleromrw.bin)
|
$(OBJCOPY) -S -O binary -j .bleromrw $< $(@:.bin=.bleromrw.bin)
|
||||||
$(OBJCOPY) -S -O binary -j .rtosromro $< $(@:.bin=.rtosromro.bin)
|
$(OBJCOPY) -S -O binary -j .rtosromro $< $(@:.bin=.rtosromro.bin)
|
||||||
$(OBJCOPY) -S -O binary -j .rtosromrw $< $(@:.bin=.rtosromrw.bin)
|
$(OBJCOPY) -S -O binary -j .rtosromrw $< $(@:.bin=.rtosromrw.bin)
|
||||||
$(OBJCOPY) -S -O binary -R .bleromro -R .bleromrw -R .rtosromro -R .rtosromrw $< $(@:.bin=.flash.bin)
|
$(OBJCOPY) -S -O binary -R .bleromro -R .bleromrw -R .rtosromro -R .rtosromrw $< $(@:.bin=.flash.bin)
|
||||||
else
|
else
|
||||||
$(OBJCOPY) -S -O binary $< $@
|
$(OBJCOPY) -S -O binary $< $@
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
$(BUILD_DIR_BASE):
|
$(BUILD_DIR_BASE):
|
||||||
mkdir -p $(BUILD_DIR_BASE)
|
mkdir -p $(BUILD_DIR_BASE)
|
||||||
@ -532,7 +537,7 @@ list-components:
|
|||||||
$(info $(COMPONENTS))
|
$(info $(COMPONENTS))
|
||||||
$(info $(call dequote,$(SEPARATOR)))
|
$(info $(call dequote,$(SEPARATOR)))
|
||||||
$(info EXCLUDE_COMPONENTS (list of excluded names))
|
$(info EXCLUDE_COMPONENTS (list of excluded names))
|
||||||
$(info $(if $(EXCLUDE_COMPONENTS),$(EXCLUDE_COMPONENTS),(none provided)))
|
$(info $(if $(EXCLUDE_COMPONENTS),$(EXCLUDE_COMPONENTS),(none provided)))
|
||||||
$(info $(call dequote,$(SEPARATOR)))
|
$(info $(call dequote,$(SEPARATOR)))
|
||||||
$(info COMPONENT_PATHS (paths to all components):)
|
$(info COMPONENT_PATHS (paths to all components):)
|
||||||
$(foreach cp,$(COMPONENT_PATHS),$(info $(cp)))
|
$(foreach cp,$(COMPONENT_PATHS),$(info $(cp)))
|
||||||
|
Loading…
Reference in New Issue
Block a user