From aaf6632a2229eb73a21ea30e07cd8a6b1ec04dcc Mon Sep 17 00:00:00 2001 From: Peter van der Perk Date: Wed, 5 Nov 2025 18:30:20 +0100 Subject: [PATCH] imxrt: move teensy bootloader to normal bootloader Best for teensy is to use the teeny as normal bl --- .../nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp b/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp index 85236a00e6..632180f412 100644 --- a/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp +++ b/platforms/nuttx/src/px4/nxp/imxrt/board_reset/board_reset.cpp @@ -65,9 +65,13 @@ 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; modifyreg32(IMXRT_SNVS_LPCR, 0, SNVS_LPCR_GPR_Z_DIS); putreg32(regvalue, PX4_IMXRT_RTC_REBOOT_REG_ADDRESS); +#endif return OK; } @@ -78,9 +82,7 @@ int board_reset(int status) } else if (status == REBOOT_TO_ISP) { -#ifdef BOARD_HAS_TEENSY_BOOTLOADER - asm("BKPT #251"); /* Enter Teensy MKL02 bootloader */ -#elif defined(BOARD_HAS_ISP_BOOTLOADER) +#ifdef BOARD_HAS_ISP_BOOTLOADER uint32_t arg = 0xeb100000; ROM_API_Init(); ROM_RunBootloader(&arg);