FLASH Hotpatching Support

Debugging the code running from the FLASH memory using conventional tools imposes a few limitations on it:

  • The maximum number of breakpoints in the FLASH code is limited by the hardware breakpoint unit (typically to 6 or 8 breakpoints).
  • Live tracepoints that record variable values without stopping the program, can only be set and removed before starting the debug session.

To work around these limitations, VisualGDB supports FLASH hotpatching plugins. These plugins seamlessly patch the target FLASH memory to insert a software breakpoint, or a tracepoint without restarting the debug session.

The FLASH hotpatching is supported out-of-the-box for the following device families:

  • STM32
    • STM32F0x/STM32F1x/STM32F3x
    • STM32F2x/F4x
    • STM32F7x
    • STM32L0x
    • STM32L1x
    • STM32G4x/STM32L4x
    • STM32G0x
    • STM32L5x/STM32U5x
    • STM32WBx/STM32WLx
    • STM32H5x
    • STM32H7x

If your device is not listed above, consider one of the following options:

  • Try using Segger J-Link. It provides its own FLASH patching mechanism.
  • Contact us with the details about your device. We are actively developing new FLASH patching plugins and might have a pre-release version for your device.
  • Consider browsing our open-source FLASH patcher repository and making a plugin for your device based on one of the existing plugins.