cancel
Showing results for 
Search instead for 
Did you mean: 

Needs help with reading flash with STVP

ilan
Associate II
Posted on July 17, 2013 at 10:42

Hi

I Have the STM32L-discovery board and connected with the STVP programmer via STLINK.

I read the program memory (flash) successfully, and save it to a file (Intel HEX format),

But when I looks at the content of the program memory in comparison to the file, the content is different.

Firstly, the address is different: STVP starts at 8000000 and the file start at 00000000.

The size is different: STVP size is FFFF (64KB Flash) and file stop at 26890.

And the content is totally different.

Can someone explain me how the program memory is saved and why there are differences?

Tnx

Ilan  

#st-link-stvp-programming-toolkit
6 REPLIES 6
LaurentL
ST Employee
Posted on July 17, 2013 at 16:04

Hi,

Can you tell which STVP version you are using ?

STVP version 3.2.9 is the latest available.

For the differences, there should not be, STVP saves ALL the buffer data you see (in the active

pane). If you have selected a 64K device and you see the Program Memory pane, it will save all the 64K you see.

Then, you have to know the HEX file format to say it is starting at 00000000 instead of 0800 0000. Because there are offsets used in the format.

Exemple of an STM32L Hex file (2 first lines) saved by STVP:

:020000040800F2

:2000000008060020954F0008494C00084B4C00084D4C00084F4C0008514C000800000000A1

You can see the offset (like the MSB) in the first line ''0800'' before the checksum (F2) then the second line show (the LSB) 0000 then the first data word 08060020. It is starting at 0800 0000 like you see in STVP.

Are you sure you are looking at the right file ?

Regards,

Laurent

Posted on July 17, 2013 at 16:38

Hex files output by linkers can be sparse and non-sequential. You'd need to assimilate both to know if the data/memory they described were different, an FC of two files might well fail.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
ilan
Associate II
Posted on July 18, 2013 at 08:01

Hi

Tnx for replaying.

The STVP version is 3.2.9 latest one.

I'm looking on the correct file but with Hex file viewer not on the raw data, could be that this is the issue, how do I open the raw data?

Tnx

Ilan

LaurentL
ST Employee
Posted on July 18, 2013 at 09:31

Hi,

I suppose hex file viewer is only a hexa viewer, not Intel Hex file format decode viewer.

I don't know if an Intel HEX file format viewer exists.

But if you look on the spec of the format, you'll find back your data easily.

Why do you need to compare the raw data?

Regards,

Laurent

ilan
Associate II
Posted on July 18, 2013 at 12:05

hi again

Okay it seems that the HEX file viewer is changing the data, looking on the raw data with notepad is fine.

Another question, how do I change a byte in the EEPROM, don't want to load file but only write to the DATA MEMORY one byte with the STVP?

Tnx

Ilan   

LaurentL
ST Employee
Posted on July 19, 2013 at 09:32

Yes, just type anything you want in the buffer and then program the Data memory to the device.

Either you program all Data memory tab or you program a range of addresses, have a look in the menus.

Rgds,

Laurent