|
| 1 | +################################################################################ |
| 2 | + # Copyright (C) Maxim Integrated Products, Inc., All Rights Reserved. |
| 3 | + # |
| 4 | + # Permission is hereby granted, free of charge, to any person obtaining a |
| 5 | + # copy of this software and associated documentation files (the "Software"), |
| 6 | + # to deal in the Software without restriction, including without limitation |
| 7 | + # the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 8 | + # and/or sell copies of the Software, and to permit persons to whom the |
| 9 | + # Software is furnished to do so, subject to the following conditions: |
| 10 | + # |
| 11 | + # The above copyright notice and this permission notice shall be included |
| 12 | + # in all copies or substantial portions of the Software. |
| 13 | + # |
| 14 | + # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS |
| 15 | + # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 16 | + # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 17 | + # IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES |
| 18 | + # OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, |
| 19 | + # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 20 | + # OTHER DEALINGS IN THE SOFTWARE. |
| 21 | + # |
| 22 | + # Except as contained in this notice, the name of Maxim Integrated |
| 23 | + # Products, Inc. shall not be used except as stated in the Maxim Integrated |
| 24 | + # Products, Inc. Branding Policy. |
| 25 | + # |
| 26 | + # The mere transfer of this software does not imply any licenses |
| 27 | + # of trade secrets, proprietary technology, copyrights, patents, |
| 28 | + # trademarks, maskwork rights, or any other form of intellectual |
| 29 | + # property whatsoever. Maxim Integrated Products, Inc. retains all |
| 30 | + # ownership rights. |
| 31 | + # |
| 32 | + # |
| 33 | + ############################################################################### |
| 34 | + |
| 35 | +# This is the name of the build output file |
| 36 | +ifeq "$(PROJECT)" "" |
| 37 | +PROJECT=max78000 |
| 38 | +endif |
| 39 | + |
| 40 | +# Specify the target processor |
| 41 | +ifeq "$(TARGET)" "" |
| 42 | +TARGET=MAX78000 |
| 43 | +endif |
| 44 | + |
| 45 | +# Create Target name variables |
| 46 | +TARGET_UC:=$(shell echo $(TARGET) | tr a-z A-Z) |
| 47 | +TARGET_LC:=$(shell echo $(TARGET) | tr A-Z a-z) |
| 48 | + |
| 49 | +# Select 'GCC' or 'IAR' compiler |
| 50 | +COMPILER=GCC |
| 51 | + |
| 52 | +# Specify the board used |
| 53 | +ifeq "$(BOARD)" "" |
| 54 | +BOARD=EvKit_V1 |
| 55 | +endif |
| 56 | + |
| 57 | +# This is the path to the CMSIS root directory |
| 58 | +ifeq "$(MAXIM_PATH)" "" |
| 59 | +LIBS_DIR=../../../../Libraries |
| 60 | +else |
| 61 | +LIBS_DIR=$(subst \,/,$(subst :,,$(MAXIM_PATH))/Libraries) |
| 62 | +endif |
| 63 | +CMSIS_ROOT=$(LIBS_DIR)/CMSIS |
| 64 | + |
| 65 | +#Use this for other library make files so they are all based off the same as root as the project |
| 66 | +export CMSIS_ROOT |
| 67 | + |
| 68 | +# LINKERFILE=$(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/GCC/max78000_arm.ld |
| 69 | + |
| 70 | +# Source files for this test (add path to VPATH below) |
| 71 | +SRCS = main.c |
| 72 | +SRCS += arm_convolve_HWC_q7_basic.c arm_pool_q7_HWC.c arm_relu_q7.c arm_convolve_HWC_q7_fast.c arm_convolve_HWC_q7_basic_nonsquare.c arm_pool_q7_HWC_nonsquare.c arm_pool_nonsquare_q7_HWC_nonsquare.c |
| 73 | +SRCS += arm_relu32_q7.c arm_fully_connected_q7.c arm_fully_connected_q7_q31.c arm_q7_to_q15_reordered_no_shift.c arm_q7_to_q15_no_shift.c arm_nn_mat_mult_kernel_q7_q15.c arm_nn_mat_mult_kernel_q7_q15_reordered.c |
| 74 | + |
| 75 | +# Where to find source files for this test |
| 76 | +VPATH = . |
| 77 | +VPATH += $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source |
| 78 | +# Where to find header files for this test |
| 79 | +IPATH = . |
| 80 | + |
| 81 | +# Enable assertion checking for development |
| 82 | +PROJ_CFLAGS+=-DMXC_ASSERT_ENABLE |
| 83 | +PROJ_CFLAGS+=-DARM_MATH_CM4 |
| 84 | +PROJ_CFLAGS+=-I. -ICMSIS/Core/Include -ICMSIS/NN/Include -ICMSIS/DSP/Include -DCMSIS_VECTAB_VIRTUAL |
| 85 | + |
| 86 | +# Enable all warnings |
| 87 | +PROJ_CFLAGS+=-Wall -Wcast-align |
| 88 | + |
| 89 | +# Specify the target revision to override default |
| 90 | +# "A2" in ASCII |
| 91 | +# TARGET_REV=0x4132 |
| 92 | + |
| 93 | +# Use this variables to specify and alternate tool path |
| 94 | +#TOOL_DIR=/opt/gcc-arm-none-eabi-4_8-2013q4/bin |
| 95 | + |
| 96 | +# Use these variables to add project specific tool options |
| 97 | +#PROJ_CFLAGS+=-D__FPU_PRESENT -DKINTEX_EMU |
| 98 | +#PROJ_LDFLAGS+=--specs=nano.specs |
| 99 | + |
| 100 | +# Point this variable to a startup file to override the default file |
| 101 | +#STARTUPFILE=start.S |
| 102 | + |
| 103 | +# Override the default optimization level using this variable |
| 104 | +MXC_OPTIMIZE_CFLAGS=-O2 |
| 105 | + |
| 106 | +################################################################################ |
| 107 | +# Include external library makefiles here |
| 108 | + |
| 109 | +# Include the BSP |
| 110 | +BOARD_DIR=$(LIBS_DIR)/Boards/$(TARGET_UC)/$(BOARD) |
| 111 | +include $(BOARD_DIR)/board.mk |
| 112 | + |
| 113 | +# Include the peripheral driver |
| 114 | +PERIPH_DRIVER_DIR=$(LIBS_DIR)/PeriphDrivers |
| 115 | +include $(PERIPH_DRIVER_DIR)/periphdriver.mk |
| 116 | +export PERIPH_DRIVER_DIR |
| 117 | + |
| 118 | +################################################################################ |
| 119 | +# Include the rules for building for this target. All other makefiles should be |
| 120 | +# included before this one. |
| 121 | +include $(CMSIS_ROOT)/Device/Maxim/$(TARGET_UC)/Source/$(COMPILER)/$(TARGET_LC).mk |
| 122 | + |
| 123 | +all: |
| 124 | +# arm-none-eabi-objcopy $(BUILD_DIR)/$(PROJECT).elf -R .sig -O binary $(BUILD_DIR)/$(PROJECT).bin |
| 125 | +# $(CA_SIGN_BUILD) $(BUILD_DIR)/$(PROJECT).bin $(TEST_KEY) |
| 126 | +# arm-none-eabi-objcopy $(BUILD_DIR)/$(PROJECT).elf --update-section .sig=$(BUILD_DIR)/$(PROJECT).bin.sig |
| 127 | + |
| 128 | +libclean: |
| 129 | + $(MAKE) -f ${PERIPH_DRIVER_DIR}/periphdriver.mk clean.periph |
| 130 | + |
| 131 | +# The rule to clean out all the build products. |
| 132 | +distclean: clean libclean |
| 133 | + |
| 134 | +sla: all |
| 135 | + |
| 136 | +# arm-none-eabi-objcopy $(BUILD_DIR)/$(PROJECT).elf -O binary $(BUILD_DIR)/$(PROJECT).sbin |
| 137 | +# $(BUILD_SESSION) $(BUILD_DIR)/$(PROJECT).sbin scp_packets $(TEST_KEY) |
| 138 | + |
0 commit comments