cancel
Showing results for 
Search instead for 
Did you mean: 

Error:Flash Download failed - "cortex-M4"

Lucky Dog
Associate III

         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?

1 ACCEPTED SOLUTION

Accepted Solutions
Lucky Dog
Associate III

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

View solution in original post

4 REPLIES 4
Amel NASRI
ST Employee

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 Accept as Solution on the reply which solved your issue or answered your question.

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
Up vote any posts that you find helpful, it shows what's working..
Lucky Dog
Associate III

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

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 Accept as Solution on the reply which solved your issue or answered your question.