Skip to main content
xxues
Associate
August 8, 2018
Question

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.

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,

    This topic has been closed for replies.

    23 replies

    xxues
    xxuesAuthor
    Associate
    August 12, 2018

    Hello,ST'ers, would you give the solution for solving the issue? Thanks.:smiling_face_with_smiling_eyes:

    xxues
    xxuesAuthor
    Associate
    August 15, 2018

    Hello,ST'ers, would you give the solution for solving the issue? Thanks.:smiling_face_with_smiling_eyes:

    waclawek.jan
    Super User
    August 15, 2018

    There's not much presence from ST here, this is primarily user-driven forum.

    You might want to use the support website https://my.st.com/ols or contact ST directly.

    JW

    Tesla DeLorean
    Guru
    August 15, 2018

    I'm open to reasonable offers, but I'm not here to carry other peoples water. Resolving this will take time, effort and resources.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    Tesla DeLorean
    Guru
    August 19, 2018

    ST's code also say the 512 Mbit device is 32MB, rather than 64MB

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    xxues
    xxuesAuthor
    Associate
    August 20, 2018

    @Community member​ 

    I‘ve got it. Thanks.

    According to the datasheet of ​MX25LM51245G , the size of Flash is 64MB, rather than 32MB.

    The *.stldr provided by ST (default) is only for 32MB external loader, perhaps because of artificial constraint. :confounded_face:

    Tesla DeLorean
    Guru
    August 20, 2018

    Honestly I think this has more to do with the lack of thorough testing, and attention to detail.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    s m
    Associate III
    December 1, 2018

    Has anybody found a solution for that problem?

    Tesla DeLorean
    Guru
    December 1, 2018

    Yes, have several working loaders, really need hardware in hand, super hard to do blind.​

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    s m
    Associate III
    December 1, 2018

    For starting, I just want to be able to compile an external loader for the STM32L4R9 Discovery Board by my own. I can compile but that elf does not work with the ST-Link programmer. For the posts here, I guess that the example project has some issue. So could you share the project for the Discovery? Thanks.

    Emmanuel COMBETTE DE RYMON
    ST Employee
    January 3, 2019

    -Please find attached the corrected project it works well on the STM32L4R9 discovery and STLink utility 4.2.0.

    Please find a nice step-by step powerpoint that explains how to configure

    the QSPI Flash interface from CubeMx and the memory data sheet, how To test it (and optimize) and

    how add the STLIink loader C files and atollic linker file to make a loader application (.stldr).

    The idea is to provide a universal method whatever the board pinout and memory to configure the qspi then create your own external flash loader.

    Br

    Emmanuel Combette

    STMicroelectronics Tomas team

    Emmanuel COMBETTE DE RYMON
    ST Employee
    January 3, 2019

    Project source code.

    On discovey the flash is connected to OctSPI_SPI2 interface starting on 0x7000 0000.

    The descriptor in the flash loader starts Def_inf.c is incorrect , the start address is the OctoSPI_SPI1 interface and the comments are not aligned with the L4R9 memory map and data sheet.