Its been a while since I've been on the Keil forums. Not exactly a fan of this new ARM forum format... yet. I am doing a project using a STM32L4xx MCU. While my PCB is out to fab, I will be writing the bring-up firmware. I purchased the STM32L476G-EVAL demo board to test my code-monkey code which will be re-targeted for the actual MCU/PCB. Since the EVAL has some spiffy pre-loaded firmware already in it, I'd like to read the existing code, save it, and then flash it back when I'm done. (I also downloaded the official Eval firmware .hex file from ST-Micro's website). Usually, I write the bring-up code on the actual target PCB/Assembly, but this time, I've purchased a dev board (I rarely ever do that). I usually don't need to read/write the flash independently from the source code, hence this stupid question. Lurking through the Keil 'documentation' it isn't clear what the steps are to 1) Read MCU Flash into a file 2) Write an existing .hex file into the MCU Flash I want to do this as simply as possible. Our company purchased a ULINK2 and Eval Board and is sticking with the Keil Evaluation MDK until I scream about it. I don't think I'll need 32K for this project. Then, after the prototype works out, we will buy the real deal MDK. Also, "Hi" to all those old-timer Keil contributors... I won't list them (e.g. Andy, or Per, Erik, etc.) because I might offend those I don't mention. (Obviously, its me---long winded question) --Cpt. Vince Foster 2nd Cannon Place Fort Marcy Park, VA
Keil doesn't provide the easiest of methods to extract the firmware. The debugger has a SAVE command, and if the external memory interfaces are up you can pull from QSPI/NOR devices.
For the STM32 boards, the best route is to use the ST-LINK Utilities or STM32 Cube Programmer, the CLI variant of the former being preferable. Where external memories are involved an External Loader should be specified. The EVAL board should have one. Any way, either of these tools should be able to save a .BIN or .HEX for the preshipped firmware on the devices, and associated external memories.
Thanks Pier! Glad to see your response. I shall purchase both flavors 1) ST-LINK/V2 in-circuit debugger/programmer for STM8 and STM32 ($21) 2) STLINK-V3 modular in-circuit debugger and programmer for STM32/STM ($35) STLINK-V3 has the CLI and could also be used by the techies after I'm done with them. I can use the ST-LINK/V2 for playing with the EVAL board. (Then ULINK2 for the real PCB) Thanks again for the prompt reply.
The EVAL board should have an ST-LINK built into it.
View all questions in Keil forum