diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py index 1e72c8b9129edc..92d4c95feebfe5 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py @@ -989,7 +989,6 @@ def write_mcu_config(self, f): f.write('#define HAL_USE_SDC FALSE\n') self.build_flags.append('USE_FATFS=no') self.env_vars['WITH_LITTLEFS'] = "1" - self.env_vars['DISABLE_SCRIPTING'] = True else: f.write('#define HAL_USE_SDC FALSE\n') self.build_flags.append('USE_FATFS=no') diff --git a/libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_normal.h b/libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_normal.h index 82d108d9024bda..b372cbac0053e6 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_normal.h +++ b/libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_normal.h @@ -11,13 +11,18 @@ #endif // a similar define is present in AP_HAL_Boards.h: +// needed to compile chibios #ifndef HAL_OS_FATFS_IO #define HAL_OS_FATFS_IO 0 #endif +#ifndef HAL_OS_LITTLEFS_IO +#define HAL_OS_LITTLEFS_IO 0 +#endif + #ifndef AP_TERRAIN_AVAILABLE // enable terrain only if there's an SD card available: -#define AP_TERRAIN_AVAILABLE HAL_OS_FATFS_IO +#define AP_TERRAIN_AVAILABLE HAL_OS_FATFS_IO || (HAL_OS_LITTLEFS_IO && (BOARD_FLASH_SIZE>1024)) #endif #if AP_TERRAIN_AVAILABLE