1cur_dir := $(dir $(lastword $(MAKEFILE_LIST))) 2 3obj-y := 4 5ifeq ($(DSP_ENABLE),1) 6obj-y += mcu_slave_code.o 7obj-y += mcu_slave_init.o 8obj-y += mcu_audio.o 9obj-y += mcu_cmd.o 10obj-y += a7_cmd.o 11obj-y += data_dump.o 12obj-y += aud_dump.o 13obj-y += heart_beat.o 14obj-y += audio_dump_single_channel.o 15ifeq ($(DSP_IMAGE_COMP),1) 16obj-y += decom/ 17endif 18ifeq ($(DSP_AUDIO_TASK),1) 19CFLAGS_mcu_slave_init.o += -D__A7_DSP_AUDIO_TASK__ 20endif 21 22export DSP_BIN_NAME ?= $(CHIP)_a7 23$(obj)/mcu_slave_code.o : out/$(T)/$(DSP_BIN_NAME).bin 24AFLAGS_mcu_slave_code.o += -DDSP_BIN_NAME=$(DSP_BIN_NAME).bin -Iout/$(T) 25out/$(T)/$(DSP_BIN_NAME).bin : $(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).bin 26 $(call CMDCPFILE,$(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).bin,$(srctree)/$@) 27# $(call CMDCPFILE,$(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).elf,$(srctree)/$(@:.bin=.elf)) 28# $(call CMDCPFILE,$(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).map,$(srctree)/$(@:.bin=.map)) 29# $(call CMDCPFILE,$(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).lst,$(srctree)/$(@:.bin=.lst)) 30$(srctree)/out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).bin : FORCE 31 $(call echo-help,) 32 $(call echo-help,INFO Please make sure DSP bin is up to date: out/$(DSP_BIN_NAME)/$(DSP_BIN_NAME).bin) 33# We cannot build $(DSP_BIN_NAME) automatically here, because the env inherited by sub-make cannot be cleaned: 34# E.g., KBUILD_SRC, TC, CHIP_HAS_CP, ... 35 $(call echo-help,) 36endif 37 38ifeq ($(CHIP_SUBSYS), dsp) 39obj-y += a7_main.o 40obj-y += a7_audio.o 41obj-y += data_dump.o 42obj-y += aud_dump.o 43obj-y += a7_cmd.o 44ifeq ($(RTOS),1) 45obj-y += my_a7_test.o 46obj-y += heart_beat.o 47endif 48# solo SRAM for alg 49#ifeq ($(A7_SRAM),1) 50obj-y += ../../../net/net_os/net_memory.o 51#endif 52 53ifneq ($(DEBUG_PORT),) 54CFLAGS_a7_main.o += -DDEBUG_PORT=$(DEBUG_PORT) 55endif 56 57ifeq ($(NO_CLOCK_INIT),1) 58CFLAGS_a7_main.o += -DNO_CLOCK_INIT 59endif 60ifeq ($(NO_PMU),1) 61CFLAGS_a7_main.o += -DNO_PMU 62endif 63ifeq ($(NO_LPU_26M),1) 64CFLAGS_a7_main.o += -DNO_LPU_26M 65endif 66ifeq ($(NO_PLL),1) 67CFLAGS_a7_main.o += -DNO_PLL 68endif 69ifeq ($(NO_SPI),1) 70CFLAGS_a7_main.o += -DNO_SPI 71endif 72ifeq ($(MBW_TEST),1) 73CFLAGS_a7_main.o += -DMBW_TEST 74endif 75ifeq ($(DSP_AUDIO_TASK),1) 76CFLAGS_a7_main.o += -D__A7_DSP_AUDIO_TASK__ 77endif 78endif 79 80ifeq ($(A7_DSP_HEARTBEAT_CHECK), 1) 81CFLAGS_heart_beat.o += -DA7_DSP_HEARTBEAT_CHECK 82endif 83 84ccflags-y += \ 85 -Iservices/audioflinger \ 86 -Iservices/transq_msg \ 87 -Iservices/sys_time/ \ 88 -Iutils/hwtimer_list \ 89 -Iutils/ \ 90 -Iapps/key \ 91 -Inet \ 92 -Inet/net_os \ 93 -Iapps/common 94