Browse Source

HAL_ChibiOS: added option to limit size of bootloader

this will ensure our F4 bootloaders stay under 16k
mission-4.1.18
Andrew Tridgell 7 years ago
parent
commit
1c807e0078
  1. 3
      libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef-bl.dat
  2. 4
      libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

3
libraries/AP_HAL_ChibiOS/hwdef/revo-mini/hwdef-bl.dat

@ -13,6 +13,9 @@ STM32_PLLM_VALUE 8 @@ -13,6 +13,9 @@ STM32_PLLM_VALUE 8
FLASH_SIZE_KB 1024
# don't allow bootloader to use more than 16k
FLASH_USE_MAX_KB 16
USB_STRING_PRODUCT "ArduPilot-revo-BL"
# bootloader is installed at zero offset

4
libraries/AP_HAL_ChibiOS/hwdef/scripts/chibios_hwdef.py

@ -447,7 +447,9 @@ def write_mcu_config(f): @@ -447,7 +447,9 @@ def write_mcu_config(f):
def write_ldscript(fname):
'''write ldscript.ld for this board'''
flash_size = get_config('FLASH_SIZE_KB', type=int)
flash_size = get_config('FLASH_USE_MAX_KB', type=int, default=0)
if flash_size == 0:
flash_size = get_config('FLASH_SIZE_KB', type=int)
# space to reserve for bootloader and storage at start of flash
flash_reserve_start = get_config(

Loading…
Cancel
Save