cancel
Showing results for 
Search instead for 
Did you mean: 

The *.stldr file generated by MX25LM51245G_STM32L4R9I-DISCO (@ ST-LINK Utility 4.2.0.0) can't work for STM32L4R9I-DISCO device. Please give me some advices. Thanks.

xxues
Associate II

The *.stldr file generated by MX25LM51245G_STM32L4R9I-DISCO (@ ST-LINK Utility 4.2.0.0) can't work for STM32L4R9I-DISCO device.

Step1. According to the readme.txt in the directory of "C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ExternalLoader\MX25LM51245G_STM32L4R9I-DISCO", The detail is as follows:

@par Example Description

This an example of an external loader of MX25LM51245G flash memory for STM32L4R9I-DISCO.

This loader can be used with STM32 ST-LINK Utility and STM32CubeProgrammer.

     

@par Hardware and Software environment  

 - This example runs on STM32L4R9xx devices.

   

 - This example has been tested with STMicroelectronics STM32L4R9I-Discovery

  boards and can be easily tailored to any other supported device 

  and development board.

@par How to use it ? 

 - Place the folder "MX25LM51245G_STM32L4R9I-DISCO" under the following path inside the STM32L4 Cube firmware package  "STM32Cube_FW_L4_Vx.y.z" folder:

  STM32Cube_FW_L4_Vx.y.z\Projects\STM32L4R9I_DISCO\Examples\OSPI

 - Open your preferred toolchain 

 - Rebuild all files and load your image into target memory

 - After build, the loader should be displayed in the external loaders window, ready-to-use.

​​

Step2. Add Existing project of MX25LM51245G_STM32L4R9I-DISCO by using the EWARM 8.22.1,then rebuild all files.So the 

*.out file will be generated, then rename to *.stldr and copy to the directory of "C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ExternalLoader\"

IAR Configuration

Step3. When downloading MenuLauncher-STM32L4R9I-Discovery_V1.0.0.hex through ST-Link Utility 4.2.0.0,the error is as following:

23:49:29 : ST-LINK SN : 0678FF504955857567011028

23:49:29 : ST-LINK Firmware version : V2J29M18

23:49:29 : Connected via SWD.

23:49:29 : SWD Frequency = 4,0 MHz.

23:49:29 : Connection mode : Connect Under Reset.

23:49:29 : Debug in Low Power mode enabled.

23:49:29 : Device ID:0x470 

23:49:29 : Device flash Size : 2MBytes

23:49:29 : Device family :STM32L4Rx

​23:50:24 : [MenuLauncher-STM32L4R9I-Discovery_V1.0.0.hex] opened successfully.

         Address Ranges [0x08000000 0x080001BC] [0x08006000 0x08006F48] [0x08007000 0x0803B303] [0x90000000 0x9022C30A] 

23:50:24 : [MenuLauncher-STM32L4R9I-Discovery_V1.0.0.hex] checksum : 0x0F9EA60A 

23:52:26 : Timeout during flash programming

23:52:26 : Error occured during erase operation!

Best Regards,

23 REPLIES 23
xxues
Associate II

Additional info.​

The ST-LINK Utilities external loader functionality is broken and the tool has been deprecated. Use the STM32Cube Programmer https://www.st.com/en/development-tools/stm32cubeprog.html

Support for external loaders is available on a contract basis.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

The Cube Programmer uses the same External Loader structure/mechanics as the ST-LINK Utilities, but works properly.

They have abandoned support for the utilities, and I spent many fruitless hours trying to get HAL-QSPI to work on the F746-DISCO with the 4.2.0 release with errors/failures similar to those described here, the code I built ran properly with the Cube Programmer.

One quirk with the Cube Programmer is that the STLDR must have the exact same naming as in the machine readable header.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
xxues
Associate II

@ Clive Two.Zero

Thanks for your response.

The Cube Programmer can NOT work properly when downloading the *.hex by using the MX25LM51245G_STM32L4R9I-DISCO-OSPI.stldr(size : 148KB ) that it is generated by the source code of MX25LM51245G_STM32L4R9I-DISCO.But The Cube Programmer can work properly when downloading the *.hex by using the default MX25LM51245G_STM32L4R9I-DISCO.stldr (size: 156KB)@ "C:\Program Files (x86)\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader".

Therefore,the issue is nothing to do with the download TOOL( Cube Programmer OR ST-Link Utility ), the source code or compile configuration is not good.

Best Regards,

I built this using my understanding of the process, with Keil uV5

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
xxues
Associate II

@Community member​ 

I has encountered the same issue when using the *.stldr file to program *.hex into TM32L4R9I-DISCO device by ST-Link Utility(4.2.0) or STM32CubeProgrammer(V1.1.0).

With the one you created, or the one I attached above?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
xxues
Associate II

the one you attached ( 27KB ).​

Ok, well fixing that is going to take some more work, likely going to run to several hundred dollars to resolve.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..