mirror of https://github.com/ArduPilot/ardupilot
AP_Bootloader: add support for running from external flash
This commit is contained in:
parent
35df1b1bd3
commit
fc4be3695f
|
@ -251,9 +251,11 @@ jump_to_app()
|
|||
return;
|
||||
}
|
||||
|
||||
#if !EXTERNAL_PROG_FLASH_MB // its very likely to happen when using external flash
|
||||
if (app_base[1] >= (APP_START_ADDRESS + board_info.fw_size)) {
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAL_USE_CAN == TRUE || HAL_NUM_CAN_IFACES
|
||||
// for CAN firmware we start the watchdog before we run the
|
||||
|
@ -271,6 +273,12 @@ jump_to_app()
|
|||
|
||||
led_set(LED_OFF);
|
||||
|
||||
// If we have QSPI chip start it
|
||||
uint8_t* ext_flash_start_addr;
|
||||
if (!ext_flash.start_xip_mode((void**)&ext_flash_start_addr)) {
|
||||
return;
|
||||
}
|
||||
|
||||
// resetting the clocks is needed for loading NuttX
|
||||
#if defined(STM32H7)
|
||||
rccDisableAPB1L(~0);
|
||||
|
|
Loading…
Reference in New Issue