Page 1 of 1

STM32F051 Disco programming error

Posted: Tue May 15, 2018 5:56 pm
by STibor
Hello!

STM32F051 discovery program upload does not work.
Error message:
C: \ Program Files (x86) \ Flowcode 7 \ compilers \ STARM \ batch \ stm32prog.bat reported error code 1


STM32F303nucleo, STM32F746nucleo works fine.

Re: STM32F051 Disco programming error

Posted: Wed May 16, 2018 4:11 pm
by Benj
Hello,

Thanks for letting us know. Please can you try this updated definition file. Simply copy to your "Flowcode 7/FCD/ARM" folder and restart Flowcode.
32F051Discovery.fcdx
(30.61 KiB) Downloaded 219 times
If this doesn't work then please can you tell us what name the board appears in the root "My Computer" / "This PC" folder. We are currently guessing it's like the others and called "DIS_F".

Re: STM32F051 Disco programming error

Posted: Wed May 16, 2018 5:58 pm
by STibor
Benj wrote: If this doesn't work then please can you tell us what name the board appears in the root "My Computer" / "This PC" folder. We are currently guessing it's like the others and called "DIS_F".
No names found, no disk drive.
I've updated the driver, no effect.
I think he used to work well in win7. Under Windows10, no disk drive is created. Device Manager only installs a USB drive.
The board is good because it works well with Atollic.

Re: STM32F051 Disco programming error

Posted: Thu May 17, 2018 8:55 am
by LeighM
It looks like the original FCD file for this board might be correct, as the STM32F051 Discovery board has onboard ST-LINK.
When you plug the board into the PC USB does "STM32 STLink" appear in the devices list?

Re: STM32F051 Disco programming error

Posted: Thu May 17, 2018 6:21 pm
by STibor
LeighM wrote:It looks like the original FCD file for this board might be correct, as the STM32F051 Discovery board has onboard ST-LINK.
When you plug the board into the PC USB does "STM32 STLink" appear in the devices list?
Hy,
Yes, it is installed.
I made a little video.
Driver / Atollic Truestudio / Flowcode
https://www.youtube.com/watch?v=UQjECBi ... e=youtu.be

Re: STM32F051 Disco programming error

Posted: Fri May 18, 2018 8:39 am
by LeighM
In your Flowcode installation directory \compilers\STARM\batch
there is a batch file stm32prog.bat
could you replace it with the one attached, then try again and post the .msg.txt file

Also could try closing Atollic.

Re: STM32F051 Disco programming error

Posted: Fri May 18, 2018 2:34 pm
by STibor
I changed the files, not good.

Re: STM32F051 Disco programming error

Posted: Fri May 18, 2018 2:44 pm
by STibor
I attach the Benj FCDX file log.

Re: STM32F051 Disco programming error

Posted: Fri May 18, 2018 3:05 pm
by LeighM
That is strange,
in the first log there is neither a message from Windows saying it cannot find ST-LINK_CLI.exe
or any messages from ST-LINK_CLI.exe.

Do you have in your Flowcode installation a directory \tools\ST-LINK Utility with ST-LINK_CLI.exe?
If so, can you run it and see if it outputs anything.

One workaround would be to program the device, with the hex file produced by Flowcode, using the ST GUI ST-LINK Utility
It can be found here, scroll to the "Get Software" button at the end of the page.
http://www.st.com/en/development-tools/ ... nk004.html

Thanks,
Leigh

edit:
You also mentioned Windows 10
I wonder if it is an issue with Windows Defender antivirus?

Re: STM32F051 Disco programming error

Posted: Fri May 18, 2018 3:30 pm
by STibor
Thank you it works!
Installing STM32 ST-LINK Utility (STSW-LINK004) solved the problem.