1# 2# Copyright (C) 2016 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16 17#variant makefile for lunchbox 18 19ifneq ($(PLATFORM),stm32f4xx) 20 $(error "LUNCHBOX variant cannot be build on a platform that is not stm32f411") 21endif 22 23FLAGS += -DPLATFORM_HW_TYPE=0x4C75 #'Lu' -> lunchbox 24FLAGS += -DDEBUG_UART_PIN=16 #GPIOB0 is debug uart at 2MBps 25 26 27#board configuration shims 28SRCS_os += links/variant/src/i2c.c 29SRCS_os += links/variant/src/spi.c 30 31#keys 32 33#drivers 34# ROHM ALS/prox 35SRCS_os += src/drivers/rohm_rpr0521/rohm_rpr0521.c 36 37# Fusion algorithms 38SRCS_os += src/algos/fusion.c src/algos/mat.c src/algos/quat.c src/algos/vec.c 39 40# BMI160 accel and gyro, BMM150 mag drivers 41FLAGS += -DUSE_BMM150 -DMAG_SLAVE_PRESENT 42SRCS_os += src/drivers/bosch_bmi160/bosch_bmi160.c \ 43 src/drivers/bosch_bmi160/bosch_bmm150_slave.c \ 44 src/algos/mag_cal.c \ 45 src/algos/time_sync.c 46 47# Orientation sensor driver 48SRCS_os += src/drivers/orientation/orientation.c 49 50# Window orientation sensor driver 51SRCS_os += src/drivers/window_orientation/window_orientation.c 52 53# Bosch BMP280 Barometer/Temperature 54SRCS_os += src/drivers/bosch_bmp280/bosch_bmp280.c 55 56# Hall effect sensor driver 57SRCS_os += src/drivers/hall/hall.c 58 59# Camera Vsync driver 60SRCS_os += src/drivers/vsync/vsync.c 61 62# Tilt detection 63SRCS_os += src/drivers/tilt_detection/tilt_detection.c 64 65DEPS += $(wildcard links/variant/inc/*.h) 66 67#linker script 68LKR_os = misc/variant/common/stm32f411.os.lkr 69LKR_bl = misc/variant/common/stm32f411.bl.lkr 70OSFLAGS_os += -Wl,-T $(LKR_os) 71OSFLAGS_bl += -Wl,-T $(LKR_bl) 72DEPS += $(LKR_os) $(LKR_bl) 73