Skip to main content
SLee.131
Associate
August 7, 2018
Question

STMFlashLoader Demonstrator Memory Leak

  • August 7, 2018
  • 4 replies
  • 903 views

I am building a download program based on STMFlashLoader source code.

I downloaded it from this site.

However, this program causes memory leaks.

For Test, I have just modified the source code to run again after it succeeds, not shut down.

However, each time the download is finished, the memory usage increases by 200 to 300 KB.

I do not mind using it once or twice, but running it hundreds or thousands of times will cause problems.

Is there a cause and solution for memory growth?

Thanks

    This topic has been closed for replies.

    4 replies

    Technical Moderator
    August 7, 2018

    Hello,

    Which device are you using ?

    I recommend you to use the STM32CubeProgrammer software tool for device-programming and firmware upgrade for STM32 microcontrollers.

    Best Regards

    Imen

    In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks
    SLee.131
    SLee.131Author
    Associate
    August 8, 2018

    Sorry for confusing you.

    I am creating a PC application that downloads firmware to the MCU.

    I am not firmware engineer.

    Of course, the target MCU is STM32.

    At the PCB production factory, it had to do several tests after downloading the firmware automatically, so it not able to use programs such as STM32CubeProgrammer, so I have to creating new programs.

    So I was building a program based on the source code in a program called STMFlashLoader that was distributing at ST.

    Is there a way to get the source code of the STM32CubeProgrammer program?

    I just want to know what is involved with the firmware download.

    Tesla DeLorean
    Guru
    August 8, 2018

    If you've got a memory leak in the Windows app you might need to chase that down in a debugger

    I wrote my own command line app using the protocol described here

    https://www.st.com/content/ccc/resource/technical/document/application_note/51/5f/03/1e/bd/9b/45/be/CD00264342.pdf/files/CD00264342.pdf/jcr:content/translations/en.CD00264342.pdf

    Tips, Buy me a coffee, or three.. PayPal VenmoUp vote any posts that you find helpful, it shows what's working..
    SLee.131
    SLee.131Author
    Associate
    August 8, 2018

    Thanks for reply.

    But it's too hard for me.

    If libraries such as STBLLIB are not problematic, I would like to create Windows app using this library whenever possible.

    This seems to be a little easier for me.