 Okay, so let's switch to the truss studio Okay, so let's switch to the practical part of our session And we start from the project So first we need to open our folder with that L053 project and As Philip said Feminist before start double-click on the file dot project and start our ID I mean truss studio ID and Now it is good moment for my colleagues to check If some of you Some How to say duty view of the ID to avoid some problem because We'll use the ID to copy and paste some some source code. So please Philip are to check True studio of our attendees So we need view like this so we need only one project active and and we can Unroll it and Go to the as RC folder sub folder and double-click on main dot C file because It will be the only file to to modify So please follow The configuration of the ID as you can see on the screen now we make some Simple modification of the source code. So please go to the line number 174 here And we need to modify the payload to send by your transceivers For example, okay, I can modify my payload to like this and of course it is up to you to modify so if you did it Please start the compilation The building process So you can press The picture of the hammer or you can press control B project is building and here you can see Output the footprint size So it is all almost 30 kilobytes of Flash memory footprint and now we can start the debug session if the debug Key is The debug picture is not active. You need to highlight the project name like this and then press the back picture and Now we need to wait until the flashing process Will be ready please patient and if If it is ready when it is ready the play button Stay active. Okay. So the flashing process is finished. So now we can start We can start our debug session I will close the debug session on my side because now I need to start as well P GUI as a trainer to show Your frames the frames sent by you on the dedicated application So I will start as well P GUI to configure Radio on my site and configure the Transmission test Okay, so now You can press your blue buttons Okay, so as you can see it seems to be functional. So it was first It was the first first part first part of our of our exercise Very simple one. So now we can go to the Sometimes Career sense and collision avoidance. Okay So now let's switch to the migration Between that the key point of our our session the migration between L0 application and L4 application. So please open cuba mix now we have no cloud boards L4 76 no cloud boards And we need to Start new project cuba mix. So please go to please select new project from the Here or select new project from the file new project and I Think yes, we can do it now. We can do it now. So please open unpack your your your L4 boards and Remove the no cloud shield from the L0 No cloud and put it To L4 boards. So we need to like the target MCU For our migration it will be STM32L476RG Of course cuba mix application gives you a Very powerful mechanism to to to select the target MCU, but now this is a special case This is not cuba mix related workshop. This is Spiritually related workshop. So so so we just enter the the component name So we have only one selection here and please double click on that selection Okay, and we can see our our target MCU L4 76 and Now we can start the migration process from our L0 application. So please click the button with picture consisting of White arrow on green field and find our Source project, so please go to the To your handsome folder In my case it is handsome underscore and Date for today, please enter the project and the And select the dot IOC Project file of cuba mix tool. Okay, and now just click okay to start migration process Okay, I selected wrong version of the cuba mix So now I will do it with with proper one and start the migration Okay, project is successfully imported as we can see and now We need to modify only one point because we have More powerful MCU and the maximum clock frequency for L4 family is 80 megahertz. So please enter 80 megahertz HCLK field press enter and press ok to find the alternative clock Clock source for the clock tree. Okay, and now we need to Configure the project name. So please go to the project settings and enter project name as to dash LP underscore project underscore STM 32 L 476 Okay, so we have a name Now we need to select the the target folder the same folder as We have used for the L0 project and the last activity to perform is to select the target ID through studio, of course so project is configured and now we can Press ok and generate code. So you can select project Generate code on or you can press the picture Okay, and we can open project so now We can switch to the true studio and we can see two projects L0 related and L4 related so we can Close the the folder of the L0 and Open the folder tree of the L4 Go to the as SRC and double click on main dot C so now we have two main dot C files and this is Expected configuration of the editor. So Philip shaman, please verify of all guys in there in the room as the Same configure have the same configure configuration Okay, and now We can configure the Configure the building process. It is hint for you. So please go please highlight the project name right click and then properties and please go to the build CC++ build options and select behavior tab and Check the enable power built It lets your PC to utilize all the all the course of your of your Processor and just speed up the building process apply Okay Okay, so now we can close Maybe not close just height our true studio and Open folder with the and some so Please go to the So now we can see two sub folders L0 Project folder and L4 project folder So please open L0 and then open second instance of The Windows X lower or whatever you are using For the L4 project Okay, and now we can start the copy paste Activity so please go to the L0. It is our source to drivers and Copy the BSP folder to the same folder of L4 project so drivers and Here we can paste the BSP so now we can see the structure is exactly the same please go up One step up and enter include I and C Subfolder and copy cube underscore HAL dot H file and Come back to the L4 Go step up Enter include and paste the file so we have now we have exactly the same Structure of the of the folders so we can close The instance of the windows explorer related to the L0 project So our source and now let's come back to the True Studio We can see that that our project our L4 project is still highlighted. So please press F F5 refresh the Project and now we can we can verify that Opening the drivers subfolder we can see BSP subfolder. So it is okay and and opening Include folder we can see cube underscore HAL dot H File so please open that file and now we need to modify just one line But to be more To be more precise we need to modify just one character So please go to the line number 41 and change Zero to four because we have L4 microcontroller and then you can save your editor bar pressing Save button or control S Okay, as you as you remember just before a while we added and we copied the BSP Folder in which consists of the S2LP library so we need to point to the to to the our IDE the folders to that folders to that to that library So please highlight the project name again right click Properties and Go to the CC++ general Unroll it and go to the paths and symbols and now we can press add So now we need to add all the paths to the pointing the Pointing the library location. So we need to go to come back to the to the our Windows Explorer view Okay So please go to the drivers to the BSP to the components S2LP library include and Copy all the path Okay, and we can paste it Here in our IDE and it is good practice to configure Relative path instead of Direct one So let's do it now. So Put the cursor next to the letter D of drivers and Delight All the header. Okay, so this is first path and we need to add to the Second one. So again add Let's come back to our to our l4 project Come back to the to the BSP and And again go to the X nuclear and includes And again copy back to the true studio paste and Let's configure Relative path. So put again put the cursor next to the letter D and press okay, then apply and Okay, so now we can verify our our paths by opening the includes subfolder So we can see There's part of here and the second path Here, so it is okay and again shimon and philly. Please verify on customer site Okay, so we have copied our library We have configured the paths. So now the last step Source code so How do you think? What should we do now? Should we copy line by line or Something like this Or is there any Simply simply way to to to to copy it I think that I will show you a simple way at once to just to save a time and show you the simplicity of the of the migration so please go to the main dot C of project of the L0 project because this is our source and Copy all the application code By the application code. I mean the the code related to the functionality of application not the Not the code related to the configuration of the peripherals. So we need just to copy all the code Except the Configuration of peripherals, so please go to the line number two six nine and mark all the source code up to the first line and Copy to the scratchpad Now we can come back to the main dot C and again go to the To the end of the application part of main dot C In our case it is line number one two three We need to mark all the lines Up to line number one and paste Previously copied application code and As you remember and as Philip as mentioned before Few minutes ago there is a interrupt Service Related to the pass button event So we need to copy the code related to the callback of that interrupt So please go to the line number 400 450 It is a code section calls user code begin for and copy All the callback of the XT of the GPIO XT. So starting from line four five zero down to line 492 and come back to the main dot C of L4 project Go to the line number 463 and paste the source code Okay, so we have copied our functionality and The last action to perform Is the again we need to change zero to four because we are using L4 family and we can start building process by pressing hammer button or control B Okay So the so the company the building process is finished. I can connect my board It is L4. I hope and let's start The the back session again press highlight the L4 project and press the back button and wait until Play button stays Active stays green. Okay So we can start the back session and now we can start also the terminal So please go to the view option then select terminal and Configure the communication parameters. So please select the related compote. It could be high now high number compote Then 115 kilobits per second 8-bit character without parity and one stop it So, okay And we can press The blue button so we can see the packet Is transmitting and now I will start GUI Okay, and let's see if Yes It works So that's all Regarding the migration