About Licensing :: Learn more about our Licensing Model | Common Issues :: Solve Activation Problems
We Need Your Help:
The Portenta H7 M7 has support for an in-built debugger "Monitor for Remote Inspection" (MRI).
This can now be used out of the box in vMicro in a few simple steps, with no additional hardware.
Note:
This is available from vMicro versions 2021.0606.13 onwards, in conjunction with the "Arduino Mbed OS Portenta Boards" platform.
Simply connect your Portenta H7 M7 to your PC via the USB(C) cable as normal:
Ensure you have Visual Studio and the vMicro Extension Installed
Open your Sketch, and select the options from vMicro > Debugging as shown below:
NOTE - as the debugger uses the SerialUSB interface of the Portenta, you will have to remove all calls to Serial from your code. Alternatively use a seperate serial interface for your messages.
You will need to add a couple of additions to your sketch (also in output window on debugger select):
// Check we are using GDB Debugging and include the additional code #ifdef VM_DEBUG_GDB #include "ThreadDebug.h" UsbDebugCommInterface debugComm(&SerialUSB); ThreadDebug threadDebug(&debugComm, DEBUG_BREAK_IN_SETUP); // Set to DEBUG_NO_BREAK_IN_SETUP to prevent automatic stop in setup #endif setup(){} loop(){}
Congratulations - you should have the debugger running, and further windows can be opened from the "Debug > Windows" menu once you have started debugging
See our GDB Debugging in Brief guide, or our detailed GDB Debugging Tutorial for Arduino to learn more about using the debugging interface.
There is also a video guide on this below:
The Portenta H7 now has support in vMicro for the Segger JLink for both the M7 and M4 Cores.
This can now be used out of the box in vMicro in a few simple steps.
This is fully available from vMicro versions 2021.1108.06 onwards, in conjunction with the "Arduino Mbed OS Portenta Boards" platform.
External Debug Interface: SWD
To connect your JLink probe to the Portenta Breakout Board you will need to connect the below pins:
Then you will also need to connect your Debugger to the PC on one USB port, and the Portenta H7 on another USB Port
Open your Sketch and select the Debug > Hardware, and the Segger J-Link Debugger (NOT the "NoOpenOCD version)
You will need to install an additional USB Driver on Interface 0 of your debugger to allow it to function with this software - check in the debugger list here
Remember - If you have installed a new driver, you may have to do it again if you connect the debugger to a different USB port next time.....
This can also be used to debug BOTH cores simultaneously using two instances of Visual Studio and a shared instance of OpenOCD.
Then you will also need to connect your Debugger to the PC on one USB port, and the Portenta H7 on another USB Port.
Open your M7 Core Sketch and select the Debug > Hardware, and the Segger J-Link Debugger (NOT the "NoOpenOCD version)
Ensure you have the bootM4() call in the setup of your M7 Core sketch.
Build and upload your M7 Sketch to the M7 core at this point.
Open your Sketch and select the Debug > Hardware, and the Segger J-Link Debugger (NoOpenOCD)
Build and upload your M4 Sketch to the M4 core at this point.
First start debugging using the M7 Core sketch by using "Debug > Attach to Process".
Then start debugging using the M4 Core sketch by using "Debug > Attach to Process".
Congratulations - you should have the debugger running for both cores, and further windows can be opened from the "Debug > Windows".
Ensure you stop debugging on both instances of Visual Studio, and reset the board using the reset button to make it available for debugging again.
The Portenta H7 now has support in vMicro for the STMicroElectronics STLink v1/2/3 for the M7 Cores only.
This is fully available from vMicro versions 2024.1211.09 onwards, in conjunction with the "Arduino Mbed OS Portenta Boards" platform.
To connect your STLink probe to the Portenta Breakout Board you will need to connect the below pins:
Open your Sketch and select the Debug > Hardware, and the STLink v1/2/3 Debugger.
You will need to install an additional USB Driver on the "STM32 STLink" Device to allow it to function with this software - check in the debugger list here
This web site uses ASPNet Session cookie and Google tracking. Please read our privacy policy for more information.