AP_HAL_ChibiOS: terrain turned on on 2Mb boards with littlefs

This commit is contained in:
Andy Piper 2024-12-11 20:10:03 +00:00 committed by Andrew Tridgell
parent b556ffd1e0
commit 1abe46e923
2 changed files with 6 additions and 2 deletions

View File

@ -989,7 +989,6 @@ class ChibiOSHWDef(object):
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')

View File

@ -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