 Hello and welcome to the STM32 QBiD Edge Event Debug Features. I'm Bruno and I'll be your host for this video series. This is our agenda. So we are going to start covering the awesome features that we have for the editor on the QBiD. Then we are going to move and cover a little bit about how the debug interfaces are offered throughout all the Cortex-M series. And then we are diving a little bit on what is the Serial Wire Viewer. What are the requirements that we need in terms of hardware. And then of course the actual debug session using the Serial Wire Viewer. Alright, so let's get started with the STM32 QBiD Awesome Editing Features. When you open the project for the first time, these are the options available. Start a new project. Import from several different sources, including the .ioc file, which is the extension file from the STM32 Cubamax, or import from an example available in our repository folder, or import from another tool chain, such as the True Studio or the System Workbench for STM32. And as you can expect, you have full editor capacitor over the .ioc file. Here you can see the navigation part of the editor. I find myself using these features pretty often, so I want to point it out to you. The one that I use the most is the symbol hyperlink that leads you to the definition of the code by pressing CTRL-AFT-CLICK. So you can easily see what is the code definition, or even the entire function source code, all with a single shortcut. The brace navigation will allow you to easily check where the statements start and ends, and it's really useful when you are not using the tabby indentation in your code. The other one is the include browser. So this one will allow you to see which header files are called from the first include that you added. And finally we have the hierarchy call. This one will actually allow you to see which functions are called from the original one. As writing editing capabilities, we have a lot of features that will give clear view on the code and easy to type in. Starting with the highlight inactive code. As you can see, the code that is not part of the current project settings will have the great highlight, thus making it simple to see what are the parts being compiled and used. The file diff and compare features is kind of self-explanatory, as it will allow the developer to check the difference between files. The autocomplete is actually one of the most useful writing capabilities, as it will lease all the possible entries while pressing CTRL-PLUS-SPACE, and this will avoid typos with a brand lowercase and save a lot of time. The syntax highlight will give a clear view of the elements of a structure. This, along with the autocomplete, is a powerful way to quickly fuel all the parameters of your code. And finally, the debug part of the tool. When selecting the debugger-hardware interface, the Q by D actually supports two different tools, a ceiling, which can be used either with the GDB server or with the OpenLCD, and the J-Link. Both will have the option to either use SWD or the JTAG as the programming and debug interface. But not only that, the Q by D will also support the dual-core debugging, such as some micros from the STM3287 series, and also different programs. So, for example, you can play with a TX board and an RX board, both being debugged at the same time, so you can ensure that the communication between both boards are working. Another really useful feature is the external memory loader, as it offers a very comprehensive list of external memories with the drivers you programmed them already done, and of course, you can customize it for your own hardware, so you can create your own board support package for that. This makes it really simple to debug projects that are using external flash memories. And finally, we have our trace support, which will be the core for our hands-on video sessions. The trace is done using the serial-wire viewer, associated with the serial-wire output, an extra pin that can be added in the SWD interface. Once that is enabled, the trace will grant the user many features that will be covered shortly. So, let's check what are the debug interfaces available for each Cortex-M core. Here we can see all the STM32 possible debug interfaces. So, for our Cortex-M and M0-plus products, we only allow the SWD interface, even though that by default with the ARM, these particular core sets can actually have the G-TAG. On our product line, only the serial-wire debug interface is available. For all others, including the Cortex-M3, M4, M33, and M7, they all have both interfaces available, so that means that they have the G-TAG and also the serial-wire debug, the SWD interface. The SWD is a debug port very similar to the G-TAG and provides the same debug capabilities, like run, stop, non-breakpoint, single-step, but it actually uses fewer pins. And it replaces the G-TAG connector with just the two pin interfaces, one for clock and one for bi-directional data. So, when it comes to the trace capability of the cores, the Cortex-M0 and M0-plus will not have the serial-wire output for us, but the Cortex-M3 are higher. They all will have, which actually enables us to use the serial-wire viewer. The SWD port itself does not provide the real-time tracing, but by adding the serial-wire output SWO pin that can be used in combination with the SWD and used by the processor to emit real-time trace data, thus extending the two SWD pins with a third one. So, after mentioning a few times, what is the serial-wire viewer? So, as we saw, the serial-wire viewer will actually be a combination of the SWD port associated with the SWO pin, thus giving us real-time trace. And, of course, this is what I'm calling the advanced debugging because without howling the MCU, we are going to be able to make plots of any given internal trace that we are monitoring. We are going to be able to trace all the global variables and plot graphics. We can log everything on our serial-wire viewer console using the ITM. And, of course, we can monitor all the exceptions, such as interval services, routines that are happening in our code, all that without howling the MCU with any breakpoints. And here we have the entire list of things that we can actually monitor with the icons that are available when we enter in the debug session of our QBid. So, we can use the data trace to do live-watch. We can use the data trace to plot in a timeline graph. We can use the SWO interface to do a printf redirection. So, instead of using a new art port, we can actually use to transmit information of the printf using through the SWO pin. We can do time measurement between events. So, all we have to do is trace using the ITM and that will be logged. And, of course, we can also plot that over time. And we can do the statistical proofing, allowing us to understand where the core is spending more time. During our hands-on session video, we are going to cover each and every one of these features. Now, what are the hardware requirements? Well, the great news is that pretty much every evaluation board that we have can be used as long as we are meeting the requirements on our checklist. So, first, you need to make sure that your Cortex-M is actually either one Cortex-M3 or M4, M33 or M7, because those are the Cortex that have the trace macro cell. So, we can use the COWIRE output pin. And we also need to make sure that we are using either the ST-Link that comes along with the nuclear boards and the discover boards, or we are using the J-Link. And then, what is left for us is to start coding. So, that was it for our introduction video. I'll see you guys in the next one for the coding part of it. And don't forget to like and subscribe the video in our channel. For more information, always visit ST.com. Thank you!