 Hello and welcome on our STM32Cube IDE basics training session. In this part I would like to demonstrate to you some basic components concerning project management over in the workspace, how the projects are organized, how to switch between them, how to switch to different workspace, what are the key features and which can help you on day by day development. So the objectives. We will demonstrate how to manage the projects within STM32Cube IDE or explore some project settings, basic ones, where to find the most important ones. I would like to demonstrate to you how to share the project with others using import-export features, how to switch to another workspace and how to restore some default settings by resetting the perspective. So let's start from the beginning. Projects. Within STM32Cube IDE, as it is an Eclipse-based environment, we are working on a workspace, which can contain one or more projects. Within the workspace we can perform some basic operation on the project, so we can switch between them, we can make them active or disactive, we can close project, we can delete the project, we can delete the project as well from the file system. So all of those features are available. Let's start with the basic concept, project opening, project closing. As I told you before, only one project can be active at the moment, but many of the projects can be opened. There is a big risk that if you have opened more than one project and from each project you've got opened some files, it can be difficult to manage it. It may happen that you will edit some files from the project, which is not currently active. It can create some mess. This is why there is a good feature within Eclipse, and it is available as well within STM32Cube IDE, which is closing and opening the projects. The feature which allows you to close and open the project. On the left part of the screen you can see the example of the workspace, which contains seven projects. One of those is open. This G0 LED is open. To close this project it is enough to click on its name, then click right button on mouse and select close project. In this case you will see the situation like on the middle of the screen, that all projects are closed. To open the project it is enough to double click on the name of the project, and then it becomes open and at the same time active. What is good is that once you click and close the project, all open files which are related to this project are closed automatically. Here you can see it on the screen, that we've got main.c and IOC file related to G0 LED opened. Once you select the close of this project, those files are closed as well. Here is a more difficult example, when we've got three main.c files opened in this project. Open in the same time from different projects, and we've got seven open projects at the same time. Of course only one is active, but sometimes it's quite difficult to check which one, or which main.c file is for which project. Just to make an order of it, we are selecting one project, just clicking on its name. Then we are pressing the right button on mouse, and we are selecting close unrelated projects. All other projects which are not this G0 underscore LED are closed automatically, together with all files related to those projects. Only one main.c remains related to this G0 underscore LED, and we can continue the development. To switch between the project is quite easy. With Eclipse and STM32QPID, it is just enough to click with the left button on mouse on the project we would like to make active, and there will be automatic switch from one project to the other. How to check the properties of the project? It is enough to highlight its name. So we click on its name, then we click on the right button on mouse, and select from the bottom of the many properties. In this case a new window would pop up, with title properties for and name of the project, in our case G0 underscore LED. And within this window we've got all the settings available for the project. Within CC++ build we can select, for example, configure the parallel build of the application. So in case you've got a stronger PC, a stronger multicore CPU, you can select the enabled parallel build, and for example use optimal jobs, which are optimal for your application. Then within CC++ build settings, you've got all important settings concerning the tools, which we are using to generate the code. Starting from the MCU settings, you can select the floating point unit, which is used instruction set, which is used runtime library, which is very important, because it allows you to reduce the code, which would be used by your application. If you're not using all the features from the standard libraries, you can select, for example, nano library, which is much smaller, and will not increase the code of your project drastically. So this is the MCU settings. Then from the next option, MCU post build outputs, you can select what kind of output files you would like to have as a result of the build of the project. So you can generate binaries, hexadecimal, hex files, or Motorola S files. So those are the options. So you can as well display information about the size of generated code, and you can select or unselect the generation of the list file. Within tool settings, you can configure as well Assembler, C Compiler, and Linker, which is used to build your application. So this is the place when you can specify the optimization level. You can specify some additional definitions which are used within the preprocessor. You can specify some additional input paths, or some other components which are used by the compiler, or linker, or assembler. If you would like to share the project with others, or just start the project in some external repository, we can do it using export option, which is as well the feature of the Eclipse environment. To do this, we need to go within the workspace to file export. As a result, we will see an export window. From this, we need to select from general section either RHA file, if you would like to store our project in a compressed form, zip, or tar, or file system, if you would like to store the project in some folder. I will demonstrate the feature with RHA file of zip, so general RHA file. Then window will change, and it will display or available, I mean, open projects with an active workspace. In our case, we've got seven of them. We can select which projects we would like to export into the file. And then we need to specify the RHA file. This is this window below. We need to press browse and select the RHA file name. Then we need to specify what would be the format. It can be zip, it can be tar. I would use zip file, and then once you do all those operations, you need to press finish. Having this zip file, you can share it with other team members from your team, and it would be possible to import it from different workspace. To import the file within the workspace, you need to go to file import option. And from general, you can select what would you like to import. Within stm32cube IDE, you have an option to import an RHA file existing projects into workspace, so the cube IDE projects, file system import, AC6 system workbench for stm32 projects or Atolyctr studio project. In our case, we will try to import the same file. We have just exported. So we will select general existing project into workspace. Then we need to select either root directory if the project is stored as a file folder, not a zip, or if it's stored in an RHA file, we need to select this RHA file and browse it. I can select interesting projects for me and then press the finish button. As a result, all of the projects are popping up in my active workspace. Another thing which is quite convenient within stm32cube IDE, it's coming from Eclipse, it's switching the workspaces. We can imagine the situation that we are working on several projects or several workspaces, and to switch between them, it's quite easy. It's just enough to go to file and switch workspace. And as a result, you can see the list of recently used workspaces and the option other, which allows you to select a different location of the workspace, which is already existing. Another important point once you're working with stm32cube IDE is perspective management. The perspective is a set of windows which are used in the current step of the development. We can have three main perspectives within stm32cube IDE. The first one is device configuration, which is very similar. In fact, it's based on stm32cubeMix device configurator. The second one is CC++ perspective, which is used to code development, it's compilation, it's build. And the third one is a debug configuration, which is used for the debug purposes. It might happen that once you're working on the configuration and we're working on a perspective, you close too many windows, change the configuration in such a way that not everything is visible. It is easy to restore the default perspective view from the application by using window perspective, reset perspective option, which would restore the perspective view to its default configuration. In this part, I would like to demonstrate this management within stm32cube IDE. The first thing I would like to demonstrate is how we can manage projects within stm32cube IDE workspace. Then we'll explore a bit project settings and demonstrate how to share the projects with others using import-export features and some additional points, some additional features, which would be useful during your project development. Let's switch to the workspace. I would use, for this demonstration, purposes one of the existing workspace. It contains all of the hands-ons, which are prepared for this cube IDE basic sessions. You can find them in the training materials in the zip file as well. You can duplicate them. Here in the workspace, you can see several projects, all of them are closed at the moment. To open the project, it is just enough to double-click on it. Just double-click on this G0 underscore XTI. This project became opened and active. Active means that if I would press on it, I would press on the hammer. Only this project would be built. The important point is that active open project can be exported later on. All closed projects are not handled within export operation, which we'll discuss a bit later on. To close the project, we need to click the right button on mouse and select close project. The important point is that when you close the project, you are closing all the files related to this project. I will demonstrate now this feature. Just opening a few files, a few projects, I opened three main.c files from different projects. It could create some problems during our development. What we can do here, we can use this close project feature. Let's assume the situation that we would like to continue development on G0 underscore PWM project. What I can do, I can just click right button on mouse and select close unrelated projects. Please have a look what it will be done. All the other projects have been closed and all the files related to those projects are closed as well. Main.c file from G0 underscore PWM file is opened and can be edited. To delete the project, we just need to click on the project and press delete. It will be deleted from the workspace. But to delete the project, we just need to either click on right button on mouse or just select the project and press delete button. If we just click OK, the project will be deleted from the workspace without... and it will be not deleted from the file system. We can as well select this delete project content on disk and then the project would be deleted physically from the disk. We'll skip this process. And now we will focus for a while on the project properties. If we select the active project, in our case it will be G0 PWM, I press the right button on mouse and select the last option, last position from the menu, it is properties. A new window will be displayed on the screen. It's title is properties for and name of the project, in our case G0 underscore PWM. Within this window, we can perform some configuration of the project, starting from selection how the build process should be done. If we are using multi-core PC, we can select enable parallel build and select the number of the jobs which can be done, build process in parallel. In my case it will be four jobs in parallel during the build process. This is the first point. Then within the settings, next option I would like to discuss is settings within the CC++ build here. In tool settings we've got a complete set of the parameters used by the assembler, compiler, linker, but as well you can find here some settings about the MCU post build options which can be useful for your development. Within the MCU settings you can select the floating point unit which is used in your application, you can select the instruction set or runtime library. The sliced option is very important point because you can select the reduced C library or standard C library. The difference is that in the reduced C libraries you have reduced functionality rather than the number of the functions or simplified functions but the size of the standard library is much smaller, so the application in the final build will be smaller. This is the first important point. The second option MCU post build outputs allows you to select what kind of output files you will have after build of your application. You can have a binary file, Intel Hex file, Motorola S-record file or Veriroc file so you can select it. You can select more than one. You can select as well display information about the size of the build project it is done by default and you can select an unselect generation of the laced file. Then you have three main big sections concerning assembler, C compiler and linker. Within those sections you can set some additional settings for those components. Most important ones are within the C compiler so for example you can select the optimization level which is by default none, so 0. You can modify the input paths you can add something new. You can add some defined symbols you can specify the debug level from none to maximum of the number of the information which would be generated during the debug session available during the debug session. Those are the main settings which are available for the project. Of course there are much more than this but for the complete set you can refer to the manual for this tool. Next point I would like to discuss in this section is about the comfort of work within this environment. What we can see right now on the screen is so-called CC++ perspective it is slightly modified by myself. I already closed some windows I can close more and it may happen that during your development you click too much you closed too much windows and you don't know how to come back to the default state. For this you can go to window perspective reset perspective Yes and now as a result current perspective will come back to its default settings. Another thing I would like to demonstrate to you is how to export and import projects within the workspace. In our current workspace we've got two open projects the rest are closed. So let's select the export option so I will go file export I can select either RHA file or file system or preferences file system will store the project within the separate folder of the folder structure which is present in the project. I would select the RHA file which allows me to store everything in one single file either zipped or tar format. I press next. As you can see only open projects are available to be exported. I can select which of those I would like to export to the RHA file it can be in zip format it can be in tar format. I would select zip I would put it on the desktop and now if I would go to the desktop I can see one zip file with those two projects. It is possible as well to export particular projects from the workspace I just click on the project to make it active then I click right button right mouse and select export and again RHA file next by default there is only one selection of the file which I clicked on and I can continue of exporting it to the separate file let's call it like this and finish. Let's try to make an opposite operation switch to different workspace to new one so I would go to file switch workspace and I would call it cube IDE 5 it takes some time the cube IDE is restarting ok it's restarting with a new workspace cube IDE 5 which we can see here on top we'll close this information center or I can click import project as I exported all the projects with the zip file I would use as an import source RHA I will go to desktop and I would select the first file MOOC1 remember there were in fact two projects I can click finish and I can see both projects on the screen previously exported projects bit differently let me delete those two projects from this workspace so I would delete it one by one ok and now I would select from the file open projects from the file system again I would select RHA and select MOOC1 yes the effect is exactly the same thank you for watching this video