mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 18:03:34 +08:00
imxrt: move teensy bootloader to normal bootloader
Best for teensy is to use the teeny as normal bl
This commit is contained in:
committed by
Daniel Agar
parent
24572cf358
commit
aaf6632a22
@@ -65,9 +65,13 @@
|
|||||||
|
|
||||||
static int board_reset_enter_bootloader()
|
static int board_reset_enter_bootloader()
|
||||||
{
|
{
|
||||||
|
#ifdef BOARD_HAS_TEENSY_BOOTLOADER
|
||||||
|
asm("BKPT #251"); /* Enter Teensy MKL02 bootloader */
|
||||||
|
#else
|
||||||
uint32_t regvalue = BOOT_RTC_SIGNATURE;
|
uint32_t regvalue = BOOT_RTC_SIGNATURE;
|
||||||
modifyreg32(IMXRT_SNVS_LPCR, 0, SNVS_LPCR_GPR_Z_DIS);
|
modifyreg32(IMXRT_SNVS_LPCR, 0, SNVS_LPCR_GPR_Z_DIS);
|
||||||
putreg32(regvalue, PX4_IMXRT_RTC_REBOOT_REG_ADDRESS);
|
putreg32(regvalue, PX4_IMXRT_RTC_REBOOT_REG_ADDRESS);
|
||||||
|
#endif
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -78,9 +82,7 @@ int board_reset(int status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
else if (status == REBOOT_TO_ISP) {
|
else if (status == REBOOT_TO_ISP) {
|
||||||
#ifdef BOARD_HAS_TEENSY_BOOTLOADER
|
#ifdef BOARD_HAS_ISP_BOOTLOADER
|
||||||
asm("BKPT #251"); /* Enter Teensy MKL02 bootloader */
|
|
||||||
#elif defined(BOARD_HAS_ISP_BOOTLOADER)
|
|
||||||
uint32_t arg = 0xeb100000;
|
uint32_t arg = 0xeb100000;
|
||||||
ROM_API_Init();
|
ROM_API_Init();
|
||||||
ROM_RunBootloader(&arg);
|
ROM_RunBootloader(&arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user