• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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# only locally defined variables can be used at this time
18
19my_variant := lunchbox
20
21AUX_OS_$(my_variant)             := nanohub
22AUX_ARCH_$(my_variant)           := stm32
23AUX_SUBARCH_$(my_variant)        := stm32f411
24AUX_CPU_$(my_variant)            := cortexm4
25
26# variant supports building OS bootloader, main OS image and application as targets
27# target should one of the following:
28#   "" (empty) -- applies to all targets
29#  _BL -- applies to OS bootloader target build only
30#  _OS -- applies to OS image target build only
31# _APP -- applies to application target build only
32#
33# special targets:
34# _OSCFG - apply only at build stage of OS binary image
35# _BLCFG - apply only at build stage of BL binary image
36#
37# the following variables may be defined in variant script for any target:
38# NANO_VARIANT<target>_CFLAGS_<variant>
39# NANO_VARIANT<target>_C_INCLUDES_<variant>
40# NANO_VARIANT<target>_STATIC_LIBRARIRES_<variant>
41# NANO_VARIANT<target>_WHOLE_STATIC_LIBRARIRES_<variant>
42#
43# the following may be defined for _OS and _BL only, to control
44# what additional source files need to be included in the build;
45# the file paths in this list are relative to the target (_OS or _BL) LOCAL_PATH;
46# NANO_VARIANT<target>_SRC_FILES_<variant>
47
48NANO_VARIANT_OSCFG_STATIC_LIBRARIES_$(my_variant) := libnanohub_os_$(my_variant)
49
50NANO_VARIANT_OS_CFLAGS_$(my_variant) :=
51
52NANO_VARIANT_OS_CFLAGS_$(my_variant) += \
53    -DUSE_BMM150                        \
54    -DMAG_SLAVE_PRESENT                 \
55
56#GPIOB0 is debug uart at 2MBps
57NANO_VARIANT_OS_CFLAGS_$(my_variant) += -DDEBUG_UART_PIN=16
58
59#'Lu' -> lunchbox
60NANO_VARIANT_CFLAGS_$(my_variant) += -DPLATFORM_HW_TYPE=0x4C75
61
62NANO_VARIANT_C_INCLUDES_$(my_variant) :=                   \
63    device/google/contexthub/firmware/variant/lunchbox/inc \
64
65# this is relative to NANOHUB_OS_PATH
66NANO_VARIANT_OSCFG_SRC_FILES_$(my_variant) :=                  \
67    os/algos/calibration/accelerometer/accel_cal.c             \
68    os/algos/calibration/gyroscope/gyro_cal.c                  \
69    os/algos/calibration/gyroscope/gyro_stillness_detect.c     \
70    os/algos/calibration/magnetometer/mag_cal/mag_cal.c        \
71    os/algos/calibration/diversity_checker/diversity_checker.c \
72    os/algos/calibration/over_temp/over_temp_cal.c             \
73    os/algos/common/math/kasa.c                                \
74    os/algos/common/math/mat.c                                 \
75    os/algos/common/math/quat.c                                \
76    os/algos/common/math/vec.c                                 \
77    os/algos/fusion.c                                          \
78    os/algos/time_sync.c                                       \
79    os/drivers/ams_tmd2772/ams_tmd2772.c                       \
80    os/drivers/bosch_bmi160/bosch_bmi160.c                     \
81    os/drivers/bosch_bmi160/bosch_bmm150_slave.c               \
82    os/drivers/bosch_bmp280/bosch_bmp280.c                     \
83    os/drivers/hall/hall.c                                     \
84    os/drivers/orientation/orientation.c                       \
85    os/drivers/rohm_rpr0521/rohm_rpr0521.c                     \
86    os/drivers/tilt_detection/tilt_detection.c                 \
87    os/drivers/vsync/vsync.c                                   \
88    os/drivers/window_orientation/window_orientation.c         \
89