AP_HAL: add a sanity check that we don't minimize features on a 2MB board

This commit is contained in:
Peter Barker 2022-10-11 14:57:05 +11:00 committed by Andrew Tridgell
parent 79b22a7ed8
commit 65558afa8f

View File

@ -325,3 +325,11 @@
#ifndef HAL_ENABLE_DFU_BOOT
#define HAL_ENABLE_DFU_BOOT 0
#endif
// sanity checks for the configuration. This can't test everything as
// the libraries can do their own definitions - but we can catch some
// things:
#if HAL_MINIMIZE_FEATURES && BOARD_FLASH_SIZE > 1024
#error "2MB board with minimize features?!"
#endif