 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 TATGFX 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 IS25LX256 OctoSpy flash memory. I will first start by downloading the external flash loader for the SDM32H7B 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 discover 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 STM32H7 discover kit so I will click on STM32H7X underscore boards and here we have all the external flash loaders for STM32H7 family including the external flash loader for the STM32H7B 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 MX25 memory and STM32H7B discovery board I created a new project for the IS25LX256 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 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 actual name of the memory to IS25LX256 then I changed the flash size. The IS25LX256 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 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 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 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 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 HullTick functions are like on SysTick. 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 HullTick functions is used so here the HullGetTick, HullDelay and HullEditick. 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 menu 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 dot out to STLDR, ST loader. I go to flash loader folder EXE folder and here I have my output file dot 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 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.