 Hello and welcome to this presentation. My name is Badr Dean and in this video we will learn how to set up a different OctoSpy flash memory in a TouchGFX template. In the two first parts, we will learn how to set up the OctoSpy peripheral in SDM32 Cubamax and then how to initialize the OctoSpy flash memory and set up 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 and 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, STM32F4, STM32F7, G4 and so on and so forth. In our case, we are using STM32-H7 discovery kit, so I will 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 STM32Q programmer user manual UM2237 and then at section 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 .cfile. I will open the IR project and application user core and then dev underscore and .cfile. Here I changed the name to reflect the actual 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 2000000 in hexadecimal. Last, if you look at the OctoSpy datasheet, we see it's organized in 1024 subsectors 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 8000 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.cfile. I go back to IR project, double click on loader underscore source.cfile. And here I have the functions to reset the OctoSpy memory, set up the octal mode, set up the dummy cycles and so on and so forth. Here it's important to point out that interrupts are not important and actually there is no victor table. We see there is no startup file in the project here. The default implementation of HALTIC functions are like on SysTec. 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 HALTIC functions is used. So here the HALTIC, HALTIC delay and HALTIC. 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. 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. I 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 the 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 DE. 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 TATGFX template.