2019-02-21 07:15 PM
I am trying to use one of the Firmware Package demo projects using Keil v5. With the STM32F072 Discovery Board connected, the Device Manager shows the STM32 STLink driver is working properly under Windows10.
In particular, I've loaded the DAC_SignalGeneration Project. Originally, I got an error that the Project was read-only but I changed the file attribute. Keil then updated the project from v4 to v5. I then re-built the project with zero errors.
When I try to Flash or Debug, I get an error in Keil: Cannot Load Flash Device Description, C:\Keil_v5\ARM\flash\STM32F0xx_128.flm
No idea what this means.
When I first connected the USB cable, it said there was an update for the STLink firmware. I think it updated it just fine to the latest version.
Any ideas what I'm doing wrong?
Solved! Go to Solution.
2019-02-22 09:44 AM
I resolved this issue.
When the Pack was installed, the FLM file was there in a folder but not in the location where Keil_v5 was looking. I don't know how to get Keil to include it's search for where the FLM files are located that come with the Discovery Pack.
So I just copied that one file (STM32F0xx_128.FLM) into the folder where Keil was showing the error.
All works now.
Thanks for the help!
2019-02-21 07:42 PM
Hi. Start with:
1) Download and install the ST-LINK utility.
https://www.st.com/en/development-tools/stsw-link004.html
2) Run and select Target -> Connect; ST-LINK -> Firmware Update
3) Review the firmware version reported by this tool for your kit. This process will also fetch the latest version over the internet. Proceed to upgrade the firmware, if necessary.
4) Target -> Disconnect. Target -> Connect -> ERASE flash.
Does that work for you?
You can use this same stand alone programmer to reflash your custom firmware from Keil here. Configure Keil to generate an Intel .HEX output file and load up with this tool.
Does that work for you?
Then review how to configure Keil for your kit.
https://www.keil.com/boards2/stmicroelectronics/stm32f072_discovery/
2019-02-21 08:17 PM
What version of Keil specifically? Does it have current packs downloaded?
Try going in to the project settings, debug settings, then the flash tab, and delete the current flash algorithm and pick a new one from the available selection.
2019-02-21 09:49 PM
I am using Keil uVision V5.26.2.0... the latest MDK-Lite version.
With the Discovery Board connected, if I go to the Project Settings, Debug tab, on the right-hand side it's selected to use ST-Link Debugger from the drop-down list. There are no other "ST" options listed.
If I click on the Settings button next to the drop-down for the ST-Link Debugger, It's showing the Debug Adapter to be ST-LINK/V2, it has a serial number listed, HW V2, FW V2J31S0, Target Com: Port: SW (not JTAG),
The SW Device box reports the SWDIO with an IDCODE number with the Device Name: ARM CoreSight SW-DP.
So it looks like the firmware in the "STLink ARM" on the Discovery Board is there... but I still get the same error when I try to Flash/Debug.
Since it's not able to Flash, the demo program in the STM32F072 (Blinky) is still running. So the board is up and running. I just can't seem to Flash it.
2019-02-21 09:55 PM
I haven't tried to do the Firmware Update yet... but I think it's already at the latest version.
I do have the current pack installed for this board. My Pack Installer shows it's Up to date (for the STM32F0xx, version 2.0.0 (2018-01-18)).
2019-02-22 05:56 AM
It seems the issue is not with the Discovery Board but with Keil. The error dialog box that pops up when I try to Flash/Debug is saying it cannot load the Flash Device Description.
It then states what file it's trying to load: C:\Keil_v5\ARM\flash\STM32F0xx_128.flm
I went to that directory and there are no STM flash description files there. I see other FLM files there, but nothing that looks like the above referenced file.
Is this a Keil installation error? Or do I need to do something to create that Flash Device Description file?
2019-02-22 09:44 AM
I resolved this issue.
When the Pack was installed, the FLM file was there in a folder but not in the location where Keil_v5 was looking. I don't know how to get Keil to include it's search for where the FLM files are located that come with the Discovery Pack.
So I just copied that one file (STM32F0xx_128.FLM) into the folder where Keil was showing the error.
All works now.
Thanks for the help!
2022-09-14 01:20 AM
This worked for me from inside Keil.
Project --> Options for target (Alt+F7) --> Utilities --> Settings
Cortex-M Target Driver Setup --> Flash Download --> Add
Chose the right one, Add, Ok, Ok.
Hope it helps.