How to debug applications for a multi-core System on Chip

nRF Connect for VS Code

tags
nRF Connect for VS Code

Important

The extension does not yet support debugging of nRF54H Series devices.

If you are using a multi-core (multi-domain) System on Chip (SoC) and want to debug the firmware on all cores or domains simultaneously, you need to start separate debugging sessions, one for each core or domain. If you want to debug a single-core SoC or only debug the application core firmware, one debugging session is enough.

To debug an SoC that contains several cores or domains, complete the following steps:

  1. Check that the cores or domains that you want to debug have the debug optimizations enabled.

    Note

    For multi-domain applications built with sysbuild, each sysbuild domain can have its own debug optimizations enabled independently. See How to debug domains for more information.

  2. In the Applications View, select the top build configuration of your multi-core (multi-domain) application.

    Application's top build configuration selected in the Application's View

  3. In the Actions View, click Debug.
    A quick pick appears where you can select the cores (domains) to debug.

    Quick pick for selecting domains to debug

  4. Select the domains to debug and click OK.
    The extension programs the connected device with each of the images and opens the Debugging View. Once all sessions are established, the debugging control widget lists entries for all selected domains.

    Debugging control widget

    At the same time, Run and Debug in the Activity Bar displays the number of the active debugging sessions.

    Active debugging sessions

  5. Launch the debugging on the application core.
    The startup code releases the signal to start the cores or domains and allocates the necessary GPIO pins for it.

  6. Launch code execution on the other core or domain.

If you want to reset a core or domain while debugging, make sure to first reset the application core and execute the code.