Skip to main content
Lucky Dog
Associate II
January 30, 2024
Solved

Error:Flash Download failed - "cortex-M4"

  • January 30, 2024
  • 4 replies
  • 10060 views

         Issue Description:  My code is divided into two parts, namely the APP area and the TRIM area. When I merge the code of these two areas together, there is no problem with programming through Keil. However, when I separate the code for these two areas (with the APP area located in the middle of Flash and the TRIM area at the end of Flash), the programming process results in an error (see Figure 1). My project configuration is shown in Figures 2 and 3.

        Phenomenon Description:  It's worth noting that this issue has not occurred on my computer but rather on a colleague's computer. I have attempted to troubleshoot by replacing the development board and using a different ST LINK on my colleague's computer, but the error persists.

      Platform Environment:

  1. Keil Version: V5.36.0.0
  2. Microcontroller (MCU): STM32L451CEUx
  3. Programmer: ST_LINK

 

LuckyDog_0-1706585535131.png

(Figures 1)

LuckyDog_1-1706585576869.png

(Figures 2)

LuckyDog_2-1706585576871.png

(Figures 3)

     Can you please advise on the cause of this error and how I can resolve it?

This topic has been closed for replies.
Best answer by Lucky Dog

I found that the problem should be caused by different versions of the STM32L4xx_512.FLM file. The version installed on my computer is 2.6.2, and the version installed on my colleague's computer is lower than this version

 

未命名图片.png

4 replies

Amel NASRI
ST Technical Moderator
March 29, 2024

Hi @Lucky Dog ,

Could you please try the following:

  • perform the ST-Link Firmware upgrade
  • try to connect using the STM32CubeProgrammer and erase flash content before using Keil again

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.
Tesla DeLorean
Guru
March 29, 2024

What exactly does the pop-up error say when failing?

Check the Keil website, I think there is an updated ST-LINK driver/dll

Check power and VCAP situation. These could make the flash fail.

Have Keil generate a .HEX file, try programming that with STM32 Cube Programmer.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Lucky Dog
Lucky DogAuthorBest answer
Associate II
October 12, 2024

I found that the problem should be caused by different versions of the STM32L4xx_512.FLM file. The version installed on my computer is 2.6.2, and the version installed on my colleague's computer is lower than this version

 

未命名图片.png

Amel NASRI
ST Technical Moderator
October 14, 2024

Hi @Lucky Dog ,

I assume that the latest version of Keil DFP package resolved the issue.

Coming back to share your solution with the community after several months is well appreciated.

-Amel

To give better visibility on the answered topics, please click on "Best Answer" on the reply which solved your issue or answered your question.