This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Flash Tool not working on ST Nucleo 476 Board

Hello,
I am using Nucleo L476RG board and I am facing a problem in downloading code in board using Flash programmer in Keil IDE. I compile the project successfully and when I click on Load Button, I get following errors :
First Windows says:

Cannot Load Flash Programming Algorithm!
C:\Keil_v5\PACK\Keil|STM32L4xx_DFP\2.2\CMSIS\Flash\STM32L4xx_1024.FLM

Second Window says:

Error: Flash Download Failed – “Cortex – M4”

If I wish to start debug session then same error occurs.

I checked the above mentioned folder and it sure contains the above specified .FLM file.
Under Options->Debug-> STLink Debugger is selected. Further down in Settings, under Connect I have tried “under reset” and “Normal” both. Both result in same failure.
Further down in Flash Download window- Erase sector, Program, verify, Reset & Run all 4 are checked.

Programming algorithm shows two files:
STM32L_4xx 1MB Flash 1M
STM32L_4xx dual bank Flash 36B
with address starting 0x0800 0000H for on chip Flash and RAM for algorithm starting at 0x4000 0000.

I tried after removing second file and only with first one but no effect, the error persists.

The Pack installer software for NUCLEO-L476RG (Rev.C) shows all necessary packs “up to date”.

The 476 board is working fine with LED blink project directly downloaded as a file from mbed online compiler. STLinkV2.1 is working fine. The same Keil IDE and debugger is working fine with Nucleo 401 board so Keil IDE seems OK.

Please help to resolve.

Parents Reply Children
  • Thanks for your suggestion.

    1. I do not know where to set the path correctly. As per the error message, it seems that it is not able to either see the file or read it. I inserted the path to .FLM file in C/C++tab's inclue path field, but no success.

    2. Earlier I was using only 1 algorithm, as set by the device selection, automatically by mbed. When it did not work, I added socond algorithm.

    3. I removed both algorithms, added the standard program named STM32L4xx 1MB Flash. Even then the error persists.

    4. The device selected is STM32L476RGTx. I guess I can not deselect it. I selected something else and reselected that in Device tab.

    5. I also have this 15 KB .FLM file in this location - CMSIS\Flash\STM32L4xx_1024.FLM.
    In fact I opened the file in notepad to see that it is not empty or corrupted, it seems full of text.

    This seems like 476 specific issue. Can anybody give me some more suggestions please?

  • It could be related to how Keil was installed, and where you told it to store the packs.
    I've used the NUCLEO-L476RG on this system
    C:\Keil5xx\ARM\PACK\Keil\STM32L4xx_DFP\2.2.0\CMSIS\Flash

    Try a clean install on a different system