 So let's start with the step number zero in the end. So we will create a project without an operating system just to show you an overview of the cube ID. So let's start. I'm going to switch my shared monitor. So I'm going to show directly the cube ID. If you have an external monitor, I can ask you to use it. So you can take your monitor of the PC to the presentation, to my sharing, and then use the external monitor for the cube ID. Okay, let's start. So let's open the cube ID and then start with the project. So let's go to File, New, STM32 Project. It takes a while because it goes to listing the available platform. Here you can see our target selection. So the first tab is about the MCU and MPU selector. I mean, this is mostly related to your final application when you have your PCB. You can directly select the part number of the STM32 that you will go to use. For our training, we will use the tab number two, the board selector. Here you can find all of the supported board released by STM32. I'm talking about the evaluation kit. I'm talking about the discovery kit. And I'm talking also about the nuclear board, the nuclear one in the middle, the white one. To find the nuclear, to find any board in the end or any part number, you can simply type a few characters of the part number. In this case, we can type a nuclear STM32 H723 or directly H72. And you will be able to find the only nuclear board that is integrating the STM32 H723. So select the nuclear. On the table on the right, select again the line with the nuclear, and then click next. The other two tabs here are for example selector. If you are interested on some specific example or some specific peripheral or some specific feature, you can use the text box and type what you are looking for. So click next here. Okay. A pop-up will appear. You can simply add the project name. So you can use any string you like. I will use LED underscore toggle. No restriction, so you can use whatever string you like. Type next. And that's it. You don't have to select any or to change any feature respect to the default one. I only ask you to pay attention to the version 1.9.0 of the cube firmware for H7. So this is the default package here, and this is the package that you should have already been installed. This is one of the prerequisites for this workshop. Here click finish. A pop-up will appear. Installize all peripherals with the default mode. Click yes. This will allow the tool not only to set up the peripheral of the nuclear board, so the button, the led, and so on, but also to enable it. So once done, the project is ready for the usage of the led and the button and the peripheral in general way. So click yes here. It will take a while. Okay. So this is the result of the project creation. Let's take a look at the resulting. So on the left part of the screen, you have the project explorer, and without the operating system, the project explorer only includes two folders, a driver folder with the driver, the low level driver, the HIL driver, so the hardware instruction layer for the STM32H7 here, and another subfolder for the CMCs, so for the core for the arm. The second folder, and obviously the driver folder should not be modified, because those are drivers. The most important folder here is the core folder, and in particular the source subfolder with our main.c file. Double click on it, so we were able to open it. On the central part of the screen, we have the main.c that we just opened, but we have also the led toggle, so the project name dot IOC file. The IOC file is the project file related to the cube MX. So the STM32 cube MX, the graphical user interface that allows you to configure the STM32, the peripheral, the software pack, and so on, generate a project IOC file, and you are able also to work with it inside the cube either, like we are doing right now. The tool is a graphical tool, the cube MX is a graphical tool, so you can, for example, browse to the peripheral, you can click on the STM32 and drag and drop, you can use the mouse wheel to zoom in, to zoom out, and so on. For example, take a look at PB0. PB0 is directly configured as led underscore green, and this is the one that we will going to use for our session in the morning. On the left part of this screen, you can see also the list of the STM32, grouped by categories, so system core, analog, timer, and so on, or simply listed in alphabetical order, A to Z. In the upper part, you will have also, not only the pinout and configuration, but you have also the clock configuration. We will have also the tab related to the project manager. On the project manager, you are able to define your workspace, you can define your tool chain, in this case, the cube ID, but you can select also K, L, Y, or whatever. You have also advanced setting, you have code generator, for example, to create every peripheral as a pair of C or H5. And the last tab is about tool. For example, for the battery lifetime estimation, you can set up your preferred battery and take a look at the resulting of the lifetime. So let's come back to the main.c file. This is the entry point of the project, always with or without an operating system. On the main file, on the main function, in main void, you will have a setup stage with the initialization of the peripheral, so the hardware spatial layer in it. You will have the initialization of the system core, so the clock tree and so on. You will have one by one the initialization of all of the peripheral used on our platform. In this case, if you remember, we started with a board selector and not with an MCU selector. Working with a board selector, we have already some peripheral configured on the Nucleo. So you have the Ethernet, you will have the UART, so the virtual com, and you will have also the USB OTG high speed. We will use in this session in the morning only the GPIO in it in the end because we are only going to use with a LED. And finally, the wild truth, the wild one. This is the real execution loop of our bare metal implementation without the operating system, and this is where we are going to work. Before moving on, I kind of ask you to pay attention to the code implementation. I mean, if you take a look at here at the main.c file, you will find, okay, the comment, but you will find also a lot of begin and directive in comment mode. This is because every time you change the project configuration through the cube and mix, so through the toggle EOC file in this case, and you will generate the project, generate the source file, regenerate the source file, everything outside begin and end comments will be deleted. So please always be sure to put your code inside the begin and end comments. In this case, we will put our source code here at line 131 here. So in this case, we will be sure that even after regenerating the project with the cube and mix, our source code will be here again. So let's go into the only two lines that are needed for our training in this stage, so without the operating system, line number one, the GPIO toggling, line number two, adding a delay because without a delay, you will not able to see the resulting of the toggling because you are in a while through. So without the delay, you will see the lead always on. So first instruction is the AL GPIO toggle pin. You can use the cheat sheet. You can use the PDF to copy paste or you can simply type. I'm going to type using the auto-completion feature of the tool of the cube ID. So HAL underscore GPIO, for example. Let's press now control plus space bar. So control plus space. You will see here the list of all of the hardware related to GPIO starting with the GPIO. So for example, the unit, the external interrupt callback, the lock pin, red pin, toggle pin. Here, this is the one we need. Click on the toggle pin. You will see here that two arguments are required. The port and the pin. We saw that is port B and pin 0. But since we created it by cube MX, we already have some label associated with this GPIO PB0. So again, lead underscore green underscore control space. You will have here the port and the pin. The first parameter is the ports. Okay. And the second one is the pin. So select again, lead underscore green pin. And we have done. So we are in C, so same column. Type enter. And after that, the second instruction. The second instruction is about the delay. So again, HIL underscore delay control space. Okay. With the control space, you will see that the only argument, the only parameter is a delay and an assigned integer 32 bit. This is the quantity of millisecond needed for the delay. So parentheses and then millisecond. You can use whatever timing you prefer. Not so short. Otherwise, you will not be able to see the lead toggling. We will use one second. So 1000 millisecond. After that, we finished our setup for our code generation for the bare metal implementation. We need now to save the project. So click on the floppy disk image or control S. And now you need to build the project. So click on the hammer or simply control B. And then the compilation will start. This is the very first compilation. So all of the HIL file will be compiled. It will take a while, depending on the performances of your PC. I'm using an octa core, so it took only one second. So after that, we have done the project as being, let's say, converted from a C file to an X file. And then let's go to flash the board. Before flashing the board, you need to attach the board to the PC. If you take a look at the board at the nuclear 144, you will find two, let's say, two STM32, two big chip. The one in the middle is our target, the H723. The one on the top of the board, so on the opposite side of the Ethernet or the Ethernet connector, is the ST-Link. You need to attach a micro USB cable to that side of the board, to the side where you have the ST-Link V3. It's the connector number one, CN1. The other side, obviously, of the cable will be attached to the PC. Let's see the result. Okay. Now let's go to flash the board. Let's go in the bug, for example. So I can show you also the debug feature. Click on the bug. Debug As. Select STM32 Cortex-M CC++ application. A pop-up will appear. You don't need to, let's say, to change anything. Let's go with the default feature, with the default setup. Click OK. Okay. You can see on the control what's happening. So the connection with the ZDB server and so on. Okay. The board has been flashed. The code is, let's say, stuck at the start of the main. We need to run it to allow the execution and the free flow, let's say. Click on the Play Resume button, or type F8, and you should see your LED toggling with a two-second period. So one second uptime and one second downtime. So congratulations, you flashed your first STM32 project. Now let's go with the second part, the most interesting one. So let's go to replicate this behavior, but with the operating system.