GUIDE: Arduino programming via USB

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 5.
To post in this forum you must have a registered copy of Flowcode 5 or higher.

Moderator: Benj

User avatar
DavidA
Matrix Staff
Posts: 1060
Joined: Fri Apr 23, 2010 2:18 pm
Location: Matrix Multimedia Ltd
Has thanked: 58 times
Been thanked: 275 times
Contact:

GUIDE: Arduino programming via USB

Postby DavidA » Wed Jul 11, 2012 5:07 pm

Hello Guys,

Just to point out we have released an FAQ with a fix and some guidelines for getting your Arduino running with Flowcode via the USB bootloader.

We are hoping in a future patch/fix to provide a simpler solution (one with less effort!) via a series of edits to the FCDs and some new batch files, but for the moment this guide should be able to get most people up and running.

http://www.matrixmultimedia.com/support ... f=68&t=797
These users thanked the author DavidA for the post:
medelec35 (Fri Jul 14, 2017 6:34 pm)
Rating: 5.26%
 

benrouse77
Posts: 26
Joined: Thu Jul 05, 2012 11:29 pm
Has thanked: 12 times
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby benrouse77 » Wed Jul 11, 2012 11:33 pm

Works well with mega adk, thanks

Sallafranque
Posts: 5
Joined: Fri Oct 12, 2007 7:36 pm
Contact:

Re: GUIDE: Arduino programming via USB

Postby Sallafranque » Tue Oct 02, 2012 4:24 pm

Hi,
I tried to program my Arduino uno REV3 with Flowcode V5 via USB but it doesn't work.

The command are :
C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\MX_bats\avrc_arduinoA.bat
%a stk500 com4 115200 "%D\%f.hex"

Could you help me?

Thanks

Fred

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Wed Oct 03, 2012 4:45 pm

Hi
what are the dates in your C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\AVRDUDEusb folder on the avrdude.exe and avrdude.conf files
you could also try changing the parameter in the programmer tab to the floowing %a stk500 com4 115200 "%f.hex"

let us know if it works

Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Sallafranque
Posts: 5
Joined: Fri Oct 12, 2007 7:36 pm
Contact:

Re: GUIDE: Arduino programming via USB

Postby Sallafranque » Wed Oct 03, 2012 5:56 pm

Hello Dazz

I tried changin the parameter as %a stk500 com4 115200 "%f.hex" but it doesn't work.
The date on the avrdude.exe is : 26/06/2010
and the avrdude.comfis: 22/06/2012

Thanks for your help
Fred

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Wed Oct 03, 2012 6:10 pm

hi

have you downloaded the zips from davida's post above as the dates are different both the .exe and conf are 26/10/2010 on myy system double check and can you post the msg.txt file that is generated after you try to program
can you also try %a stk500 com4 115200 %f.hex"
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Sallafranque
Posts: 5
Joined: Fri Oct 12, 2007 7:36 pm
Contact:

Re: GUIDE: Arduino programming via USB

Postby Sallafranque » Wed Oct 03, 2012 8:33 pm

Hi,
You will find above the message from the compilateur
La compilation est à jour
L'édition de lien est à jour
Lancement du programmateur...
C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\MX_bats\avrc_arduinoA.bat m328p stk500 com4 115200 "Flowcode1.hex"
C:\Temp>"C:\PROGRA~2\FLOWCO~1\v5\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m328p -P com4 -b 115200 -c stk500 -U flash:w:"Flowcode1.hex"
Error returned from [avrdude]
Code retour = 1
Flowcode a été incapable de transférer l'algorigramme dans le microcontrôleur. Vérifier les options du programmateur et la connexion physique.

Regards
Fred

Gestaltening
Posts: 5
Joined: Thu Feb 07, 2013 10:42 pm
Contact:

Re: GUIDE: Arduino programming via USB

Postby Gestaltening » Fri Feb 08, 2013 4:23 am

Hello
I'm trying programing arduino nano but appear this on compiler messages
avrdude.exe: AVR part "m328" not found.

After that appears a lis of devices and appear m328p, trying choosing direct the chip atmega328p and appears like program succesfully, but nothing happens on port b ,c ,d

Hope anybody can help me, sorry for my english.

César Pindter

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Fri Feb 08, 2013 10:05 am

Hi
can you place the attached fcd file in your Flowcode(AVRr)/V5/T folder , try to program chip again, and let us know if it works if not there are a few other things to try.

Hi
spent a while looking into this for you, you now have two options the first which will fix just the nano is above.
The second is to goto the following folder. Flowcode(AVR)/V5/Tools/AVRDUDEusb right click the avrdude.conf file and rename to avrdude.bk, once done unzip the attached zip file and copy the new avrdude.conf file(in the zip file) into the Flowcode(AVR)/V5/Tools/AVRDUDEusbfolder ,restart flowcode and try again.
this is the best option as it should work with 328, 328p and 328pu chips

Let us know if it works for you


Regards
Dazz
Attachments
avrdude.zip
(19.94 KiB) Downloaded 702 times
Arduino Nano 328.fcd
(10.28 KiB) Downloaded 681 times
These users thanked the author dazz for the post:
medelec35 (Wed Sep 04, 2013 1:10 pm)
Rating: 5.26%
 
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Gestaltening
Posts: 5
Joined: Thu Feb 07, 2013 10:42 pm
Contact:

Re: GUIDE: Arduino programming via USB

Postby Gestaltening » Fri Feb 08, 2013 11:52 pm

:D Dear Dazz:
Thank you for your help, for now it's working great!!!!!, I only replace the attached fcd to Flowcode(AVR)/V5/Tools/FCD


Best Regards

César

Ruel
Flowcode v5 User
Posts: 7
Joined: Tue Jan 26, 2010 5:18 am
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Ruel » Wed Sep 04, 2013 9:29 am

I managed to successfully program my Arduino Uno and received the following message:
Launching the compiler...
C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\MX_bats\avrc_arduinoA.bat m328p stk500 com5 115200 "LED.hex"

C:\Users\Ruel\Documents\Arduino_Flowcode_Projects\Light_LED>"C:\PROGRA~2\FLOWCO~1\v5\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m328p -P com5 -b 115200 -c stk500 -U flash:w:"LED.hex"
avrdude.exe: successfully opened stk500v1 device -- please use -c stk500v1

avrdude.exe: AVR device initialized and ready to accept instructions

When I tried later I could not program the arduino and received this message:

Launching the compiler...
C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\MX_bats\avrc_arduinoA.bat m328p stk500v1 com5 115200 "LED.hex"

C:\Flowcode5_Projects>"C:\PROGRA~2\FLOWCO~1\v5\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m328p -P com5 -b 115200 -c stk500v1 -U flash:w:"LED.hex"
avrdude.exe: ser_open(): can't open device "com5": The system cannot find the file specified.


Error returned from [avrdude]
Return code = 1

I do not understand what is going on. Please help.

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

Re: GUIDE: Arduino programming via USB

Postby Benj » Wed Sep 04, 2013 10:17 am

Hello,

Sounds like the COM port is either unavailable or already in use. Might be worth a restart or disconnect and reconnect and see if that helps at all. If still failing then check the COM port number is correct using the Windows device manager.

Ruel
Flowcode v5 User
Posts: 7
Joined: Tue Jan 26, 2010 5:18 am
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Ruel » Wed Sep 04, 2013 11:23 am

Hello
I checked the com port previously. I tried it again and connected while the devive manager was open.It showed Arduino UNO R3 (com5). I still get the same message.

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

Re: GUIDE: Arduino programming via USB

Postby Benj » Wed Sep 04, 2013 11:37 am

Hello,

Can you open the port using a terminal emulator like realterm? If you cannot open the port with this then the programming software will not be able to open it either. Could anything else be potentially using and therefore blocking the port from being opened.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Wed Sep 04, 2013 1:01 pm

Hi
from your description it sounds like com5 has locked out ,that normally happens when avrdude timesout
can you open flowcode, select build /compiler options make sure your arduino uno settings are visible , then select export, zip the exported file and attach to a post on here, so we can see if the settings are correct
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Ruel
Flowcode v5 User
Posts: 7
Joined: Tue Jan 26, 2010 5:18 am
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Ruel » Wed Sep 04, 2013 2:27 pm

Hello
I tried programming the arduino using its normal software and discovered that it no longer worked since it could not pick up the com port. I restarted the computer and tried again. This time it worked and found the com port successfully. Going back to flowcode tried compiling to hex and found the following error:Launching the compiler...
C:\Program Files (x86)\Flowcode(AVR)\v5\Tools\MX_bats\avrc_arduinoA.bat m328p stk500v1 com5 115200 "LED.hex"

C:\Flowcode5_Projects>"C:\PROGRA~2\FLOWCO~1\v5\Tools\MX_bats\..\AVRDUDEusb\avrdude.exe" -p m328p -P com5 -b 115200 -c stk500v1 -U flash:w:"LED.hex"

avrdude.exe: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude.exe: Device signature = 0x1e950f
avrdude.exe: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude.exe: erasing chip
avrdude.exe: reading input file "LED.hex"
avrdude.exe: error opening LED.hex: No such file or directory
avrdude.exe: input file LED.hex auto detected as invalid format
avrdude.exe: can't open input file LED.hex: No such file or directory
avrdude.exe: write to file 'LED.hex' failed

It seems that the com port is not really the problem and that some other setting is incorrect.

Regards

Ruel

Ruel
Flowcode v5 User
Posts: 7
Joined: Tue Jan 26, 2010 5:18 am
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Ruel » Wed Sep 04, 2013 2:37 pm

Hi Dazz
I did as you suggested but could not copy/paste the file to this forum.
Regards

Ruel

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Wed Sep 04, 2013 2:48 pm

Hi
the file needs to be zipped and attached as a zip file to the forum, can you also open the compiler tab
HOld up a sec, ive attached a zip, unzip there are 2 files import them one at a time into the compiler screen, import one and click the save icon, inport the other and click the save icon, restart flowcode then select from the drop down box unostkv1 click save, try to program your arduino, if it works cool if it doesnt then select unostkv2 and save then try to program again
let me know if it works , if not thewres other stuff to try

Regards
Dazz
Attachments
FCS.zip
(720 Bytes) Downloaded 608 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Ruel
Flowcode v5 User
Posts: 7
Joined: Tue Jan 26, 2010 5:18 am
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Ruel » Thu Sep 05, 2013 7:32 am

Hi Dazz
Success!. Thank you the first file worked perfectly.
Regards
Ruel
These users thanked the author Ruel for the post:
dazz (Thu Sep 05, 2013 1:21 pm)
Rating: 5.26%
 

User avatar
Steve D
Posts: 14
Joined: Mon Nov 26, 2012 7:32 am
Has thanked: 6 times
Been thanked: 1 time
Contact:

Re: GUIDE: Arduino programming via USB

Postby Steve D » Fri Sep 06, 2013 5:15 am

Hi David, is the process of configuring Flowcode v6 to compile to Arduino still as outlined here? Or have you updated v6 to not need these manual settings?


Thanks, Steve

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 514 times
Been thanked: 467 times
Contact:

Re: GUIDE: Arduino programming via USB

Postby dazz » Wed Oct 15, 2014 2:54 pm

Hi steve
read this page, its semi automatic ;)
viewtopic.php?f=54&t=13084&start=50
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php