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

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

GUIDE: Arduino programming via USB

Post by DavidA »

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

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

Post by benrouse77 »

Works well with mega adk, thanks

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

Re: GUIDE: Arduino programming via USB

Post by Sallafranque »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

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

Post by Sallafranque »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

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

Post by Sallafranque »

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

Post by Gestaltening »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

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 1031 times
Arduino Nano 328.fcd
(9.92 KiB) Downloaded 985 times
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

Post by Gestaltening »

: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

Post by Ruel »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by Benj »

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

Post by Ruel »

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: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by Benj »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

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

Post by Ruel »

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

Post by Ruel »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

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 815 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

Post by Ruel »

Hi Dazz
Success!. Thank you the first file worked perfectly.
Regards
Ruel

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

Post by Steve D »

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: 474 times
Been thanked: 458 times
Contact:

Re: GUIDE: Arduino programming via USB

Post by dazz »

Hi steve
read this page, its semi automatic ;)
http://www.matrixtsl.com/mmforums/viewt ... 4&start=50
Regards
Dazz
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

Post Reply