From c450de6e96408cdfa300b05b9b21efa3fc85c14b Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Wed, 20 Mar 2024 21:30:18 +1100 Subject: [PATCH] AP_Periph: add assert that AP_CHECK_FIRMWARE_ENABLED is set --- Tools/AP_Periph/AP_Periph.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Tools/AP_Periph/AP_Periph.cpp b/Tools/AP_Periph/AP_Periph.cpp index 23e5efa92a..f02037e5a2 100644 --- a/Tools/AP_Periph/AP_Periph.cpp +++ b/Tools/AP_Periph/AP_Periph.cpp @@ -35,6 +35,13 @@ #define HAL_PERIPH_HWESC_SERIAL_PORT 3 #endif +// not only will the code not compile without features this enables, +// but it forms part of a series of measures to give a robust recovery +// mechanism on AP_Periph if a bad flash occurs. +#ifndef AP_CHECK_FIRMWARE_ENABLED +#error AP_CHECK_FIRMWARE_ENABLED must be enabled +#endif + extern const AP_HAL::HAL &hal; AP_Periph_FW periph;