Keil Logo


The pre-defined function OnResetExec() is executed after reset via the µVision reset button.

It allows to add specific functionality that is required after reset to setup the debugger. For example, it allows to setup a BUS system for access to off-chip memory or peripherals. Create the function as explained on the page User Functions.


FUNC void OnResetExec(void) {
  // TODO: Insert functionality to execute after reset via uVision reset button


The function is only available for Cortex-M target debugging

Refer to OnStopAfterReset for a similar function when a stop after reset has been detected.

  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.