blob: eddd6449b274fca48480619cbc63e9c6bfaebe5f [file] [log] [blame]
Alexey Polyudovf8053062016-07-12 18:45:05 -07001#
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 nucleo
18
19
20ifneq ($(PLATFORM),stm32)
21 $(error "NUCLEO variant cannot be build on a platform that is not stm32")
22endif
23
24FLAGS += -DPLATFORM_HW_TYPE=0x4E75 #'Nu' ->nucleo
25FLAGS += -DDEBUG_SWD
26
27FLAGS += -I$(VARIANT_PATH)/inc
28
29#board configuration shims
30SRCS_os += $(VARIANT_PATH)/src/os/i2c.c
31SRCS_os += $(VARIANT_PATH)/src/os/spi.c
Alexey Polyudovf8053062016-07-12 18:45:05 -070032#keys
33
Alistair Strachan4d6104b2018-08-15 14:00:58 -070034SRCS_os += \
35 os/algos/calibration/magnetometer/mag_cal/mag_cal.c \
36 os/algos/calibration/diversity_checker/diversity_checker.c \
37 os/algos/common/math/kasa.c \
38 os/algos/common/math/mat.c \
39 os/algos/common/math/quat.c \
40 os/algos/common/math/vec.c \
41 os/algos/fusion.c \
42 os/algos/time_sync.c
43
Alexey Polyudovf8053062016-07-12 18:45:05 -070044#drivers
Alistair Strachan4d6104b2018-08-15 14:00:58 -070045# BMI160 accel and gyro, BMM150 mag drivers
46FLAGS += -DUSE_BMM150 -DMAG_SLAVE_PRESENT
47SRCS_os += \
48 os/drivers/bosch_bmi160/bosch_bmi160.c \
49 os/drivers/bosch_bmi160/bosch_bmm150_slave.c \
50
Alexey Polyudovf8053062016-07-12 18:45:05 -070051# AMS ALS/prox
52SRCS_os += os/drivers/ams_tmd2772/ams_tmd2772.c
53
54# ROHM ALS/prox
55SRCS_os += os/drivers/rohm_rpr0521/rohm_rpr0521.c
56
Alexey Polyudovf8053062016-07-12 18:45:05 -070057# Orientation sensor driver
58SRCS_os += os/drivers/orientation/orientation.c
59
60# Window orientation sensor driver
61SRCS_os += os/drivers/window_orientation/window_orientation.c
62
63# Bosch BMP280 Barometer/Temperature
64SRCS_os += os/drivers/bosch_bmp280/bosch_bmp280.c
65
66# Hall effect sensor driver
67SRCS_os += os/drivers/hall/hall.c
68
69# Camera Vsync driver
70SRCS_os += os/drivers/vsync/vsync.c
71
72# Tilt detection
73SRCS_os += os/drivers/tilt_detection/tilt_detection.c
74
75$(info included NUCLEO variant)