Bootloader in flash and hwdef

I’m not sure if this is the right place to ask; I am a newbie to ardupilot and want some help with these as I’m trying to write hwdef and hwdef-bl

FLASH_BOOTLOADER_LOAD_KB

FLASH_RESERVE_START_KB

STORAGE_FLASH_PAGE

What does each of these mean practically
I get the idea, but what does it practically mean for the bootloader and firmware?

For example, if I were to say

FLASH_BOOTLOADER_LOAD_KB 16

Does that mean to reserve 16 kb for bl in flash or fit the bl within 16kb?

Secondly, if I were to start the firmware at 64kb point, and STORAGE_FLASH_PAGE is at 32kb, bl being ~14kb, should I keep FLASH_BOOTLOADER_LOAD_KB 16 or 64?

Hi @Red_xvi,

I don’t know the answer but I suspect some of the other devs do know

FYI @andyp1per @hwurzburg @tridge @peterbarker

FLASH_BOOTLOADER_LOAD_KB

where the bootloader puts the main firmware

FLASH_RESERVE_START_KB

The amount of flash reserved by the main firmware for the bootloader, so these two need to agree

STORAGE_FLASH_PAGE

page number of parameter flash storage.
Everything needs to be in multiples of pages.

1 Like