 Ciao a tutti e benvenuti a questo video tutorial on how to get started with Azure Arthos expansion package from ST. Mi nome è Massimo Panzica, principal application engineer at ST in microcontroller division. Let's get started. Well, after a very short introduction to our STM32 Cubico system and this new NTD Azure Arthos Middleware, we're gonna see what this package is about and how it's fully integrated into STM32 Cube MX. And this is gonna be the fun part, we'll see how to get started creating our first Azure Arthos project for STM32 H7. Also, we're gonna show all the relevant resources and co-laterals in order for you to easily move on with your own Azure Arthos projects. If you are not yet familiar with our STM32 Cube, this software ecosystem for STM32 microcontrollers is made and supported by ST and is completely free of charge for all the STM32 developers. We do offer a complete set of C software tools for initial project configuration and congeneration, STM32 Cube MX, for development and debugging, STM32 Cube IDE, for programming and option byte configuration, STM32 Cube Programmer and for long term and non-intrusive application monitoring, STM32 Cube Monitor. All our tools are available for Windows, Linux or Mac OS operating systems. Compliment to PC tools are the STM32 Cube MCU packages that for each individual STM32 series include hardware abstraction layer, low-level drivers and middlewares. On top of it, STM32 Cube expansion packages are additional sets of middlewares or examples for STM32. With Microsoft Azure Arthos integration in our ecosystem, our middleware offer is going to change and improve. We are going to move our main operating system offer from free Arthos to Azure Arthos ThreadX. FileX will become our primary offer for file system and will replace the existing FATFS. Azure Arthos NetX Duo will replace low-IP middleware for TCP-IP and Azure Arthos USB X will replace ST USB device and host libraries for USB. That said, our legacy middleware offer will continue to be available on ST GitHub and our customers can still continue to access it and use it into existing or potentially new projects. But let me say that with Azure Arthos offer into our ecosystem we are bringing important features, fast performance, complete and consistent professional solution and industry certification for a faster go to market. At the time this video is recorded, ST provides a complete Arthos expansion package for STM32 H7 with a lot of ready to use examples for ThreadX, FileX, USB X and NetX Duo on different H7 parts, single and dual core lines and on different boards. Examples are available for NUCLEO H723, STM32 H735 Discovery Kit, STM32 H747 Discovery Kit and STM32 H743 Evaluation Board. We are going to use the NUCLEO H723DG in this tutorial. The provided examples can be easily ported to any other supported device and development board. Also, let me add that Azure Arthos support for other STM32 families is moving very fast and you might have your favorite STM32 part and board already supported awfully by the time you watch this video or very soon otherwise. So please check it out. Well, you can start with Azure Arthos in different ways. You can get it from SD.com, visiting our landing page. In this case a self-contained package with Azure Arthos Middleware, Cubamex, files and ready to use examples is available to you. Or you can get it from ST GitHub. All the limitation in this case would be that you cannot configure Azure Arthos Middleware using STM32 Cubamex. Or you can simply start from STM32 Cubamex or STM32 Cubid. And this is our favorite choice today. So let's open STM32 Cubamex tool. Now, first thing is to install the XCuba Azure Arthos H7 software package. So click on the install remove button and because we are looking for expansion packages, let's move to the second tab and let's refresh. The list with the latest available versions. We can now select the last available version of Azure Arthos expansion package version 100 at the time this video is recorded and we can install it. And once the Azure Arthos is installed we can close this window and we start using it. Now we have different ways to start our Azure Arthos project. We can start selecting our favorite H7 part or our favorite H7 board and then we can add the Azure Arthos Middleware that we need for our project. Or, and that's what we're gonna do, we can select an existing Azure Arthos example for a very easy start. Now we offer tons of examples so let's apply some filters in order to select only the Azure Arthos ones. We are looking for STM32 H7 and for Arthos examples. Then you can use TX underscore prefix in order to list the Tredex examples. FX underscore for FileX examples, UX for USBX, NX for NetX Duo examples. Let's start with a simple Tredcreation example for our Nucleo H723. Selecting the example you get all the info you need, the required software packages, the supported tool chain, board and a full description of the example itself. In this case the example demonstrates how to create and destroy multiple threads and how to use the preemption threshold to change priorities on the fly. The expected success or error behaviors are described as well. In our case the Tred1 will toggle the green LED every 500 milliseconds. Then the Tred2 will preempt the Tred1 and will start toggling the same green LED every 200 milliseconds. Let's start with this project. You must specify your desired install project folder. This way the original Azure Arthos project will not be modified and you can reuse it in the future as many times as you want. Now we started from an available example so you don't really need to modify anything unless you want to add something else to the example itself. But anyway let's have a look at the XCube Azure Arthos H7 software pack components selector in order to understand how to modify things. Especialy if your next step will be to start from an empty project. The hardware profile in the device section reflects our board choice. Make sure the application is set to Azure Arthos app in order to generate the proper application code. Our example is very simple and it's only using Tredex core and nothing else from the other middlewares. But let me show how QBMX really helps in case of missing components and other issues. If let's say by mistake you unselect Tredex core STM32QBMX immediately shows a set of warnings that in this case are telling me that a component is missing and I need to choose among one of those components in order to have a value project. The dependency can even be resolved automatically whenever possible. In this case let's deselect Tredex core. All conditions are now solved and we can proceed. Another interesting info I want to provide is that at today there is no bare metal version of FileX, USBX and NetX. So if you want to use one of those middlewares you need to enable Arthos Mod and HardTredex core selected. Everything is properly selected in the software pack components selector. Now let's have a look at the software pack configuration. After making sure that the components we need for this project are correctly selected, let's move to the configuration panel. You can change the configuration parameters according to your goals for Tredex and the Azure Arthos application. For each parameter, name, description and constraints are provided. Memory allocation can be configured in the Azure Arthos application tab. Well, everything is finally ready. So let's select your favorite toolchain ID, in our case STM32Q by D, and let's generate your final code. Your first Azure Arthos project for STM32Q by D is ready. Please I always recommend to have a look at the readme file for application description, no limitations, notes, hardware requirements and additional details on how to use it. The main.c contains the Azure Arthos initialization code, and in the aptredex.c the aptredex init function allocates all the thread stacks and creates the main thread, thread1 and thread2 and the even flags that we need in this example. Unless you want to modify something or you want to add additional threads, you are simply ready to go. First, let's compile the project. Second, let's connect the Nucleo H723 to our PC using a USB cable through the CN1 USB connector. And third, we are now ready to download and debug our first Azure Arthos application. A very interesting new feature available in STM32Q by D is that you have special view panels for threadex that will make your debugging even easier. You can enable different views on threadex, even flags, memory, message queues, mutexes, semiforce, thread list that we are going to use now and timers. If we resume the execution, you can see the board LED is blinking. Whenever you suspend the execution again, this thread list will show for each thread its name, current priority, state, rank count and several other information on its stack. This is another very cool feature just introduced in this last release of STM32Q by D. Well, with really a few clicks, we have been able to create, configure, compile and debug our first simple Azure Arthos application. Additional and even more complex examples for threadex, filex, USB X and Netex Duo are available, but you can also start a new one from scratch from STM32Q by Mx or STM32Q by D. Before wishing you the best of luck with your next STM32 Azure Arthos project, let me share a couple of important links you don't wanna miss if you like to dive deeper in this topic. Our STM32Q Bico system landing page, where you can find lots of additional resources, videos and webinars. Our XQ Bajor H7 landing page, with product overview, software packages and documentation. And finally our STM32MCU wiki page, where in the development zone you can learn more about using and customizing Azure Arthos Middleware into our STM32 ecosystem. Well, thanks a lot for your attention on this introduction to our first XQ Bajor Arthos release. Many others are coming with improvements and new available collaterals and online material. So please stay tuned, don't forget to visit our STM32Q blending page and have a wonderful day. Buongiorno.