firmware: Handle new mag_cal.c location and dependencies
The mag_cal.c file was moved and the Android.mk files were updated, but
the makefile fragments used for the GNU Make system were not updated.
Additionally, the mag_cal.c file now depends on the kasa.c math
functions and diversity_checker.c, so these files must also be
included.
Bug: 112656064
Test: local build test only
Change-Id: Ida6515ae2c37479889cb916399b1cf5a7d6ee8c5
diff --git a/firmware/variant/nucleo/nucleo.mk b/firmware/variant/nucleo/nucleo.mk
index 2e09dae..eddd644 100644
--- a/firmware/variant/nucleo/nucleo.mk
+++ b/firmware/variant/nucleo/nucleo.mk
@@ -29,29 +29,31 @@
#board configuration shims
SRCS_os += $(VARIANT_PATH)/src/os/i2c.c
SRCS_os += $(VARIANT_PATH)/src/os/spi.c
-
#keys
+SRCS_os += \
+ os/algos/calibration/magnetometer/mag_cal/mag_cal.c \
+ os/algos/calibration/diversity_checker/diversity_checker.c \
+ os/algos/common/math/kasa.c \
+ os/algos/common/math/mat.c \
+ os/algos/common/math/quat.c \
+ os/algos/common/math/vec.c \
+ os/algos/fusion.c \
+ os/algos/time_sync.c
+
#drivers
+# BMI160 accel and gyro, BMM150 mag drivers
+FLAGS += -DUSE_BMM150 -DMAG_SLAVE_PRESENT
+SRCS_os += \
+ os/drivers/bosch_bmi160/bosch_bmi160.c \
+ os/drivers/bosch_bmi160/bosch_bmm150_slave.c \
+
# AMS ALS/prox
SRCS_os += os/drivers/ams_tmd2772/ams_tmd2772.c
# ROHM ALS/prox
SRCS_os += os/drivers/rohm_rpr0521/rohm_rpr0521.c
-# Fusion algorithm
-SRCS_os += os/algos/fusion.c \
- os/algos/common/math/mat.c \
- os/algos/common/math/quat.c \
- os/algos/common/math/vec.c
-
-# BMI160 accel and gyro, BMM150 mag drivers
-FLAGS += -DUSE_BMM150 -DMAG_SLAVE_PRESENT
-SRCS_os += os/drivers/bosch_bmi160/bosch_bmi160.c \
- os/drivers/bosch_bmi160/bosch_bmm150_slave.c \
- os/algos/calibration/magnetometer/mag_cal.c \
- os/algos/time_sync.c
-
# Orientation sensor driver
SRCS_os += os/drivers/orientation/orientation.c