 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 loaders 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 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 in the device underscore and .c file. I will open the IR project and application user core and then dev underscore and .c. 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 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.c file. I go back to IR project double click on loader underscore source.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 and 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. The default implementation of HAL take functions are like on SysTech. However, during the flash programming we want to ensure that no interrupts occur and avoid unnecessary initialization of additional peripherals. Thus, a new implementations of the HAL take functions is used. So here the HAL getTec, HAL delay and HAL edit take. 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, ST loader. 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 DE 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 loader 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.