 Hello and welcome to this presentation. My name is Badr Dean and in this video we will learn how to setup a different OctoSpy flash memory in a TouchGFX template. In the two first parts we learned how to setup the OctoSpy peripheral in SDM32 Cubamax and then how to initialize the OctoSpy flash memory and setup the OctoSpy peripheral in memory mapped mode. In this third part we will see how to build the external flash loader for the IS-25LX-256 OctoSpy flash memory. I will first start by downloading the external flash loader for the SDM32 H7B discovery board and provided by SD. I will search for STM32 external flash loader in GitHub. In this GitHub we have all the external flash loaders for all the STM32 discovery kits and evaluation boards. These external flash loader are organized into STM32 families, STM32 F4, STM32 F7, G4 and so on and so forth. In our case you we're using STM32 H7 discovery kit so I'll click on STM32 H7X underscore boards and here we have all the external flash loaders for STM32 H7 family including the external flash loader for the STM32 H7B discovery board. I go back to the external flash loader and then from here I will download the zip. Starting from the external flash loader for the MX-25 memory and STM32 H7B discovery board, I created a new project for the IS-25LX-256 OctoSpy memory. Now if I look at the STM32 cube programmer user manual UM2237 and then attraction 2.3.3 developing customized loaders for external memory. I see here we have three main steps. The first step is to update the device information in storage info structure and the device underscore and dot c file. I will open the IR project and application user core and then dev underscore and dot c. Here I changed the name to reflect the action name of the memory to IS-25LX-256. Then I changed the flash size. The IS-25LX-256 is 256 megabit flash memory which is 32 megabytes and then this is 000 in hexadecimal. Last if you look at the OctoSpy datasheet we see it's organized in 1024 sub sectors of 32 kilobytes each. Go back to IR project and here in the sector number or pages number of pages is 1024 or 400 in hexadecimal and the size of each is 32 kilobytes or 80000 in hexadecimal value. Then the second step if I go back to STM32Q programmer user manual I see the second step is to change the corresponding functions code in the loader underscore source dot c file. I go back to IR project double click on loader underscore source dot c and here I have the functions to reset the OctoSpy memory set up the octal mode set up the dummy cycles and so on so forth. Here it's important to point out that interrupts are not supported and actually there is no victor table. We see there is no startup file in the project here and the default implementation of Hull take functions or Lyon SysTech however during the flash programming we want to ensure that no interrupts occur and avoid unnecessary initialization of additional peripherals thus new implementations of the Hull take functions is used so here the Hull get tech, Hull delay and Hull and a tick. Then it's important as well to mention that the external loader project does not support the initialization of global variables. For example the OctoSpy handler won't be zero initialized here because there is no startup code and for that reason I used memset here to zero initialize the OctoSpy handler. Now I go back to STM32 cube programmer user manual and see the third step is to change the output file name and go back to IAR build the project and here I have to change the output file name from .out to stldr stloader. I go to flash loader folder exe folder and here I have my output file .out I change it to stldr and now I'll copy the file to the STM32 cube by D external flash loader directory. I go to C drive STM32 cube by DE then plugins and then STM32 cube by DE external tools cube programmer. Then tools and bin folder and here we have the external flash loader directory. Here we see all the external flash loaders supported by STM32 cube by D. I'll paste the file here. This makes the external flash loader algorithm available in any STM32 cube by DE project. Thank you for joining me in this video and we hope that you enjoyed learning how to set up a different OctoSpy flash memory in a .gfx template.