Browse Source

AP_Bootloader: add support for running from external flash

gps-1.3.1
Siddharth Purohit 4 years ago committed by Andrew Tridgell
parent
commit
fc4be3695f
  1. 8
      Tools/AP_Bootloader/bl_protocol.cpp

8
Tools/AP_Bootloader/bl_protocol.cpp

@ -251,9 +251,11 @@ jump_to_app() @@ -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() @@ -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…
Cancel
Save