From 8ac38d73f7367c7b748d55b7663cd7a553e2c0d6 Mon Sep 17 00:00:00 2001 From: Siddharth Purohit Date: Wed, 19 Sep 2018 02:31:55 +0530 Subject: [PATCH] HAL_ChibiOS: add option for NO_FASTBOOT build and enable it for iomcu --- libraries/AP_HAL_ChibiOS/hwdef/common/halconf.h | 2 +- libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c | 4 ++-- libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/halconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/halconf.h index bf66f9bab2..31e267e4d5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/halconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/halconf.h @@ -147,7 +147,7 @@ * @brief Enables the RTC subsystem. */ #if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC TRUE +#define HAL_USE_RTC FALSE #endif /** diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c index 084fc0379a..9b29ecb0cf 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/stm32_util.c @@ -219,7 +219,7 @@ uint32_t get_fattime() return fattime; } -#if defined(HAL_USE_RTC) && HAL_USE_RTC +#if !defined(NO_FASTBOOT) // get RTC backup register 0 static uint32_t get_rtc_backup0(void) { @@ -253,7 +253,7 @@ void set_fast_reboot(enum rtc_boot_magic v) set_rtc_backup0(v); } -#endif //HAL_USE_RTC +#endif //NO_FASTBOOT /* enable peripheral power if needed This is done late to prevent diff --git a/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat index b2b49908ac..15f0cc066d 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/iomcu/hwdef.dat @@ -98,7 +98,7 @@ define NO_DATAFLASH TRUE define DMA_RESERVE_SIZE 0 define IOMCU_FW TRUE - +define NO_FASTBOOT IOMCU_FW 1 MAIN_STACK 0x200 PROCESS_STACK 0x250 \ No newline at end of file