diff --git a/conf/airframes/Poine/beth.xml b/conf/airframes/Poine/beth.xml index d90036c7b6..abd5e75a47 100644 --- a/conf/airframes/Poine/beth.xml +++ b/conf/airframes/Poine/beth.xml @@ -110,7 +110,7 @@ main_stm32.srcs = $(SRC_BETH)/main_stm32.c \ main_stm32.CFLAGS += -DUSE_LED main_stm32.srcs += $(SRC_ARCH)/led_hw.c main_stm32.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -main_stm32.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +main_stm32.CFLAGS += -DPERIODIC_FREQUENCY='512.' main_stm32.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c main_stm32.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -182,7 +182,7 @@ main_coders.srcs = $(SRC_BETH)/main_coders.c \ main_coders.CFLAGS += -DUSE_LED main_coders.srcs += $(SRC_ARCH)/led_hw.c main_coders.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=7 -main_coders.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +main_coders.CFLAGS += -DPERIODIC_FREQUENCY='512.' main_coders.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c main_coders.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 diff --git a/conf/airframes/Poine/bl_mc.xml b/conf/airframes/Poine/bl_mc.xml index 02f00bb4d0..84a93893d8 100644 --- a/conf/airframes/Poine/bl_mc.xml +++ b/conf/airframes/Poine/bl_mc.xml @@ -23,8 +23,8 @@ LOCK_FUSE = ff main.CFLAGS += -DBOARD_CONFIG=\"conf_bl_mc.h\" main.srcs = main_bl_mc.c -main.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1e-2)' -main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +main.CFLAGS += -DPERIODIC_FREQUENCY='100.' -DUSE_SYS_TIME +main.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c main.CFLAGS += -DUSE_LED #-DSYS_TIME_LED=1 diff --git a/conf/airframes/Poine/motor_bench.xml b/conf/airframes/Poine/motor_bench.xml index 8e5c0051de..5f5036c767 100644 --- a/conf/airframes/Poine/motor_bench.xml +++ b/conf/airframes/Poine/motor_bench.xml @@ -13,8 +13,7 @@ main.ARCHDIR = $(ARCH) main.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB) main.srcs = $(MB)/main_motor_bench.c -main.CFLAGS += -DPERIODIC_TASK_FREQ='250.' -main.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./PERIODIC_TASK_FREQ)' +main.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME main.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c main.CFLAGS += -DUSE_LED @@ -57,8 +56,7 @@ foo.ARCHDIR = $(ARCH) foo.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB) foo.srcs = $(MB)/main_foo.c -foo.CFLAGS += -DPERIODIC_TASK_FREQ='250.' -foo.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./PERIODIC_TASK_FREQ)' +foo.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME foo.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c foo.CFLAGS += -DUSE_LED @@ -76,8 +74,7 @@ bar.ARCHDIR = $(ARCH) bar.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -I$(MB) bar.srcs = $(MB)/main_bar.c -bar.CFLAGS += -DPERIODIC_TASK_FREQ='250.' -bar.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./PERIODIC_TASK_FREQ)' +bar.CFLAGS += -DPERIODIC_FREQUENCY='250.' -DUSE_SYS_TIME bar.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c bar.CFLAGS += -DUSE_LED diff --git a/conf/airframes/Poine/pt_ant.xml b/conf/airframes/Poine/pt_ant.xml index 86e71c4fc4..6bc7224117 100644 --- a/conf/airframes/Poine/pt_ant.xml +++ b/conf/airframes/Poine/pt_ant.xml @@ -23,8 +23,8 @@ main.ARCHDIR = $(ARCH) main.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -I$(PT_ANT) main.srcs = $(PT_ANT)/pt_ant_main.c -main.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1.66666667e-2)' -main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +main.CFLAGS += -DPERIODIC_FREQUENCY='60.' -DUSE_SYS_TIME +main.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c main.CFLAGS += -DUSE_LED diff --git a/conf/airframes/Poine/turntable.xml b/conf/airframes/Poine/turntable.xml index 7e9839f89b..9203b89dec 100644 --- a/conf/airframes/Poine/turntable.xml +++ b/conf/airframes/Poine/turntable.xml @@ -17,7 +17,7 @@ main.srcs += mcu.c main.srcs += $(SRC_ARCH)/mcu_arch.c main.CFLAGS += -DUSE_LED -main.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +main.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 main.srcs += mcu_periph/sys_time.c $(MB)/turntable_systime.c #main.CFLAGS += -DUSE_USB_SERIAL diff --git a/conf/airframes/demo.xml b/conf/airframes/demo.xml index a990d33dfd..f9924086b0 100644 --- a/conf/airframes/demo.xml +++ b/conf/airframes/demo.xml @@ -23,7 +23,7 @@ demo2.ARCHDIR = $(ARCH) demo2.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" demo2.srcs = main_demo2.c -demo2.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(10e-2)' +demo2.CFLAGS += -DPERIODIC_FREQUENCY='100.' -DUSE_SYS_TIME demo2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c demo2.CFLAGS += -DUSE_LED @@ -36,7 +36,7 @@ demo3.ARCHDIR = $(ARCH) demo3.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" demo3.srcs = main_demo3.c -demo3.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1e-1)' +demo3.CFLAGS += -DPERIODIC_FREQUENCY='10.' -DUSE_SYS_TIME demo3.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c demo3.CFLAGS += -DUSE_LED @@ -55,7 +55,7 @@ demo4.ARCHDIR = $(ARCH) demo4.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" demo4.srcs = main_demo4.c -demo4.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(10e-2)' +demo4.CFLAGS += -DPERIODIC_FREQUENCY='100.' -DUSE_SYS_TIME demo4.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c demo4.CFLAGS += -DUSE_LED @@ -78,7 +78,7 @@ demo5.ARCHDIR = $(ARCH) demo5.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" demo5.srcs = main_demo5.c -demo5.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(10e-2)' +demo5.CFLAGS += -DPERIODIC_FREQUENCY='100.' -DUSE_SYS_TIME demo5.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c demo5.CFLAGS += -DUSE_LED @@ -102,7 +102,7 @@ demo6.ARCHDIR = $(ARCH) demo6.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" demo6.srcs = main_demo6.c -demo6.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(10e-2)' +demo6.CFLAGS += -DPERIODIC_FREQUENCY='100.' demo6.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c demo6.CFLAGS += -DUSE_LED @@ -129,7 +129,7 @@ test_spk.ARCHDIR = $(ARCH) test_spk.CFLAGS += -DBOARD_CONFIG=\"booz2_board_usb.h\" test_spk.srcs = main_test_spk.c -test_spk.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_spk.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_spk.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_spk.CFLAGS += -DUSE_LED diff --git a/conf/airframes/fraser_lisa_m_rotorcraft.xml b/conf/airframes/fraser_lisa_m_rotorcraft.xml index 2e8bfd6338..eed728e0b8 100644 --- a/conf/airframes/fraser_lisa_m_rotorcraft.xml +++ b/conf/airframes/fraser_lisa_m_rotorcraft.xml @@ -27,8 +27,11 @@ + + + + - diff --git a/conf/airframes/obsolete/autoplato.xml b/conf/airframes/obsolete/autoplato.xml index f651ff31f7..ae76c8e4f6 100644 --- a/conf/airframes/obsolete/autoplato.xml +++ b/conf/airframes/obsolete/autoplato.xml @@ -14,7 +14,7 @@ test_usb.ARCHDIR = $(ARCH) test_usb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_usb.srcs += $(SRC_BOOZ_TEST)/atpt_main.c -test_usb.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_usb.CFLAGS += -DPERIODIC_FREQUENCY='512.' # -DTIME_LED=1 test_usb.CFLAGS += -DUSE_LED test_usb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c diff --git a/conf/airframes/test_i2c.xml b/conf/airframes/obsolete/test_i2c.xml similarity index 70% rename from conf/airframes/test_i2c.xml rename to conf/airframes/obsolete/test_i2c.xml index 4c29a8f709..b57e6b9834 100644 --- a/conf/airframes/test_i2c.xml +++ b/conf/airframes/obsolete/test_i2c.xml @@ -11,8 +11,8 @@ LPC21ISP_XTAL = 12000 #FLASH_MODE = IAP FLASH_MODE = ISP -mb.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(10e-3)' -mb.srcs = $(SRC_ARCH)/main_test_i2c.c sys_time.c $(SRC_ARCH)/sys_time_hw.c $(SRC_ARCH)/armVIC.c +mb.CFLAGS += -DBOARD_CONFIG=\"conf_motor_bench.h\" -DPERIODIC_FREQUENCY='1000.' -DUSE_SYS_TIME +mb.srcs = $(SRC_ARCH)/main_test_i2c.c mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c mb.CFLAGS += -DUSE_LED diff --git a/conf/airframes/obsolete/vor.xml b/conf/airframes/obsolete/vor.xml index fe4da5dd45..0cbeb72a48 100644 --- a/conf/airframes/obsolete/vor.xml +++ b/conf/airframes/obsolete/vor.xml @@ -11,7 +11,7 @@ main.ARCHDIR = $(ARCH) main.CFLAGS += -DBOARD_CONFIG=\"boards/olimex_lpc_h2148.h\" main.srcs = firmwares/vor/lpc_vor_main.c -main.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./29880.)' +main.CFLAGS += -DPERIODIC_FREQUENCY='29880.' main.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c main.CFLAGS += -DUSE_LED diff --git a/conf/airframes/wind_tunnel.xml b/conf/airframes/wind_tunnel.xml index 850333071f..1b083e4313 100644 --- a/conf/airframes/wind_tunnel.xml +++ b/conf/airframes/wind_tunnel.xml @@ -14,8 +14,8 @@ ap.ARCHDIR = $(ARCH) ap.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -I$(WIND_TUNNEL) ap.srcs = $(WIND_TUNNEL)/main.c -ap.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1e-1)' -ap.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +ap.CFLAGS += -DPERIODIC_FREQUENCY='10.' -DUSE_SYS_TIME +ap.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c ap.CFLAGS += -DUSE_LED @@ -44,8 +44,8 @@ mb.ARCHDIR = $(ARCH) mb.CFLAGS += -DBOARD_CONFIG=\"conf_demo.h\" -I$(WIND_TUNNEL) -I$(MB) mb.srcs = $(WIND_TUNNEL)/main_mb.c -mb.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1e-2)' -mb.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +mb.CFLAGS += -DPERIODIC_FREQUENCY='100.' -DUSE_SYS_TIME +mb.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c mb.CFLAGS += -DUSE_LED diff --git a/conf/autopilot/booz2_test_progs.makefile b/conf/autopilot/booz2_test_progs.makefile index d40fea50a8..d9c334b6a8 100644 --- a/conf/autopilot/booz2_test_progs.makefile +++ b/conf/autopilot/booz2_test_progs.makefile @@ -33,7 +33,7 @@ test_led.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_led.CFLAGS += -DPERIPHERALS_AUTO_INIT test_led.srcs += $(SRC_BOOZ_TEST)/booz2_test_led.c test_led.CFLAGS += -DUSE_LED -test_led.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_led.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_led.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c # @@ -45,7 +45,7 @@ test_downlink.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_downlink.CFLAGS += -DPERIPHERALS_AUTO_INIT test_downlink.srcs += $(SRC_BOOZ_TEST)/booz2_test_subsystems/datalink/downlink.c test_downlink.CFLAGS += -DUSE_LED -test_downlink.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./10.))' -DSYS_TIME_LED=1 +test_downlink.CFLAGS += -DPERIODIC_FREQUENCY='10.' -DSYS_TIME_LED=1 test_downlink.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c test_downlink.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 @@ -65,7 +65,7 @@ test_max1168.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_AR test_max1168.CFLAGS += -DPERIPHERALS_AUTO_INIT test_max1168.srcs += $(SRC_BOOZ_TEST)/booz2_test_max1168.c test_max1168.CFLAGS += -DUSE_LED -test_max1168.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_max1168.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_max1168.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c test_max1168.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 @@ -86,7 +86,7 @@ test_micromag.ARCHDIR = $(ARCH) test_micromag.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_micromag.srcs += $(SRC_BOOZ_TEST)/booz2_test_micromag.c -test_micromag.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_micromag.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_micromag.CFLAGS += -DUSE_LED test_micromag.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -112,7 +112,7 @@ tunnel.ARCHDIR = $(ARCH) tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) tunnel.srcs += $(SRC_BOOZ_TEST)/booz2_tunnel.c -tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +tunnel.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 tunnel.CFLAGS += -DUSE_LED tunnel.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c tunnel.srcs += mcu.c $(SRC_ARCH)/mcu_arch.c @@ -130,7 +130,7 @@ tunnel_bb.ARCHDIR = $(ARCH) tunnel_bb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) tunnel_bb.srcs += $(SRC_BOOZ_TEST)/booz2_tunnel_bb.c -tunnel_bb.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +tunnel_bb.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 tunnel_bb.CFLAGS += -DUSE_LED tunnel_bb.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -166,7 +166,7 @@ test_gps.ARCHDIR = $(ARCH) test_gps.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_gps.srcs += $(SRC_BOOZ_TEST)/booz2_test_gps.c -test_gps.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_gps.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_gps.CFLAGS += -DUSE_LED test_gps.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -192,7 +192,7 @@ test_modem.ARCHDIR = $(ARCH) test_modem.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_modem.srcs += $(SRC_BOOZ_TEST)/booz2_test_modem.c -test_modem.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_modem.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_modem.CFLAGS += -DUSE_LED test_modem.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -214,7 +214,7 @@ test_usb.ARCHDIR = $(ARCH) test_usb.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_usb.srcs += $(SRC_BOOZ_TEST)/booz2_test_usb.c -test_usb.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_usb.CFLAGS += -DPERIODIC_FREQUENCY='512.' # -DSYS_TIME_LED=1 test_usb.CFLAGS += -DUSE_LED test_usb.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -245,7 +245,7 @@ test_ami.ARCHDIR = $(ARCH) test_ami.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_ami.srcs += $(SRC_BOOZ_TEST)/booz2_test_ami.c -test_ami.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./50.))' -DSYS_TIME_LED=1 +test_ami.CFLAGS += -DPERIODIC_FREQUENCY='50.' -DSYS_TIME_LED=1 test_ami.CFLAGS += -DUSE_LED test_ami.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -269,7 +269,7 @@ test_crista.ARCHDIR = $(ARCH) test_crista.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_crista.srcs += $(SRC_BOOZ_TEST)/booz2_test_crista.c -test_crista.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_crista.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_crista.CFLAGS += -DUSE_LED test_crista.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -296,7 +296,7 @@ test_micromag2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ test_micromag2.srcs += $(SRC_BOOZ_TEST)/booz2_test_micromag_2.c test_micromag2.CFLAGS += -DSSP_VIC_SLOT=9 test_micromag2.CFLAGS += -DMICROMAG_DRDY_VIC_SLOT=8 -test_micromag2.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./50.))' -DSYS_TIME_LED=1 +test_micromag2.CFLAGS += -DPERIODIC_FREQUENCY='50.' -DSYS_TIME_LED=1 test_micromag2.CFLAGS += -DUSE_LED test_micromag2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -319,7 +319,7 @@ test_imu_b2.ARCHDIR = $(ARCH) test_imu_b2.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_imu_b2.srcs += $(SRC_BOOZ_TEST)/booz2_test_imu_b2.c -test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_imu_b2.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_imu_b2.CFLAGS += -DUSE_LED test_imu_b2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -350,7 +350,7 @@ test_rc_spektrum.ARCHDIR = $(ARCH) test_rc_spektrum.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) $(BOOZ_CFLAGS) test_rc_spektrum.CFLAGS += -DPERIPHERALS_AUTO_INIT test_rc_spektrum.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c -test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_rc_spektrum.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_rc_spektrum.CFLAGS += -DUSE_LED test_rc_spektrum.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -384,7 +384,7 @@ test_rc_ppm.ARCHDIR = $(ARCH) test_rc_ppm.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) $(BOOZ_CFLAGS) test_rc_ppm.CFLAGS += -DPERIPHERALS_AUTO_INIT test_rc_ppm.srcs += $(SRC_BOOZ_TEST)/booz2_test_radio_control.c -test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_rc_ppm.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_rc_ppm.CFLAGS += -DUSE_LED test_rc_ppm.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -413,7 +413,7 @@ test_mc.ARCHDIR = $(ARCH) test_mc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_mc.srcs += $(SRC_BOOZ_TEST)/booz2_test_mc.c -test_mc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_mc.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_mc.CFLAGS += -DUSE_LED test_mc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -440,7 +440,7 @@ test_buss_bldc.CFLAGS += -DPERIPHERALS_AUTO_INIT test_buss_bldc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_buss_bldc.srcs += $(SRC_BOOZ_TEST)/booz2_test_buss_bldc.c test_buss_bldc.CFLAGS += -DUSE_LED -test_buss_bldc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_buss_bldc.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_buss_bldc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c test_buss_bldc.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 @@ -462,7 +462,7 @@ test_amc.ARCHDIR = $(ARCH) test_amc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) -I$(SRC_BOOZ_ARCH) test_amc.srcs += $(SRC_BOOZ_TEST)/booz2_test_amc.c -test_amc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_amc.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_amc.CFLAGS += -DUSE_LED test_amc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -494,7 +494,7 @@ test_mkk_bldc.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) $(BOOZ_CFLAGS) test_mkk_bldc.CFLAGS += -DPERIPHERALS_AUTO_INIT test_mkk_bldc.srcs += $(SRC_BOOZ_TEST)/booz2_test_buss_bldc_hexa.c test_mkk_bldc.CFLAGS += -DUSE_LED -test_mkk_bldc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_mkk_bldc.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_mkk_bldc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c test_mkk_bldc.CFLAGS += -DUSE_I2C0 -DI2C0_SCLL=150 -DI2C0_SCLH=150 -DI2C0_VIC_SLOT=10 test_mkk_bldc.srcs += i2c.c $(SRC_ARCH)/i2c_hw.c @@ -507,7 +507,7 @@ test_baro_24.ARCHDIR = $(ARCH) test_baro_24.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -I$(SRC_BOOZ) $(BOOZ_CFLAGS) test_baro_24.srcs += $(SRC_BOOZ_TEST)/booz2_test_baro_24.c -test_baro_24.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./5.))' -DSYS_TIME_LED=1 +test_baro_24.CFLAGS += -DPERIODIC_FREQUENCY='5.' -DSYS_TIME_LED=1 test_baro_24.CFLAGS += -DUSE_LED test_baro_24.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c @@ -532,5 +532,5 @@ test_coder.CFLAGS += -DBOARD_CONFIG=\"boards/olimex_lpc_h2148.h\" $(BOOZ_CFLAGS) test_coder.CFLAGS += -DPERIPHERALS_AUTO_INIT test_coder.srcs += $(SRC_BOOZ_TEST)/booz2_test_coder.c test_coder.CFLAGS += -DUSE_LED -test_coder.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' -DSYS_TIME_LED=1 +test_coder.CFLAGS += -DPERIODIC_FREQUENCY='512.' -DSYS_TIME_LED=1 test_coder.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c $(SRC_ARCH)/armVIC.c diff --git a/conf/autopilot/lisa_l_test_progs.makefile b/conf/autopilot/lisa_l_test_progs.makefile index c09f79e087..4030f38e08 100644 --- a/conf/autopilot/lisa_l_test_progs.makefile +++ b/conf/autopilot/lisa_l_test_progs.makefile @@ -90,7 +90,7 @@ test_uart.srcs = $(SRC_AIRBORNE)/mcu.c \ test_uart.CFLAGS += -DUSE_LED -DUSE_UART test_uart.srcs += $(SRC_ARCH)/led_hw.c test_uart.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_uart.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_uart.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_uart.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_uart.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 test_uart.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -118,7 +118,7 @@ test_servos.srcs += $(SRC_AIRBORNE)/mcu.c \ test_servos.CFLAGS += -DUSE_LED test_servos.srcs += $(SRC_ARCH)/led_hw.c test_servos.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_servos.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_servos.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_servos.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_servos.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm.c $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c @@ -142,7 +142,7 @@ test_telemetry.srcs = $(SRC_AIRBORNE)/mcu.c \ test_telemetry.CFLAGS += -DUSE_LED test_telemetry.srcs += $(SRC_ARCH)/led_hw.c test_telemetry.CFLAGS += -DUSE_SYS_TIME -test_telemetry.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_telemetry.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_telemetry.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_telemetry.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_telemetry.CFLAGS += -DUSE_$(MODEM_PORT) @@ -171,7 +171,7 @@ test_baro.srcs = $(SRC_AIRBORNE)/mcu.c \ test_baro.CFLAGS += -DUSE_LED test_baro.srcs += $(SRC_ARCH)/led_hw.c test_baro.CFLAGS += -DUSE_SYS_TIME -test_baro.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_baro.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_baro.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_baro.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT) @@ -207,7 +207,7 @@ test_rc_spektrum.srcs += $(SRC_AIRBORNE)/mcu.c \ test_rc_spektrum.CFLAGS += -DUSE_LED test_rc_spektrum.srcs += $(SRC_ARCH)/led_hw.c test_rc_spektrum.CFLAGS += -DUSE_SYS_TIME -test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_rc_spektrum.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_rc_spektrum.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_rc_spektrum.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_rc_spektrum.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -251,7 +251,7 @@ test_rc_ppm.srcs += $(SRC_AIRBORNE)/mcu.c \ test_rc_ppm.CFLAGS += -DUSE_LED test_rc_ppm.srcs += $(SRC_ARCH)/led_hw.c test_rc_ppm.CFLAGS += -DUSE_SYS_TIME -test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_rc_ppm.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_rc_ppm.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_rc_ppm.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_rc_ppm.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -291,7 +291,7 @@ test_adc.srcs += $(SRC_ARCH)/led_hw.c test_adc.CFLAGS += -DUSE_SYS_TIME test_adc.CFLAGS +=-DSYS_TIME_LED=$(SYS_TIME_LED) -test_adc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_adc.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_adc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_adc.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -328,7 +328,6 @@ COMMON_TEST_SRCS = $(SRC_AIRBORNE)/mcu.c \ COMMON_TEST_CFLAGS += -DUSE_LED COMMON_TEST_SRCS += $(SRC_ARCH)/led_hw.c COMMON_TEST_CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -COMMON_TEST_CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./$(PERIODIC_FREQUENCY).))' COMMON_TEST_CFLAGS += -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) COMMON_TEST_SRCS += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c COMMON_TEST_CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -496,7 +495,7 @@ test_hmc5843.srcs = $(SRC_AIRBORNE)/mcu.c \ test_hmc5843.CFLAGS += -DUSE_LED test_hmc5843.srcs += $(SRC_ARCH)/led_hw.c test_hmc5843.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_hmc5843.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_hmc5843.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_hmc5843.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_hmc5843.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -527,7 +526,7 @@ test_itg3200.CFLAGS += -DUSE_LED test_itg3200.srcs += $(SRC_ARCH)/led_hw.c test_itg3200.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_itg3200.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_itg3200.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_itg3200.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -558,7 +557,7 @@ test_adxl345.CFLAGS += -DUSE_LED test_adxl345.srcs += $(SRC_ARCH)/led_hw.c test_adxl345.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_adxl345.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_adxl345.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -587,7 +586,7 @@ test_esc_mkk_simple.srcs = $(SRC_AIRBORNE)/mcu.c \ test_esc_mkk_simple.CFLAGS += -DUSE_LED test_esc_mkk_simple.srcs += $(SRC_ARCH)/led_hw.c test_esc_mkk_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_esc_mkk_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_esc_mkk_simple.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_esc_mkk_simple.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_esc_mkk_simple.CFLAGS += -DUSE_I2C2 test_esc_mkk_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c @@ -608,7 +607,7 @@ test_esc_asctecv1_simple.srcs = $(SRC_AIRBORNE)/mcu.c \ test_esc_asctecv1_simple.CFLAGS += -DUSE_LED test_esc_asctecv1_simple.srcs += $(SRC_ARCH)/led_hw.c test_esc_asctecv1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_esc_asctecv1_simple.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_esc_asctecv1_simple.CFLAGS += -DUSE_I2C1 test_esc_asctecv1_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c @@ -630,7 +629,7 @@ test_actuators_mkk.CFLAGS += -DUSE_LED test_actuators_mkk.srcs += $(SRC_ARCH)/led_hw.c test_actuators_mkk.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_actuators_mkk.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_actuators_mkk.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_actuators_mkk.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -663,7 +662,7 @@ test_actuators_asctecv1.CFLAGS += -DUSE_LED test_actuators_asctecv1.srcs += $(SRC_ARCH)/led_hw.c test_actuators_asctecv1.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -test_actuators_asctecv1.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_actuators_asctecv1.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_actuators_asctecv1.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_actuators_asctecv1.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -694,7 +693,7 @@ test_bmp085.srcs = $(SRC_AIRBORNE)/mcu.c \ test_bmp085.CFLAGS += -DUSE_LED test_bmp085.srcs += $(SRC_ARCH)/led_hw.c test_bmp085.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_bmp085.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_bmp085.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_bmp085.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_bmp085.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -725,7 +724,7 @@ test_manual.srcs = $(SRC_AIRBORNE)/mcu.c \ test_manual.CFLAGS += -DUSE_LED test_manual.srcs += $(SRC_ARCH)/led_hw.c test_manual.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_manual.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_manual.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_manual.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_manual.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -771,7 +770,7 @@ tunnel_sw.srcs += $(SRC_AIRBORNE)/mcu.c \ tunnel_sw.CFLAGS += -DUSE_LED tunnel_sw.srcs += $(SRC_ARCH)/led_hw.c tunnel_sw.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -tunnel_sw.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +tunnel_sw.CFLAGS += -DPERIODIC_FREQUENCY='512.' tunnel_sw.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c @@ -789,7 +788,7 @@ tunnel_hw.srcs += lisa/test/lisa_tunnel.c \ tunnel_hw.CFLAGS += -DUSE_LED tunnel_hw.srcs += $(SRC_ARCH)/led_hw.c tunnel_hw.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -tunnel_hw.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +tunnel_hw.CFLAGS += -DPERIODIC_FREQUENCY='512.' tunnel_hw.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c tunnel_hw.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 tunnel_hw.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -816,7 +815,7 @@ test_settings.srcs = test/subsystems/test_settings.c \ test_settings.CFLAGS += -DUSE_LED test_settings.srcs += $(SRC_ARCH)/led_hw.c test_settings.CFLAGS += -DUSE_SYS_TIME -test_settings.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_settings.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_settings.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_settings.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_settings.CFLAGS += -DUSE_$(MODEM_PORT) diff --git a/conf/autopilot/lisa_m_test_progs.makefile b/conf/autopilot/lisa_m_test_progs.makefile index 823bd899d9..219dd16056 100644 --- a/conf/autopilot/lisa_m_test_progs.makefile +++ b/conf/autopilot/lisa_m_test_progs.makefile @@ -67,6 +67,8 @@ test_led.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT test_led.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) test_led.srcs += $(SRC_AIRBORNE)/mcu.c \ $(SRC_ARCH)/mcu_arch.c \ + $(SRC_AIRBORNE)/mcu_periph/sys_time.c \ + $(SRC_ARCH)/mcu_periph/sys_time_arch.c \ $(SRC_LISA)/test_led.c \ $(SRC_ARCH)/stm32_exceptions.c \ $(SRC_ARCH)/stm32_vector_table.c @@ -81,8 +83,8 @@ test_sys_time.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT test_sys_time.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) test_sys_time.srcs += $(SRC_AIRBORNE)/mcu.c \ $(SRC_ARCH)/mcu_arch.c \ - test/mcu_periph/test_sys_time.c \ - mcu_periph/sys_time.c \ + $(SRC_AIRBORNE)/test/mcu_periph/test_sys_time.c \ + $(SRC_AIRBORNE)/mcu_periph/sys_time.c \ $(SRC_ARCH)/mcu_periph/sys_time_arch.c \ $(SRC_ARCH)/stm32_exceptions.c \ $(SRC_ARCH)/stm32_vector_table.c @@ -103,7 +105,7 @@ test_uart_lisam.srcs = $(SRC_AIRBORNE)/mcu.c \ test_uart_lisam.CFLAGS += -DUSE_LED -DUSE_UART test_uart_lisam.srcs += $(SRC_ARCH)/led_hw.c test_uart_lisam.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -test_uart_lisam.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_uart_lisam.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_uart_lisam.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_uart_lisam.CFLAGS += -DUSE_UART1 -DUART1_BAUD=B57600 test_uart_lisam.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -131,7 +133,7 @@ test_servos.srcs += $(SRC_AIRBORNE)/mcu.c \ test_servos.CFLAGS += -DUSE_LED test_servos.srcs += $(SRC_ARCH)/led_hw.c test_servos.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -DUSE_SERVOS_7AND8 -test_servos.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_servos.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_servos.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_servos.srcs += $(SRC_FIRMWARE)/actuators/actuators_pwm.c $(SRC_FIRMWARE)/actuators/arch/$(ARCH)/actuators_pwm_arch.c @@ -155,7 +157,7 @@ test_telemetry.srcs = $(SRC_AIRBORNE)/mcu.c \ test_telemetry.CFLAGS += -DUSE_LED test_telemetry.srcs += $(SRC_ARCH)/led_hw.c test_telemetry.CFLAGS += -DUSE_SYS_TIME -test_telemetry.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_telemetry.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_telemetry.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_telemetry.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_telemetry.CFLAGS += -DUSE_$(MODEM_PORT) @@ -185,7 +187,7 @@ test_baro.srcs = $(SRC_AIRBORNE)/mcu.c \ test_baro.CFLAGS += -DUSE_LED test_baro.srcs += $(SRC_ARCH)/led_hw.c test_baro.CFLAGS += -DUSE_SYS_TIME -test_baro.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_baro.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_baro.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_baro.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_baro.CFLAGS += -DDOWNLINK -DDOWNLINK_TRANSPORT=PprzTransport -DDOWNLINK_DEVICE=$(MODEM_PORT) @@ -221,7 +223,7 @@ test_rc_spektrum.srcs += $(SRC_AIRBORNE)/mcu.c \ test_rc_spektrum.CFLAGS += -DUSE_LED test_rc_spektrum.srcs += $(SRC_ARCH)/led_hw.c test_rc_spektrum.CFLAGS += -DUSE_SYS_TIME -test_rc_spektrum.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +test_rc_spektrum.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_rc_spektrum.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_rc_spektrum.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_rc_spektrum.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -267,7 +269,7 @@ test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c #test_rc_ppm.CFLAGS += -DUSE_LED #test_rc_ppm.srcs += $(SRC_ARCH)/led_hw.c #test_rc_ppm.CFLAGS += -DUSE_SYS_TIME -#test_rc_ppm.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +#test_rc_ppm.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_rc_ppm.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) #test_rc_ppm.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c #test_rc_ppm.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -307,7 +309,7 @@ test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c # #test_adc.CFLAGS += -DUSE_SYS_TIME #test_adc.CFLAGS +=-DSYS_TIME_LED=$(SYS_TIME_LED) -#test_adc.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_adc.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_adc.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_adc.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -344,7 +346,7 @@ test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c # #test_imu_b2.CFLAGS += -DUSE_SYS_TIME #test_imu_b2.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_imu_b2.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +#test_imu_b2.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_imu_b2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_imu_b2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -388,7 +390,7 @@ test_rc_spektrum.srcs += $(SRC_SUBSYSTEMS)/radio_control.c # #test_imu_b2_2.CFLAGS += -DUSE_SYS_TIME #test_imu_b2_2.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_imu_b2_2.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +#test_imu_b2_2.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_imu_b2_2.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_imu_b2_2.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -433,7 +435,7 @@ test_imu_aspirin.srcs = $(SRC_AIRBORNE)/mcu.c \ test_imu_aspirin.CFLAGS += -DUSE_LED test_imu_aspirin.srcs += $(SRC_ARCH)/led_hw.c test_imu_aspirin.CFLAGS += -DUSE_SYS_TIME -test_imu_aspirin.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +test_imu_aspirin.CFLAGS += -DPERIODIC_FREQUENCY='512.' test_imu_aspirin.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) test_imu_aspirin.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c test_imu_aspirin.CFLAGS += -DUSE_$(MODEM_PORT) @@ -471,7 +473,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_hmc5843.CFLAGS += -DUSE_LED #test_hmc5843.srcs += $(SRC_ARCH)/led_hw.c #test_hmc5843.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_hmc5843.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_hmc5843.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_hmc5843.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_hmc5843.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -502,7 +504,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_itg3200.srcs += $(SRC_ARCH)/led_hw.c # #test_itg3200.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_itg3200.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +#test_itg3200.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_itg3200.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_itg3200.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -533,7 +535,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_adxl345.srcs += $(SRC_ARCH)/led_hw.c # #test_adxl345.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -#test_adxl345.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +#test_adxl345.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_adxl345.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_adxl345.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -562,7 +564,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_esc_mkk_simple.CFLAGS += -DUSE_LED #test_esc_mkk_simple.srcs += $(SRC_ARCH)/led_hw.c #test_esc_mkk_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_esc_mkk_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_esc_mkk_simple.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_esc_mkk_simple.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c #test_esc_mkk_simple.CFLAGS += -DUSE_I2C2 #test_esc_mkk_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c @@ -583,7 +585,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_esc_asctecv1_simple.CFLAGS += -DUSE_LED #test_esc_asctecv1_simple.srcs += $(SRC_ARCH)/led_hw.c #test_esc_asctecv1_simple.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -#test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_esc_asctecv1_simple.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_esc_asctecv1_simple.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c #test_esc_asctecv1_simple.CFLAGS += -DUSE_I2C1 #test_esc_asctecv1_simple.srcs += mcu_periph/i2c.c $(SRC_ARCH)/mcu_periph/i2c_arch.c @@ -605,7 +607,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_actuators_mkk.srcs += $(SRC_ARCH)/led_hw.c # #test_actuators_mkk.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -#test_actuators_mkk.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_actuators_mkk.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_actuators_mkk.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_actuators_mkk.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -638,7 +640,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_actuators_asctecv1.srcs += $(SRC_ARCH)/led_hw.c # #test_actuators_asctecv1.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=1 -#test_actuators_asctecv1.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_actuators_asctecv1.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_actuators_asctecv1.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_actuators_asctecv1.CFLAGS += -DUSE_UART2 -DUART2_BAUD=B57600 @@ -669,7 +671,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_bmp085.CFLAGS += -DUSE_LED #test_bmp085.srcs += $(SRC_ARCH)/led_hw.c #test_bmp085.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_bmp085.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_bmp085.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_bmp085.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_bmp085.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -699,7 +701,7 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA #test_manual.CFLAGS += -DUSE_LED #test_manual.srcs += $(SRC_ARCH)/led_hw.c #test_manual.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -#test_manual.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +#test_manual.CFLAGS += -DPERIODIC_FREQUENCY='512.' #test_manual.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c # #test_manual.CFLAGS += -DUSE_$(MODEM_PORT) -D$(MODEM_PORT)_BAUD=$(MODEM_BAUD) @@ -730,21 +732,3 @@ test_imu_aspirin.CFLAGS += -DUSE_DMA1_C4_IRQ # SPI2 Rx DMA # subsystems/radio_control/spektrum.c \ # $(SRC_ARCH)/subsystems/radio_control/spektrum_arch.c - - -# -# tunnel -# -tunnel.ARCHDIR = $(ARCH) -tunnel.CFLAGS += -I$(SRC_LISA) -I$(ARCH) -DPERIPHERALS_AUTO_INIT -tunnel.CFLAGS += -DBOARD_CONFIG=$(BOARD_CFG) -tunnel.srcs += $(SRC_AIRBORNE)/mcu.c \ - $(SRC_ARCH)/mcu_arch.c \ - $(SRC_LISA)/tunnel_hw.c \ - $(SRC_ARCH)/stm32_exceptions.c \ - $(SRC_ARCH)/stm32_vector_table.c -tunnel.CFLAGS += -DUSE_LED -tunnel.srcs += $(SRC_ARCH)/led_hw.c -tunnel.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' -tunnel.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c diff --git a/conf/autopilot/lisa_passthrough.makefile b/conf/autopilot/lisa_passthrough.makefile index db6d59c17e..e4e7b33704 100644 --- a/conf/autopilot/lisa_passthrough.makefile +++ b/conf/autopilot/lisa_passthrough.makefile @@ -33,7 +33,7 @@ stm_passthrough.srcs += $(SRC_ARCH)/led_hw.c # Sys time stm_passthrough.CFLAGS += -DUSE_SYS_TIME -stm_passthrough.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC(1./512.)' +stm_passthrough.CFLAGS += -DPERIODIC_FREQUENCY='512.' stm_passthrough.CFLAGS += -DSYS_TIME_LED=1 stm_passthrough.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c diff --git a/conf/autopilot/rotorcraft.makefile b/conf/autopilot/rotorcraft.makefile index 14c4c3bd70..cd08e426e4 100644 --- a/conf/autopilot/rotorcraft.makefile +++ b/conf/autopilot/rotorcraft.makefile @@ -77,7 +77,7 @@ endif ifndef PERIODIC_FREQUENCY PERIODIC_FREQUENCY = 512 endif -$(TARGET).CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./$(PERIODIC_FREQUENCY).))' -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) +$(TARGET).CFLAGS += -DPERIODIC_FREQUENCY=$(PERIODIC_FREQUENCY) # # Systime # diff --git a/conf/autopilot/setup.makefile b/conf/autopilot/setup.makefile index 8b83ca87d0..6a95864cde 100644 --- a/conf/autopilot/setup.makefile +++ b/conf/autopilot/setup.makefile @@ -30,9 +30,12 @@ tunnel.srcs += mcu.c \ $(SRC_ARCH)/stm32_vector_table.c tunnel.CFLAGS += -DUSE_LED tunnel.srcs += $(SRC_ARCH)/led_hw.c -tunnel.CFLAGS += -DUSE_SYS_TIME -DSYS_TIME_LED=$(SYS_TIME_LED) -tunnel.CFLAGS += -DPERIODIC_TASK_PERIOD='SYS_TICS_OF_SEC(1./512.)' -tunnel.srcs += sys_time.c $(SRC_ARCH)/sys_time_hw.c +ifneq ($(SYS_TIME_LED),none) +tunnel.CFLAGS += -DSYS_TIME_LED=$(SYS_TIME_LED) +endif +tunnel.CFLAGS += -DPERIODIC_FREQUENCY='512.' +tunnel.CFLAGS += -DUSE_SYS_TIME +tunnel.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c endif diff --git a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile index 8e0ae66853..a40b082b65 100644 --- a/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile +++ b/conf/autopilot/subsystems/rotorcraft/fdm_nps.makefile @@ -68,7 +68,7 @@ ifeq ($(TARGET), sim) endif -sim.CFLAGS += -DPERIODIC_TASK_PERIOD='CPU_TICKS_OF_SEC((1./512.))' +sim.CFLAGS += -DPERIODIC_FREQUENCY='512.' #sim.CFLAGS += -DUSE_LED sim.srcs += mcu_periph/sys_time.c $(SRC_ARCH)/mcu_periph/sys_time_arch.c