2013-07-17 01:42 AM
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?TnxIlan #st-link-stvp-programming-toolkit2013-07-17 07:04 AM
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, Laurent2013-07-17 07:38 AM
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.
2013-07-17 11:01 PM
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?TnxIlan2013-07-18 12:31 AM
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
2013-07-18 03:05 AM
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?TnxIlan2013-07-19 12:32 AM
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