diff --git a/libraries/AP_HAL_ChibiOS/hwdef/common/chconf.h b/libraries/AP_HAL_ChibiOS/hwdef/common/chconf.h index f673dcc4b9..d71f13ea41 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/common/chconf.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/common/chconf.h @@ -708,8 +708,10 @@ extern "C" { * @brief Threads descriptor structure extension. * @details User fields added to the end of the @p thread_t structure. */ +#ifndef CH_CFG_THREAD_EXTRA_FIELDS #define CH_CFG_THREAD_EXTRA_FIELDS \ /* Add threads custom fields here.*/ +#endif /** * @brief Threads initialization hook. diff --git a/libraries/AP_HAL_ChibiOS/hwdef/include/network_bootloader.inc b/libraries/AP_HAL_ChibiOS/hwdef/include/network_bootloader.inc index 67dbc2df63..0703f3397a 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/include/network_bootloader.inc +++ b/libraries/AP_HAL_ChibiOS/hwdef/include/network_bootloader.inc @@ -20,3 +20,5 @@ EXT_FLASH_SIZE_MB 0 # don't combine sdcard bl and network bl undef AP_BOOTLOADER_FLASH_FROM_SD_ENABLED + +define CH_CFG_THREAD_EXTRA_FIELDS struct ch_thread *delete_next;