mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-21 16:18:29 -04:00
AP_Bootloader: free few bytes of flash as bootloader build overflew on devices with 16k flash
This commit is contained in:
parent
017b267fee
commit
23757c249e
@ -37,7 +37,11 @@ extern "C" {
|
||||
int main(void);
|
||||
}
|
||||
|
||||
struct boardinfo board_info;
|
||||
struct boardinfo board_info = {
|
||||
.board_type = APJ_BOARD_ID,
|
||||
.board_rev = 0,
|
||||
.fw_size = (BOARD_FLASH_SIZE - (FLASH_BOOTLOADER_LOAD_KB + FLASH_RESERVE_END_KB + APP_START_OFFSET_KB))*1024
|
||||
};
|
||||
|
||||
#ifndef HAL_BOOTLOADER_TIMEOUT
|
||||
#define HAL_BOOTLOADER_TIMEOUT 5000
|
||||
@ -49,9 +53,6 @@ struct boardinfo board_info;
|
||||
|
||||
int main(void)
|
||||
{
|
||||
board_info.board_type = APJ_BOARD_ID;
|
||||
board_info.board_rev = 0;
|
||||
board_info.fw_size = (BOARD_FLASH_SIZE - (FLASH_BOOTLOADER_LOAD_KB + FLASH_RESERVE_END_KB + APP_START_OFFSET_KB))*1024;
|
||||
if (BOARD_FLASH_SIZE > 1024 && check_limit_flash_1M()) {
|
||||
board_info.fw_size = (1024 - (FLASH_BOOTLOADER_LOAD_KB + APP_START_OFFSET_KB))*1024;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user