Skip to main content
TGate.1
Associate III
September 15, 2020
Question

How create a sltdr loader file for QSPI external memory ?

  • September 15, 2020
  • 4 replies
  • 5548 views

Hi,

I have a custom board with STM32F767ZIT and a QSPI external memory MT25QL128ABA.

My QSPI mapping is :

  • CLK : PB2
  • CS : PB6
  • IO0 : PF8
  • IO1 : PF9
  • IO2 : PF7
  • IO3 : PF6

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 :

0693W000003RhZPQA0.png

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,

This topic has been closed for replies.

4 replies

TGate.1
TGate.1Author
Associate III
September 15, 2020

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 :

0693W000003Rjn4QAC.png

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,

Tesla DeLorean
Guru
September 15, 2020

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
TGate.1
TGate.1Author
Associate III
September 15, 2020

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 :

0693W000003Rjn4QAC.png

The programmation of the external memory doesn't worked when I use STM32CubeIDE

Tom,

Tesla DeLorean
Guru
September 16, 2020

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

Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
TGate.1
TGate.1Author
Associate III
September 17, 2020

Hello Clive,

There is a subdirectory for external loader : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader

0693W000003RmvpQAC.png

When I copy your .stldr file in the ExternalLoader, I can find it in STM32CubeProgrammer

0693W000003Rmw9QAC.png

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 :

0693W000003RmzNQAS.png

Tom,

TGate.1
TGate.1Author
Associate III
September 16, 2020

Hello Clive,

There is a subdirectory for external loader : C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader

0693W000003RmvpQAC.png

When I copy your .stldr file in the ExternalLoader, I can find it in STM32CubeProgrammer

0693W000003Rmw9QAC.png

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 :

0693W000003RmzNQAS.png

Tom,