Skip to content

Commit

Permalink
AP_HAL_ChibiOS: terrain turned on on 2Mb boards with littlefs
Browse files Browse the repository at this point in the history
  • Loading branch information
andyp1per committed Dec 11, 2024
1 parent de8c3e2 commit 2524560
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 0 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
7 changes: 6 additions & 1 deletion libraries/AP_HAL_ChibiOS/hwdef/scripts/defaults_normal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2524560

Please sign in to comment.