dakejahl opened a new pull request, #22076: URL: https://github.com/apache/nuttx/pull/22076
*Note: Please adhere to [Contributing Guidelines](https://github.com/apache/nuttx/blob/master/CONTRIBUTING.md).* ## Summary Adds a weak `stm32_preclock_hook()` that the STM32H7 `__start` calls right before `stm32_clockconfig()`, once `.data` and `.bss` are in place. A bootloader that hands over to the ROM's DFU bootloader has to do it while the chip is still as reset left it. By the time the bootloader's main runs, NuttX has set up clocks, caches, the MPU and USB. PX4's bootloader uses the hook for `reboot -i` (PX4/PX4-Autopilot#29914). ## Impact STM32H7 only. Nothing changes for boards that don't define the hook: it is a weak symbol, so the call is skipped. ## Testing Host: Ubuntu 24.04, arm-none-eabi-gcc 13.2.1. The same change is PX4/NuttX#452 on PX4's NuttX 12.12 branch. On an ARK FPV (STM32H743, rev V) running PX4 with a bootloader that defines the hook, `reboot -i` reached the ROM's DFU bootloader in 10 of 10 runs. Each run looked like this on the host: ``` usb 1-5.4.4.3.4.4: New USB device found, idVendor=0483, idProduct=df11, bcdDevice= 2.00 usb 1-5.4.4.3.4.4: Product: DFU in FS Mode usb 1-5.4.4.3.4.4: Manufacturer: STMicroelectronics ``` Normal boots of the same bootloader and app were unchanged. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
