How to download code from MCU Flash and save it to file?

Discussions and support about ChibiStudio, the free development environment for ARM.
Post Reply
bitto
Posts: 16
Joined: Thu Jan 30, 2014 9:45 am

How to download code from MCU Flash and save it to file?

Post by bitto »

Hello,

My problem is the following: I have been given a STM32 based production device, which has been programmed with a code that has some minor deficiencies but works for the intended application.

Before staring with the testing of the code I have written, I would like to save the existing code from the MCU flash to a file.
This way, in case something goes wrong with my code, I have the possibility to put the previous code back in.

How do I do that with Eclipse/OpenOCD?

Thanks in advance.

Alberto
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: How to download code from MCU Flash and save it to file?

Post by Giovanni »

Hi,

You can't use the ST-Link utility, it is meant just for that.

Giovanni
bitto
Posts: 16
Joined: Thu Jan 30, 2014 9:45 am

Re: How to download code from MCU Flash and save it to file?

Post by bitto »

Thank you Giovanni.

However, on the board I only have a JTAG connection, so I was planning to use ARM-USB-TINY by OLIMEX.

Does ST-Link utility work over JTAG?

Thank you

Alberto
User avatar
Giovanni
Site Admin
Posts: 14891
Joined: Wed May 27, 2009 8:48 am
Has thanked: 1202 times
Been thanked: 996 times

Re: How to download code from MCU Flash and save it to file?

Post by Giovanni »

No, only ST-Link. You should see in the OpenOCD documentation if there is a command for this.

Giovanni
Post Reply