imu_cal.mk revision 093d0ac13cf5df0edfb72f752eefd207ae8b2811
1################################################################################
2#
3# IMU Calibration NanoApp Makefile
4#
5################################################################################
6
7# Aliases ######################################################################
8
9ALGOS_DIR = $(ANDROID_BUILD_TOP)/device/google/contexthub/firmware/os/algos
10
11# Common Compiler Flags ########################################################
12
13# Include paths.
14COMMON_CFLAGS += -I.
15COMMON_CFLAGS += -Iash/include/ash_api
16COMMON_CFLAGS += -Iapps/imu_cal/include
17COMMON_CFLAGS += -I$(ALGOS_DIR)
18
19# Calibration algorithm enable flags.
20COMMON_CFLAGS += -DMAG_CAL_ENABLED
21COMMON_CFLAGS += -DGYRO_CAL_ENABLED
22COMMON_CFLAGS += -DACCEL_CAL_ENABLED
23COMMON_CFLAGS += -DOVERTEMPCAL_GYRO_ENABLED
24COMMON_CFLAGS += -DDIVERSITY_CHECK_ENABLED
25#COMMON_CFLAGS += -DSPHERE_FIT_ENABLED
26#COMMON_CFLAGS += -DGYRO_OTC_FACTORY_CAL_ENABLED
27
28# Debug testing flags.
29#COMMON_CFLAGS += -DMAG_CAL_DEBUG_ENABLE
30#COMMON_CFLAGS += -DDIVERSE_DEBUG_ENABLE
31#COMMON_CFLAGS += -DGYRO_CAL_DBG_ENABLED
32#COMMON_CFLAGS += -DOVERTEMPCAL_DBG_ENABLED
33#COMMON_CFLAGS += -DACCEL_CAL_DBG_ENABLED
34COMMON_CFLAGS += -DNANO_SENSOR_CAL_DBG_ENABLED
35
36# Debug options.
37#COMMON_CFLAGS += -DGYRO_CAL_DBG_TUNE_ENABLED
38#COMMON_CFLAGS += -DOVERTEMPCAL_DBG_LOG_TEMP
39#COMMON_CFLAGS += -DIMU_TEMP_DBG_ENABLED
40
41# Common Source Files ##########################################################
42
43COMMON_SRCS += apps/imu_cal/imu_cal.cc
44COMMON_SRCS += apps/imu_cal/nano_calibration.cc
45COMMON_SRCS += $(ALGOS_DIR)/calibration/accelerometer/accel_cal.c
46COMMON_SRCS += $(ALGOS_DIR)/calibration/common/calibration_data.c
47COMMON_SRCS += $(ALGOS_DIR)/calibration/common/diversity_checker.c
48COMMON_SRCS += $(ALGOS_DIR)/calibration/common/sphere_fit_calibration.c
49COMMON_SRCS += $(ALGOS_DIR)/calibration/gyroscope/gyro_cal.c
50COMMON_SRCS += $(ALGOS_DIR)/calibration/gyroscope/gyro_stillness_detect.c
51COMMON_SRCS += $(ALGOS_DIR)/calibration/magnetometer/mag_cal.c
52COMMON_SRCS += $(ALGOS_DIR)/calibration/magnetometer/mag_sphere_fit.c
53COMMON_SRCS += $(ALGOS_DIR)/calibration/over_temp/over_temp_cal.c
54COMMON_SRCS += $(ALGOS_DIR)/common/math/levenberg_marquardt.c
55COMMON_SRCS += $(ALGOS_DIR)/common/math/mat.c
56COMMON_SRCS += $(ALGOS_DIR)/common/math/quat.c
57COMMON_SRCS += $(ALGOS_DIR)/common/math/vec.c
58