2012-07-03 12:55 AM
I've just purchased ST-Link/2 programmer and installed ST-Link Utility v.2.3.0.
I load intel hex file which contains 0x55, 0xAA at adressess 0x0800FFFE and 0x0800FFFF respectively. The device is STM32F103C8T6. However, after programming only 0x55 byte is programmed. Instead of 0xAA byte the flash memory contains 0xFF. Addictionally, in the main window of ST-Link utility i can't see a byte value at address 0x0800FFFF. Why is that ???2012-07-03 03:54 AM
Why is that ???
Probably a bug, it wouldn't be the first time someone has broken an Intel HEX loader implementation, or not handled the 64K segment limit properly. Can you paste in the last few lines of the hex file? The ST Link Utility might be assuming the size if 0xFFFF and not 0x10000, or mixed a greater than with a greater or equal than test.
2012-07-03 06:06 AM
The byte that is not programmed is shown in red:
:10FFDC00726500000000000000000000000000013D :10FFEC002B01030707DC0A190B640022FF00000039 :01FFFC000004 :02FFFE0055AA
02 :0400000508001DE8EA :00000001FF2012-07-04 02:25 AM
Hi,
I think this is due to segment start address (0xFFFE) which is not 4-byte aligned.Try the following file it should works::020000040800F2:10FFDC00726500000000000000000000000000013D:10FFEC002B01030707DC0A190B640022FF00000039:04FFFC00000055AA02:0400000508001DE8EA:00000001FFIt has the same contents as your file but with 4-byte aligned address.To be able to program this file on flash memory you should add the flash address ::020000040800F22012-07-05 04:38 AM
Now it works, thanks :)
Anyway, in my opinion the ST Link Utility should load Intel Hex file correctly regardless of the byte alignment used in the file.