STM32F051 Disco programming error

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

Moderator: Benj

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

STM32F051 Disco programming error

Postby STibor » Tue May 15, 2018 5:56 pm

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.97 KiB) Downloaded 43 times

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

Re: STM32F051 Disco programming error

Postby Benj » Wed May 16, 2018 4:11 pm

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
(31.13 KiB) Downloaded 43 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".
These users thanked the author Benj for the post:
STibor (Wed May 16, 2018 5:59 pm)
Rating: 5.26%
 

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

Re: STM32F051 Disco programming error

Postby STibor » Wed May 16, 2018 5:58 pm

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: 1890
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 446 times
Been thanked: 640 times
Contact:

Re: STM32F051 Disco programming error

Postby LeighM » Thu May 17, 2018 8:55 am

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: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

Re: STM32F051 Disco programming error

Postby STibor » Thu May 17, 2018 6:21 pm

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=UQjECBi6vWw&feature=youtu.be

User avatar
LeighM
Matrix Staff
Posts: 1890
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 446 times
Been thanked: 640 times
Contact:

Re: STM32F051 Disco programming error

Postby LeighM » Fri May 18, 2018 8:39 am

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 39 times
These users thanked the author LeighM for the post:
STibor (Fri May 18, 2018 2:36 pm)
Rating: 5.26%
 

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

Re: STM32F051 Disco programming error

Postby STibor » Fri May 18, 2018 2:34 pm

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

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

Re: STM32F051 Disco programming error

Postby STibor » Fri May 18, 2018 2:44 pm

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

User avatar
LeighM
Matrix Staff
Posts: 1890
Joined: Tue Jan 17, 2012 10:07 am
Has thanked: 446 times
Been thanked: 640 times
Contact:

Re: STM32F051 Disco programming error

Postby LeighM » Fri May 18, 2018 3:05 pm

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?
These users thanked the author LeighM for the post:
STibor (Fri May 18, 2018 3:31 pm)
Rating: 5.26%
 

User avatar
STibor
Posts: 262
Joined: Fri Dec 16, 2011 3:20 pm
Has thanked: 111 times
Been thanked: 112 times
Contact:

Re: STM32F051 Disco programming error

Postby STibor » Fri May 18, 2018 3:30 pm

Thank you it works!
Installing STM32 ST-LINK Utility (STSW-LINK004) solved the problem.
Attachments
happy_ARM.png
happy_ARM.png (103.03 KiB) Viewed 1669 times
These users thanked the author STibor for the post:
LeighM (Fri May 18, 2018 3:45 pm)
Rating: 5.26%