1# 2# Copyright (C) 2017 STMicroelectronics 3# Copyright (C) 2017 The Android Open Source Project 4# 5# Licensed under the Apache License, Version 2.0 (the "License"); 6# you may not use this file except in compliance with the License. 7# You may obtain a copy of the License at 8# 9# http://www.apache.org/licenses/LICENSE-2.0 10# 11# Unless required by applicable law or agreed to in writing, software 12# distributed under the License is distributed on an "AS IS" BASIS, 13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14# See the License for the specific language governing permissions and 15# limitations under the License. 16# 17 18# only locally defined variables can be used at this time 19 20my_variant := argonkey 21 22AUX_OS_$(my_variant) := nanohub 23AUX_ARCH_$(my_variant) := stm32 24AUX_SUBARCH_$(my_variant) := stm32f412 25AUX_CPU_$(my_variant) := cortexm4 26 27# variant supports building OS bootloader, main OS image and application as targets 28# target should one of the following: 29# "" (empty) -- applies to all targets 30# _BL -- applies to OS bootloader target build only 31# _OS -- applies to OS image target build only 32# _APP -- applies to application target build only 33# 34# the following variables may be defined in variant script for any target: 35# NANO_VARIANT<target>_CFLAGS_<variant> 36# NANO_VARIANT<target>_C_INCLUDES_<variant> 37# NANO_VARIANT<target>_STATIC_LIBRARIRES_<variant> 38# NANO_VARIANT<target>_WHOLE_STATIC_LIBRARIRES_<variant> 39# 40# the following may be defined for _OS and _BL only, to control 41# what additional source files need to be included in the build; 42# the file paths in this list are relative to the target (_OS or _BL) LOCAL_PATH; 43# NANO_VARIANT<target>_SRC_FILES_<variant> 44 45NANO_VARIANT_OSCFG_STATIC_LIBRARIES_$(my_variant) := libnanohub_os_$(my_variant) 46 47NANO_VARIANT_OS_CFLAGS_$(my_variant) := \ 48 -DDEBUG_SWD \ 49 50#'Ar' -> argonkey 51NANO_VARIANT_CFLAGS_$(my_variant) := -DPLATFORM_HW_TYPE=0x4172 52 53NANO_VARIANT_C_INCLUDES_$(my_variant) := \ 54 device/google/contexthub/firmware/variant/$(my_variant)/inc \ 55 56# this is relative to NANOHUB_OS_PATH 57NANO_VARIANT_OSCFG_SRC_FILES_$(my_variant) := \ 58 os/algos/calibration/accelerometer/accel_cal.c \ 59 os/algos/calibration/gyroscope/gyro_cal.c \ 60 os/algos/calibration/gyroscope/gyro_stillness_detect.c \ 61 os/algos/calibration/magnetometer/mag_cal/mag_cal.c \ 62 os/algos/calibration/diversity_checker/diversity_checker.c \ 63 os/algos/calibration/over_temp/over_temp_cal.c \ 64 os/algos/common/math/kasa.c \ 65 os/algos/common/math/mat.c \ 66 os/algos/common/math/quat.c \ 67 os/algos/common/math/vec.c \ 68 os/algos/fusion.c \ 69 os/algos/time_sync.c \ 70 os/drivers/hall/hall.c \ 71 os/drivers/intersil_isl29034/isl29034.c \ 72 os/drivers/leds/leds_gpio.c \ 73 os/drivers/leds/leds_lp3943.c \ 74 os/drivers/orientation/orientation.c \ 75 os/drivers/st_hts221/hts221.c \ 76 os/drivers/st_lps22hb/lps22hb.c \ 77 os/drivers/st_lsm6dsm/st_lsm6dsm.c \ 78 os/drivers/tilt_detection/tilt_detection.c \ 79 os/drivers/window_orientation/window_orientation.c \ 80