AP_HAL_ChibiOS: add app start offset to leave space for params

This commit is contained in:
Siddharth Purohit 2020-08-24 02:25:53 +05:30 committed by Peter Barker
parent 22ab426cf2
commit 882c86c394
5 changed files with 12 additions and 4 deletions

View File

@ -4,7 +4,10 @@
MCU STM32F103 STM32F103xB
FLASH_RESERVE_START_KB 0
FLASH_BOOTLOADER_LOAD_KB 25
FLASH_BOOTLOADER_LOAD_KB 23
# reserve some space for params
APP_START_OFFSET_KB 2
# board ID for firmware load
APJ_BOARD_ID 1000

View File

@ -3,7 +3,7 @@
# MCU class and specific type
MCU STM32F103 STM32F103xB
# bootloader starts firmware at 25k
# bootloader starts firmware at 23k + 2k (STORAGE_FLASH_PAGES)
FLASH_RESERVE_START_KB 25
# store parameters in pages 23 and 24

View File

@ -4,7 +4,10 @@
MCU STM32F303 STM32F303xC
FLASH_RESERVE_START_KB 0
FLASH_BOOTLOADER_LOAD_KB 26
FLASH_BOOTLOADER_LOAD_KB 22
# reserve some space for params
APP_START_OFFSET_KB 4
# board ID for firmware load
APJ_BOARD_ID 1004

View File

@ -3,7 +3,7 @@ g# hw definition file for processing by chibios_pins.py
# MCU class and specific type
MCU STM32F303 STM32F303xC
# bootloader starts firmware at 26k
# bootloader starts firmware at 22k + 4k (STORAGE_FLASH)
FLASH_RESERVE_START_KB 26
# store parameters in pages 11 and 12

View File

@ -689,6 +689,8 @@ def write_mcu_config(f):
if args.bootloader:
f.write('#define FLASH_BOOTLOADER_LOAD_KB %u\n' % get_config('FLASH_BOOTLOADER_LOAD_KB', type=int))
f.write('#define FLASH_RESERVE_END_KB %u\n' % get_config('FLASH_RESERVE_END_KB', default=0, type=int))
f.write('#define APP_START_OFFSET_KB %u\n' % get_config('APP_START_OFFSET_KB', default=0, type=int))
f.write('\n')
ram_map = get_mcu_config('RAM_MAP', True)