STM32G070: External Loader Created but not Working
Hi @stm32
I have a STM32G070 chip connected to a NOR_FLASH MX25L6433F using Standard SPI. I created an External Loader for the setup, but unable to read/write using the stm32 programmer. The custom driver for the particular flash is proved to work with the same hardware setup, so i can confirm that the bridging between the working driver and the STM2Programmer is somewhat missing.
I created an External loader from scratch following the STM32 MOOC course link (https://www.youtube.com/watch?v=xASKxhqphkk&list=PLnMKNibPkDnHIrq5BICcFhLsmJFI_ytvE&index=4) for QSPI.
Steps I followed:
1) Created a CubeMx project for stm32g070 with SPI enabled in my case.
2) Manually copied the loader files from the link https://github.com/STMicroelectronics/stm32-external-loader/tree/contrib/Loader_Files and also integrated my custom driver for the particular NOR_FLASH. The driver is tested and verified separately,So it works.
3) In the build configurations, pasted the command cmd.exe /C copy /Y "${BuildArtifactFileBaseName}.elf" "..\${BuildArtifactFileBaseName}.stldr" to create stldr.
Please note that the .stldr is created properly because the members of the StorageInfo Struct including the Name, Device Start Address, Memory Size, Page Size and the Type etc are displayed in the STM32Programmer EL tab. However, after some testing i came to the conclusion that the functions Init, Read,Write in the Loader_Src.c is not being called.
I request you to help me with some hints or it is more helpful if you can give an External Loader project template/ Starting point for the STM32G0 series, so i can start adapting that starter project according to my pin changes and my specific external flash. Please find the linker.ld, the startup file, Loader_Src.c and Dev_Inf.c/.h file I use for my project for your reference. Also find the screenshot after the .stldr is loaded in the stm32programmer.
Best Regards,
Renjith Gopan
