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 := nucleo 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# the following variables may be defined in variant script for any target: 34# NANO_VARIANT<target>_CFLAGS_<variant> 35# NANO_VARIANT<target>_C_INCLUDES_<variant> 36# NANO_VARIANT<target>_STATIC_LIBRARIRES_<variant> 37# NANO_VARIANT<target>_WHOLE_STATIC_LIBRARIRES_<variant> 38# 39# the following may be defined for _OS and _BL only, to control 40# what additional source files need to be included in the build; 41# the file paths in this list are relative to the target (_OS or _BL) LOCAL_PATH; 42# NANO_VARIANT<target>_SRC_FILES_<variant> 43 44NANO_VARIANT_OSCFG_STATIC_LIBRARIES_$(my_variant) := libnanohub_os_$(my_variant) 45 46NANO_VARIANT_OS_CFLAGS_$(my_variant) := \ 47 -DUSE_BMM150 \ 48 -DMAG_SLAVE_PRESENT \ 49 -DDEBUG_SWD \ 50 51#'Nu' ->nucleo 52NANO_VARIANT_CFLAGS_$(my_variant) := -DPLATFORM_HW_TYPE=0x4E75 53 54NANO_VARIANT_C_INCLUDES_$(my_variant) := \ 55 device/google/contexthub/firmware/variant/nucleo/inc \ 56 57# this is relative to NANOHUB_OS_PATH 58NANO_VARIANT_OSCFG_SRC_FILES_$(my_variant) := \ 59 os/algos/calibration/accelerometer/accel_cal.c \ 60 os/algos/calibration/gyroscope/gyro_cal.c \ 61 os/algos/calibration/gyroscope/gyro_stillness_detect.c \ 62 os/algos/calibration/magnetometer/mag_cal/mag_cal.c \ 63 os/algos/calibration/diversity_checker/diversity_checker.c \ 64 os/algos/calibration/over_temp/over_temp_cal.c \ 65 os/algos/common/math/kasa.c \ 66 os/algos/common/math/mat.c \ 67 os/algos/common/math/quat.c \ 68 os/algos/common/math/vec.c \ 69 os/algos/fusion.c \ 70 os/algos/time_sync.c \ 71 os/drivers/ams_tmd2772/ams_tmd2772.c \ 72 os/drivers/bosch_bmi160/bosch_bmi160.c \ 73 os/drivers/bosch_bmi160/bosch_bmm150_slave.c \ 74 os/drivers/bosch_bmp280/bosch_bmp280.c \ 75 os/drivers/hall/hall.c \ 76 os/drivers/orientation/orientation.c \ 77 os/drivers/rohm_rpr0521/rohm_rpr0521.c \ 78 os/drivers/tilt_detection/tilt_detection.c \ 79 os/drivers/vsync/vsync.c \ 80 os/drivers/window_orientation/window_orientation.c \ 81