Skip to content

Commit

Permalink
[conf] cleanup imu makefiles
Browse files Browse the repository at this point in the history
  • Loading branch information
flixr committed Apr 3, 2015
1 parent 99ad231 commit 4f5806a
Show file tree
Hide file tree
Showing 31 changed files with 162 additions and 158 deletions.
15 changes: 10 additions & 5 deletions conf/firmwares/subsystems/shared/imu_analog.makefile
Expand Up @@ -89,9 +89,14 @@ $(error Not implemented for the stm32 yet... should be trivial, just do it...)

endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAG += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(imu_CFLAGS)
$(TARGET).srcs += $(imu_srcs)
endif

#
# NPS simulator
#
include $(CFG_SHARED)/imu_nps.makefile
9 changes: 5 additions & 4 deletions conf/firmwares/subsystems/shared/imu_apogee.makefile
Expand Up @@ -16,11 +16,12 @@ IMU_APOGEE_CFLAGS += -DIMU_APOGEE_I2C_DEV=$(IMU_APOGEE_I2C_DEV)
IMU_APOGEE_SRCS += peripherals/mpu60x0.c
IMU_APOGEE_SRCS += peripherals/mpu60x0_i2c.c

ap.CFLAGS += $(IMU_APOGEE_CFLAGS)
ap.srcs += $(IMU_APOGEE_SRCS)

test_imu.CFLAGS += $(IMU_APOGEE_CFLAGS)
test_imu.srcs += $(IMU_APOGEE_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_APOGEE_CFLAGS)
$(TARGET).srcs += $(IMU_APOGEE_SRCS)
endif

#
# Simulator
Expand Down
10 changes: 7 additions & 3 deletions conf/firmwares/subsystems/shared/imu_ardrone2.makefile
Expand Up @@ -11,9 +11,13 @@ imu_srcs += $(SRC_SUBSYSTEMS)/imu/imu_ardrone2_raw.c
imu_srcs += $(SRC_BOARD)/navdata.c
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(imu_CFLAGS)
$(TARGET).srcs += $(imu_srcs)
endif


# Set the AHRS propegation frequencies
AHRS_PROPAGATE_FREQUENCY ?= 200
Expand Down
9 changes: 5 additions & 4 deletions conf/firmwares/subsystems/shared/imu_aspirin2_i2c.makefile
Expand Up @@ -27,11 +27,12 @@ IMU_ASPIRIN2_I2C_DEV_LOWER=$(shell echo $(IMU_ASPIRIN2_I2C_DEV) | tr A-Z a-z)
IMU_ASPIRIN2_CFLAGS += -DIMU_ASPIRIN2_I2C_DEV=$(IMU_ASPIRIN2_I2C_DEV_LOWER)
IMU_ASPIRIN2_CFLAGS += -DUSE_$(IMU_ASPIRIN2_I2C_DEV_UPPER)

ap.CFLAGS += $(IMU_ASPIRIN2_CFLAGS)
ap.srcs += $(IMU_ASPIRIN2_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN2_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN2_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN2_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN2_SRCS)
endif

#
# NPS simulator
Expand Down
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_aspirin_i2c_v1.0.makefile
Expand Up @@ -24,9 +24,8 @@ include $(CFG_SHARED)/imu_aspirin_i2c_common.makefile

IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_0

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_SRCS)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_aspirin_i2c_v1.5.makefile
Expand Up @@ -24,9 +24,8 @@ include $(CFG_SHARED)/imu_aspirin_i2c_common.makefile

IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_5

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_SRCS)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_aspirin_v1.0.makefile
Expand Up @@ -24,9 +24,8 @@ include $(CFG_SHARED)/imu_aspirin_common.makefile

IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_0

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_SRCS)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_aspirin_v1.5.makefile
Expand Up @@ -24,9 +24,8 @@ include $(CFG_SHARED)/imu_aspirin_common.makefile

IMU_ASPIRIN_CFLAGS += -DIMU_ASPIRIN_VERSION_1_5

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_SRCS)
endif
10 changes: 5 additions & 5 deletions conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile
Expand Up @@ -38,8 +38,8 @@

include $(CFG_SHARED)/imu_aspirin_v2_common.makefile

ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_2_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_2_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_2_SRCS)
endif
13 changes: 5 additions & 8 deletions conf/firmwares/subsystems/shared/imu_aspirin_v2.2.makefile
Expand Up @@ -53,11 +53,8 @@ else ifeq ($(ARCH), stm32)
IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE3
endif

ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_2_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_2_SRCS)

test_ahrs.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_ahrs.srcs += $(IMU_ASPIRIN_2_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_2_SRCS)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_b2_v1.0.makefile
Expand Up @@ -57,9 +57,8 @@ endif

endif #NO_MAG

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(imu_CFLAGS)
$(TARGET).srcs += $(imu_srcs)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_b2_v1.1.makefile
Expand Up @@ -57,9 +57,8 @@ imu_CFLAGS += -DMS2100_SLAVE_IDX=4
imu_CFLAGS += -DMS2100_SPI_DEV=spi2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(imu_CFLAGS)
$(TARGET).srcs += $(imu_srcs)
endif
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_b2_v1.2.makefile
Expand Up @@ -50,9 +50,8 @@ else ifeq ($(ARCH), stm32)
imu_CFLAGS += -DIMU_B2_I2C_DEV=i2c2 -DUSE_I2C2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(imu_CFLAGS)
$(TARGET).srcs += $(imu_srcs)
endif
10 changes: 5 additions & 5 deletions conf/firmwares/subsystems/shared/imu_bebop.makefile
Expand Up @@ -37,11 +37,11 @@ BEBOP_MPU_I2C_DEV_LOWER=$(shell echo $(BEBOP_MPU_I2C_DEV) | tr A-Z a-z)
IMU_CFLAGS += -DBEBOP_MAG_I2C_DEV=$(BEBOP_MAG_I2C_DEV_LOWER) -DBEBOP_MPU_I2C_DEV=$(BEBOP_MPU_I2C_DEV_LOWER)
IMU_CFLAGS += -DUSE_$(BEBOP_MAG_I2C_DEV_UPPER)=1 -DUSE_$(BEBOP_MPU_I2C_DEV_UPPER)=1

ap.CFLAGS += $(IMU_CFLAGS)
ap.srcs += $(IMU_SRCS)

test_imu.CFLAGS += $(IMU_CFLAGS)
test_imu.srcs += $(IMU_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_CFLAGS)
$(TARGET).srcs += $(IMU_SRCS)
endif

#
# NPS simulator
Expand Down
13 changes: 5 additions & 8 deletions conf/firmwares/subsystems/shared/imu_drotek_10dof_v2.makefile
Expand Up @@ -73,14 +73,11 @@ IMU_DROTEK_2_CFLAGS += -DDROTEK_2_I2C_DEV=$(DROTEK_2_I2C_DEV_LOWER)
IMU_DROTEK_2_CFLAGS += -DUSE_$(DROTEK_2_I2C_DEV_UPPER)


# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets

ap.CFLAGS += $(IMU_DROTEK_2_CFLAGS)
ap.srcs += $(IMU_DROTEK_2_SRCS)

test_imu.CFLAGS += $(IMU_DROTEK_2_CFLAGS)
test_imu.srcs += $(IMU_DROTEK_2_SRCS)

# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_DROTEK_2_CFLAGS)
$(TARGET).srcs += $(IMU_DROTEK_2_SRCS)
endif

#
# NPS simulator
Expand Down
11 changes: 5 additions & 6 deletions conf/firmwares/subsystems/shared/imu_gl1.makefile
Expand Up @@ -41,12 +41,11 @@ GL1_I2C_DEV_LOWER=$(shell echo $(GL1_I2C_DEV) | tr A-Z a-z)
IMU_GL1_CFLAGS += -DGL1_I2C_DEV=$(GL1_I2C_DEV_LOWER)
IMU_GL1_CFLAGS += -DUSE_$(GL1_I2C_DEV_UPPER)

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
ap.CFLAGS += $(IMU_GL1_CFLAGS)
ap.srcs += $(IMU_GL1_SRCS)

test_imu.CFLAGS += $(IMU_GL1_CFLAGS)
test_imu.srcs += $(IMU_GL1_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_GL1_CFLAGS)
$(TARGET).srcs += $(IMU_GL1_SRCS)
endif

#
# NPS simulator
Expand Down
7 changes: 5 additions & 2 deletions conf/firmwares/subsystems/shared/imu_hbmini.makefile
Expand Up @@ -24,8 +24,11 @@ IMU_HBMINI_CFLAGS += -DMAX1168_EOC_VIC_SLOT=11
IMU_HBMINI_SRCS += peripherals/max1168.c
IMU_HBMINI_SRCS += $(SRC_ARCH)/peripherals/max1168_arch.c

ap.CFLAGS += $(IMU_HBMINI_CFLAGS)
ap.srcs += $(IMU_HBMINI_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_HBMINI_CFLAGS)
$(TARGET).srcs += $(IMU_HBMINI_SRCS)
endif

#
# Simulator
Expand Down
10 changes: 5 additions & 5 deletions conf/firmwares/subsystems/shared/imu_krooz_sd.makefile
Expand Up @@ -18,11 +18,11 @@ IMU_KROOZ_SRCS += peripherals/mpu60x0.c
IMU_KROOZ_SRCS += peripherals/mpu60x0_i2c.c
IMU_KROOZ_SRCS += peripherals/hmc58xx.c

ap.CFLAGS += $(IMU_KROOZ_CFLAGS)
ap.srcs += $(IMU_KROOZ_SRCS)

test_imu.CFLAGS += $(IMU_KROOZ_CFLAGS)
test_imu.srcs += $(IMU_KROOZ_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_KROOZ_CFLAGS)
$(TARGET).srcs += $(IMU_KROOZ_SRCS)
endif

#
# NPS simulator
Expand Down
10 changes: 5 additions & 5 deletions conf/firmwares/subsystems/shared/imu_krooz_sd_memsic.makefile
Expand Up @@ -23,11 +23,11 @@ IMU_KROOZ_SRCS += peripherals/mpu60x0.c
IMU_KROOZ_SRCS += peripherals/mpu60x0_i2c.c
IMU_KROOZ_SRCS += peripherals/hmc58xx.c

ap.CFLAGS += $(IMU_KROOZ_CFLAGS)
ap.srcs += $(IMU_KROOZ_SRCS)

test_imu.CFLAGS += $(IMU_KROOZ_CFLAGS)
test_imu.srcs += $(IMU_KROOZ_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_KROOZ_CFLAGS)
$(TARGET).srcs += $(IMU_KROOZ_SRCS)
endif

#
# NPS simulator
Expand Down
12 changes: 5 additions & 7 deletions conf/firmwares/subsystems/shared/imu_lisa_m_or_mx_v2.1.makefile
Expand Up @@ -63,14 +63,12 @@ IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE2
# SLAVE3 is on PC13, which is the baro CS
IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE3

ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_2_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_2_SRCS)

test_ahrs.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_ahrs.srcs += $(IMU_ASPIRIN_2_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_2_SRCS)
endif

#
# NPS simulator
Expand Down
10 changes: 5 additions & 5 deletions conf/firmwares/subsystems/shared/imu_lisa_s_v1.0.makefile
Expand Up @@ -61,11 +61,11 @@ IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE0
# SLAVE1 is on PC4, which is the baro CS
IMU_ASPIRIN_2_CFLAGS += -DUSE_SPI_SLAVE1

ap.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_2_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_2_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_ASPIRIN_2_CFLAGS)
$(TARGET).srcs += $(IMU_ASPIRIN_2_SRCS)
endif

#
# NPS simulator
Expand Down
12 changes: 5 additions & 7 deletions conf/firmwares/subsystems/shared/imu_mpu6000.makefile
Expand Up @@ -36,14 +36,12 @@ IMU_CFLAGS += -DUSE_$(IMU_MPU_SPI_DEV_UPPER)
IMU_CFLAGS += -DIMU_MPU_SPI_SLAVE_IDX=$(IMU_MPU_SPI_SLAVE_IDX)
IMU_CFLAGS += -DUSE_$(IMU_MPU_SPI_SLAVE_IDX)

ap.CFLAGS += $(IMU_CFLAGS)
ap.srcs += $(IMU_SRCS)

test_imu.CFLAGS += $(IMU_CFLAGS)
test_imu.srcs += $(IMU_SRCS)

test_ahrs.CFLAGS += $(IMU_CFLAGS)
test_ahrs.srcs += $(IMU_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_CFLAGS)
$(TARGET).srcs += $(IMU_SRCS)
endif

#
# NPS simulator
Expand Down
9 changes: 5 additions & 4 deletions conf/firmwares/subsystems/shared/imu_mpu6000_hmc5883.makefile
Expand Up @@ -88,11 +88,12 @@ IMU_CFLAGS += -DUSE_$(IMU_MPU_SPI_DEV_UPPER)
IMU_CFLAGS += -DIMU_MPU_SPI_SLAVE_IDX=$(IMU_MPU_SPI_SLAVE_IDX)
IMU_CFLAGS += -DUSE_$(IMU_MPU_SPI_SLAVE_IDX)

ap.CFLAGS += $(IMU_CFLAGS)
ap.srcs += $(IMU_SRCS)

test_imu.CFLAGS += $(IMU_CFLAGS)
test_imu.srcs += $(IMU_SRCS)
# add it for all targets except sim, fbw and nps
ifeq (,$(findstring $(TARGET),sim fbw nps))
$(TARGET).CFLAGS += $(IMU_CFLAGS)
$(TARGET).srcs += $(IMU_SRCS)
endif

#
# NPS simulator
Expand Down

0 comments on commit 4f5806a

Please sign in to comment.