diff --git a/libraries/AP_HAL_ChibiOS/system.cpp b/libraries/AP_HAL_ChibiOS/system.cpp index 037dbd91ff..70b6b5b31d 100644 --- a/libraries/AP_HAL_ChibiOS/system.cpp +++ b/libraries/AP_HAL_ChibiOS/system.cpp @@ -26,6 +26,12 @@ #include "hal.h" #include +#if CH_CFG_ST_RESOLUTION == 16 +static_assert(sizeof(systime_t) == 2, "expected 16 bit systime_t"); +#elif CH_CFG_ST_RESOLUTION == 32 +static_assert(sizeof(systime_t) == 4, "expected 32 bit systime_t"); +#endif + extern const AP_HAL::HAL& hal; extern "C" {