AnsweredAssumed Answered

Problems programming STM32F103RCT6 with ST LINK V2

Question asked by Ziga Bozic on Jan 14, 2018
Latest reply on Jan 15, 2018 by Ziga Bozic


flashing of mentioned chip with ST LINK V2 works perfect, but in special case it fails with:

20:56:49 : STLink USB communication error
20:56:49 : Error occured during program operation!
20:56:49 : Programming error @ 0x08007600!
20:56:52 : Programmed memory Checksum: 0x004C4AD8
20:56:53 : Disconnected from device.

Can't find reason.

It happens only at one instance of output .hex file. If I delete some lines of code and rebuild (.text gets smaller), it is fine, but also if I add some lines of code (.text size increases) it is fine also.

I tried with output .bin format, I installed latest ST LINK Utillity, updated firmware, tried CLI tools... nothing helps. Tried STLINK V2 ISOL also, the same result.

WIN7 pro 64bit, GCC (Gnu ARM Eclipse)

This are section sizes:


section             size         addr
.isr_vector        0x30a    0x8000000
.inits              0x28    0x800030c
.data              0x874   0x20000000
.data_CCMRAM         0x0          0x0
.bss              0x1730   0x20000874
.text             0x8a4e    0x8000334
.noinit              0x0   0x20001fa4
._check_stack     0x1000   0x20001fa4
.comment            0x6e          0x0
.ARM.attributes     0x31          0x0
.debug_frame       0x5b4          0x0
Total             0xc377


If I understand correctly, there is enough of FLASH/RAM available (256K/48K), or am I wrong here?

I'm attaching problematic .hex file, in case somebody can check on the same chip.


Thanks for your sugestions in advance!