Skip to content

Commit

Permalink
add test_imu target
Browse files Browse the repository at this point in the history
spi_master.makefile: add spi to all targets
  • Loading branch information
flixr committed May 23, 2014
1 parent 3fb9dd7 commit 721ee73
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 19 deletions.
3 changes: 3 additions & 0 deletions conf/airframes/fraser_lisa_m_rotorcraft.xml
Expand Up @@ -53,6 +53,9 @@
</target>
<target name="test_baro_board" board="lisa_m_1.0"/>
<target name="test_adc" board="lisa_m_1.0"/>
<target name="test_imu" board="lisa_m_1.0">
<subsystem name="imu" type="aspirin_v1.5"/>
</target>
</firmware>

<modules main_freq="512">
Expand Down
Expand Up @@ -56,7 +56,6 @@ imu_CFLAGS += -DUSE_SPI2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
stm_passthrough.CFLAGS += $(imu_CFLAGS)
stm_passthrough.srcs += $(imu_srcs)

Expand Down
Expand Up @@ -58,7 +58,6 @@ imu_CFLAGS += -DUSE_I2C2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
stm_passthrough.CFLAGS += $(imu_CFLAGS)
stm_passthrough.srcs += $(imu_srcs)

Expand Down
1 change: 0 additions & 1 deletion conf/firmwares/subsystems/rotorcraft/imu_crista.makefile
Expand Up @@ -76,7 +76,6 @@ else ifeq ($(ARCH), stm32)
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

Expand Down
Expand Up @@ -77,7 +77,6 @@ imu_CFLAGS += -DUSE_I2C2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

Expand Down
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_analog.makefile
Expand Up @@ -90,6 +90,8 @@ $(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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAG += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_apogee.makefile
Expand Up @@ -26,6 +26,9 @@ ap.CFLAGS += -DAHRS_CORRECT_FREQUENCY=$(AHRS_CORRECT_FREQUENCY)
ap.CFLAGS += $(IMU_APOGEE_CFLAGS)
ap.srcs += $(IMU_APOGEE_SRCS)

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

#
# Simulator
#
Expand Down
1 change: 0 additions & 1 deletion conf/firmwares/subsystems/shared/imu_ardrone2.makefile
Expand Up @@ -12,7 +12,6 @@ imu_srcs += $(SRC_BOARD)/navdata.c
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

Expand Down
2 changes: 2 additions & 0 deletions conf/firmwares/subsystems/shared/imu_aspirin2_i2c.makefile
Expand Up @@ -30,6 +30,8 @@ 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)

#
# NPS simulator
Expand Down
Expand Up @@ -25,6 +25,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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
Expand Up @@ -25,6 +25,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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_aspirin_v1.0.makefile
Expand Up @@ -25,6 +25,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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_aspirin_v1.5.makefile
Expand Up @@ -25,6 +25,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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
ap.srcs += $(IMU_ASPIRIN_SRCS)

test_imu.CFLAGS += $(IMU_ASPIRIN_CFLAGS)
test_imu.srcs += $(IMU_ASPIRIN_SRCS)
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_aspirin_v2.1.makefile
Expand Up @@ -40,3 +40,6 @@ 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)
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_b2_v1.0.makefile
Expand Up @@ -58,6 +58,8 @@ endif
endif #NO_MAG

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_b2_v1.1.makefile
Expand Up @@ -58,6 +58,8 @@ imu_CFLAGS += -DMS2100_SPI_DEV=spi2
endif

# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
4 changes: 3 additions & 1 deletion conf/firmwares/subsystems/shared/imu_b2_v1.2.makefile
Expand Up @@ -51,6 +51,8 @@ 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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(imu_CFLAGS)
ap.srcs += $(imu_srcs)

test_imu.CFLAGS += $(imu_CFLAGS)
test_imu.srcs += $(imu_srcs)
Expand Up @@ -74,11 +74,13 @@ 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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example

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)


#
# NPS simulator
Expand Down
4 changes: 2 additions & 2 deletions conf/firmwares/subsystems/shared/imu_gl1.makefile
Expand Up @@ -42,11 +42,11 @@ 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
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example
ap.CFLAGS += $(IMU_GL1_CFLAGS)
ap.srcs += $(IMU_GL1_SRCS)


test_imu.CFLAGS += $(IMU_GL1_CFLAGS)
test_imu.srcs += $(IMU_GL1_SRCS)

#
# NPS simulator
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_krooz_sd.makefile
Expand Up @@ -28,6 +28,9 @@ IMU_KROOZ_CFLAGS += -DAHRS_MAG_CORRECT_FREQUENCY=$(AHRS_MAG_CORRECT_FREQUENCY)
ap.CFLAGS += $(IMU_KROOZ_CFLAGS)
ap.srcs += $(IMU_KROOZ_SRCS)

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

#
# NPS simulator
#
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_krooz_sd_memsic.makefile
Expand Up @@ -33,6 +33,9 @@ IMU_KROOZ_CFLAGS += -DAHRS_MAG_CORRECT_FREQUENCY=$(AHRS_MAG_CORRECT_FREQUENCY)
ap.CFLAGS += $(IMU_KROOZ_CFLAGS)
ap.srcs += $(IMU_KROOZ_SRCS)

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

#
# NPS simulator
#
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_lisa_s_v0.1.makefile
Expand Up @@ -64,6 +64,9 @@ 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)

#
# NPS simulator
#
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_mpu6000_hmc5883.makefile
Expand Up @@ -91,6 +91,9 @@ 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)

#
# NPS simulator
#
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_ppzuav.makefile
Expand Up @@ -20,3 +20,6 @@ endif

ap.CFLAGS += $(IMU_PPZUAV_CFLAGS)
ap.srcs += $(IMU_PPZUAV_SRCS)

test_imu.CFLAGS += $(IMU_PPZUAV_CFLAGS)
test_imu.srcs += $(IMU_PPZUAV_SRCS)
3 changes: 2 additions & 1 deletion conf/firmwares/subsystems/shared/imu_px4fmu_v1.7.makefile
Expand Up @@ -58,11 +58,12 @@ IMU_PX4FMU_CFLAGS += -DUSE_I2C2


# Keep CFLAGS/Srcs for imu in separate expression so we can assign it to other targets
# see: conf/autopilot/subsystems/lisa_passthrough/imu_b2_v1.1.makefile for example

ap.CFLAGS += $(IMU_PX4FMU_CFLAGS)
ap.srcs += $(IMU_PX4FMU_SRCS)

test_imu.CFLAGS += $(IMU_PX4FMU_CFLAGS)
test_imu.srcs += $(IMU_PX4FMU_SRCS)

#
# NPS simulator
Expand Down
3 changes: 3 additions & 0 deletions conf/firmwares/subsystems/shared/imu_yai.makefile
Expand Up @@ -36,3 +36,6 @@ include $(CFG_SHARED)/imu_b2_common.makefile

ap.srcs += $(imu_srcs)
ap.CFLAGS += $(imu_CFLAGS)

test_imu.srcs += $(imu_srcs)
test_imu.CFLAGS += $(imu_CFLAGS)
4 changes: 2 additions & 2 deletions conf/firmwares/subsystems/shared/spi_master.makefile
Expand Up @@ -8,7 +8,7 @@ SPI_INCLUDED = 1
SPI_CFLAGS = -DUSE_SPI -DSPI_MASTER
SPI_SRCS = mcu_periph/spi.c $(SRC_ARCH)/mcu_periph/spi_arch.c

ap.CFLAGS += $(SPI_CFLAGS)
ap.srcs += $(SPI_SRCS)
$(TARGET).CFLAGS += $(SPI_CFLAGS)
$(TARGET).srcs += $(SPI_SRCS)

endif
20 changes: 20 additions & 0 deletions conf/firmwares/test_progs.makefile
Expand Up @@ -307,3 +307,23 @@ test_adc.CFLAGS += $(COMMON_TELEMETRY_CFLAGS)
test_adc.srcs += $(COMMON_TELEMETRY_SRCS)
test_adc.srcs += $(SRC_ARCH)/mcu_periph/adc_arch.c
test_adc.srcs += test/mcu_periph/test_adc.c


#
# test_imu
#
# add imu subsystem to test_imu target!
#
# configuration
# SYS_TIME_LED
# MODEM_PORT
# MODEM_BAUD
#
test_imu.ARCHDIR = $(ARCH)
test_imu.CFLAGS += $(COMMON_TEST_CFLAGS)
test_imu.srcs += $(COMMON_TEST_SRCS)
test_imu.CFLAGS += $(COMMON_TELEMETRY_CFLAGS)
test_imu.srcs += $(COMMON_TELEMETRY_SRCS)
test_imu.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c
test_imu.srcs += test/subsystems/test_imu.c
test_imu.srcs += math/pprz_trig_int.c

0 comments on commit 721ee73

Please sign in to comment.