2020-09-15 05:04 AM
Hi,
I have a custom board with STM32F767ZIT and a QSPI external memory MT25QL128ABA.
My QSPI mapping is :
I find some others subject about it but I failed to create the stldr file :
I tried to use the N25Q512A_STM32F769I-EVAL example for external loader with Keil to generate an axf file to change it in stldr file (UM2237) but I have an error when I build it :
My project is on STM32CubeIDE and I find where the external loader files are (Debug configuration --> Debugger --> External loader) but I don't know how easily create the stldr file for my custom board.
Thank you,
Tom,
2020-09-15 07:47 AM
Some updates,
I generate a stldr file by using the method described here : https://www.youtube.com/watch?v=XqCq0xtQmbI&list=PLnMKNibPkDnHIrq5BICcFhLsmJFI_ytvE&index=5
I used it in STM32CubeProgrammer and I can read and right my external memory flash.
So I add my external loader in STM32CubeIDE but I can't debug my program, I have this error :
My version of STM32CubeIDE is 1.3.1 but I only have the folder STM21CubeIDE_1.1.0 in my C:
My version of STM32CubeProgrammer is 2.4.0
Tom,
2020-09-15 08:20 AM
The scatter file can be found in the example projects
STM32CubeProgrammer_v2.4.0\bin\ExternalLoader\N25Q256A_STM32L476G-EVAL\Project\MDK-ARM\loader.sct
FLASH_LOADER 0x20000004 PI ; FlashLoader Functions
{
PrgCode +0 ; Code
{
* (+RO)
}
PrgData +0 ; Data
{
* (+RW,+ZI)
}
}
DEVICE_INFO +0 ; Device Info
{
DevInfo +0 ; Info structure
{
dev_inf.o
}
}
The loaders aren't stand-alone applications, they can't be debugged as such. They are more equivalent to DLLs
To debug you'd can either test the functional code within another application, or you can build a test wrapper which exercises the entry points.
ie Init(), SectorErase(), Write(), etc
2020-09-15 08:31 AM
Hi Clive,
Thank you for your answer,
I generated the stldr file and I test my loader as described here and it worked : https://www.youtube.com/watch?v=XqCq0xtQmbI&list=PLnMKNibPkDnHIrq5BICcFhLsmJFI_ytvE&index=5
But I have an other project on STM32CubeIDE with the same STM32 and TouchGFX. I would like use this loader to program the external memory flash with images but I have an error with STM32CubeProgrammer :
The programmation of the external memory doesn't worked when I use STM32CubeIDE
Tom,
2020-09-15 06:56 PM
Would check if file is there, if execution is blocked by AV, or missing .DLL that the STM32_Programmer_CLI depends upon
Not clear if the error here is with spawning the file, or something on the command line, and the application is returning an error code.
If it is specifying the external loader on the command line make sure that's on a path where it can be found.
Not using STM32CubeIDE here, check if there is a subdirectory under this tools\bin for the external .stldr to live
2020-09-16 12:03 AM
Hello Clive,
There is a subdirectory for external loader : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader
When I copy your .stldr file in the ExternalLoader, I can find it in STM32CubeProgrammer
I don't know if it's normal, but it's not the same path used for STM32CubeIDE :
C:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.3.0.202002181050\tools\bin\ExternalLoader
When I compare the two folders I don't have the same files in the \bin :
Tom,
2020-09-16 11:40 PM
Hello Clive,
There is a subdirectory for external loader : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader
When I copy your .stldr file in the ExternalLoader, I can find it in STM32CubeProgrammer
I don't know if it's normal, but it's not the same path used for STM32CubeIDE :
C:\ST\STM32CubeIDE_1.1.0\STM32CubeIDE\plugins\com.st.stm32cube.ide.mcu.externaltools.cubeprogrammer.win32_1.3.0.202002181050\tools\bin\ExternalLoader
When I compare the two folders I don't have the same files in the \bin :
Tom,