Finally there is, and both cores can be debugged separately, and at the same time if desired, manual instructions are below:
To debug just the M4 Core in isolation:
1) Create a project for the Portenta H7 M4, and select this board
2) Add a custom launch.json to the project from vMicro > Add Code > Add Custom GDB Debugger (Advanced)
3) Select the Debug: Hardware, and then the Manual/Custom option
3) Overwrite the contents of the file with the ones attached (Example in ZIP\SingleCoreAtATime\PORTENTA_H7_M4.Debug.debugger_launch.json)
4) Amend the MIDebuggerPath, to match your GDB Location
5) Save the file, build and upload
6) Debug > Attach to process should now allow the M4 core to be debugged via the JLink and OpenOCD
Tip: The paths for GDB above can be obtained by trying to attach the debugger with the M7 board selected, and the JLink debugger option.
(See "Getting Current Settings" section on
this page)
If you want to debug both cores at the same time, then two instances of Visual Studio will need to be open, one for each project
1) Complete the process above on BOTH projects to add the custom JSON files, with path configurations, and the Manual/Custom option selected.
2) Remove the debugServerPath, and debugServerArgs elements from the M4 projects launch.json (Example in ZIP\DualCore)
3) Build and upload both projects
4) M7 Core Project: Debug > Attach to process (this spawns the shared OpenOCD instance in the background)
5) M4 Core Project: Debug > Attach to process (this latches onto the same instance of OpenOCD as above, for CPU1)
6) Stop debugging on the M4 core first, then the M7 core.
Hopefully this makes sense, and we will add configurations to allow this to work out of the box.