STM32F051 Disco programming error

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

STM32F051 Disco programming error

Post 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.
Attachments
log.txt
(6.92 KiB) Downloaded 205 times

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: STM32F051 Disco programming error

Post 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 214 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".

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F051 Disco programming error

Post 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.

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F051 Disco programming error

Post 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?

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F051 Disco programming error

Post 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

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F051 Disco programming error

Post 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.
Attachments
stm32prog.zip
(404 Bytes) Downloaded 225 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F051 Disco programming error

Post by STibor »

I changed the files, not good.
Attachments
stm32f051disc.msg.txt
(7.01 KiB) Downloaded 213 times

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F051 Disco programming error

Post by STibor »

I attach the Benj FCDX file log.
Attachments
stm32f051disc_BenFCDX.msg.txt
(7.07 KiB) Downloaded 222 times

User avatar
LeighM
Matrix Staff
Posts: 2178
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 481 times
Been thanked: 699 times
Contact:

Re: STM32F051 Disco programming error

Post 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?

User avatar
STibor
Posts: 263
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 116 times
Been thanked: 113 times
Contact:

Re: STM32F051 Disco programming error

Post by STibor »

Thank you it works!
Installing STM32 ST-LINK Utility (STSW-LINK004) solved the problem.
Attachments
happy_ARM.png
(103.03 KiB) Downloaded 2913 times

Post Reply