USB programming to Arduino Mega 2560 R2 Issue

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
KingDad
Posts: 5
Joined: Thu Aug 02, 2012 12:11 pm

USB programming to Arduino Mega 2560 R2 Issue

Post by KingDad »

Hey Guys,

I am currently trying to connect my flowcode v5.3 software package to my arduino mega 2560 R2 board. I have followed all the previous instructions provided on the forum by the admin team, however, the program successfully converts to hex but returns an error code of "1" when it attempts to launch the programmer to send to the arduino chip. I have correctly extracted my .exe files and .bat files to the correct filepaths stated on the forum but with no success.

I was hoping whether you guys had and ideas why we are getting this error code as this is extremely frustrating..... :twisted: ?

Many Thanks,

KingDad
error code.JPG
I have attached the error code as attached below
(62.38 KiB) Downloaded 6441 times

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:

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by DavidA »

Hello,

We have this board here, but the R3 version, im not sure of the differences between the two, but i would imagine it should work the same way.

1st question: Can you program the device in the standard Arduino Dev environment
2nd question: CAn you confirm in device manager that the device is on the port you have entered into the compiler options

KingDad
Posts: 5
Joined: Thu Aug 02, 2012 12:11 pm

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by KingDad »

hello,

In reference to both your questions, the board has been working fine within the arduino environment and I have checked the COM port number is the same in compiler options. In addition I have also changed to another COM port number to see if it would work but with no success.

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Steve »

Have you seen this FAQ topic and are you using the correct version of AVRDUDE?
http://www.matrixmultimedia.com/support ... f=68&t=797

KingDad
Posts: 5
Joined: Thu Aug 02, 2012 12:11 pm

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by KingDad »

Thank you for your prompt reply,

The link you have posted is the forum page we have followed by the letter and we have tried various options around it subsequently to ascertain whether the parameter set was perhaps incorrect given that the example was aimed at the arduino Uno. We have also tried the Mega on two different Pcs but unfortunately experienced the same problems. Hence the question posted on the forum as we are in need of urgent technical support to get this project up and running.

Many Thanks,

KingDad.

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:

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by DavidA »

Hello,

Could you go into your Arduino developer environment windows folder and navigate to the "hardware\arduino\" folder and look for a file called boards.txt and then attach it to a reply here please.

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by dazz »

Hi
have you followed the link steve sent, ive attached a zip file, with a programmer file that works with my arduino mega, unzip it and import it into flowcode, using the import function on the programmer parameters page, you will need to make 1 change to the comport you are using. also are the following files in the c:\Program Files\Flowcode(AVR)\V5\Tools\AVRDUDEusb dated as follows
avrdude.conf 26/10/2010
avrdude.exe 26/10/2010

Let us know how you get on
Regards
Dazz
Attachments
mega2560.zip
(359 Bytes) Downloaded 540 times
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

KingDad
Posts: 5
Joined: Thu Aug 02, 2012 12:11 pm

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by KingDad »

Here is the file as requested. We have the same problem on both my laptop and PC !

Look forward to the answer
Attachments
boards.txt
(12.45 KiB) Downloaded 600 times

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:

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by DavidA »

Hi KingDad,

The boards file is exactly as expected which doesnt help, have you tried the files from dazz above?

The strange thing about this error is the lack of information, if the com port was wrong i would expect:

- avrdude.exe: ser_open(): can't open device "com3": The system cannot find the file specified.

If the stk500/stk500v2 was wrong i would expect something like:

- avrdude.exe: stk500_getsync(): not in sync: resp=0x00
- avrdude.exe: successfully opened stk500v2 device -- please use -c stk500v2

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

If the speed was wrong i would expect:

- avrdude.exe: stk500_2_ReceiveMessage(): timeout

Have you tried any other settings for other devices eg trying a 57600 speed, or using stk500 instead of stk500v2?

Edit: Be aware that when changing the usb speed it can lock out the device sometimes and it may require a computer reboot to get it working, i tested with the arduino environment again to see if it was working

There are many cases on the arduino forums of bootloaders for one device accidently being loaded into bootloaders of different devices, ie duemilanove bootloader being put into an Uno or other such oddities wondering if this is a similar case.

KingDad
Posts: 5
Joined: Thu Aug 02, 2012 12:11 pm

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by KingDad »

We are struggling with this problem now and wish to make use of the program. So far we have not been able to use it to any good effect and have spent over a week on this. I have tried everything I can read / think of over the weekend and now would appreciate a telephone call to assist. Please can you help in this matter ?

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by dazz »

Hi Kingdad

have you checked everything in my reply to you on the 2nd august, if so can you post screenshots of the results, i know its frustrating but posting screenshots etc speeds up tracking down issues, ( i dont work for matrix just a satisfied user),

please also post screenshots of all your compiler settings, your flowchart and the msg.txt file gernerated as then i can see if it uploads to my mega using your config settings etc

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

User avatar
Steve
Matrix Staff
Posts: 3433
Joined: Tue Jan 03, 2006 3:59 pm
Has thanked: 114 times
Been thanked: 422 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Steve »

Hello KingDad,

Have you tried running AVRDUDE directly and loading the HEX file generated by Flowcode? Flowcode seems to be creating the HEX file, so the issue seems to be with AVRDUDE itself, or the parameters you are supplying to it.

I've seen that AVRDUDE also has a "verbose" mode, which might shed some more light on why it is not communicating with your hardware.

There is an AVRDUDE tutorial here which may help: http://www.ladyada.net/learn/avr/avrdude.html

And the Arduinbo website also lists some issues:
http://arduino.cc/forum/index.php?actio ... ic=86698.0
http://code.google.com/p/arduino/issues/detail?id=797
http://arduino.cc/forum/index.php?actio ... ic=83079.0

I hope some of these issues will help you get to the bottom of the problem.

Kind regards,
Steve.

Hans Oostwal
Flowcode V4 User
Posts: 3
Joined: Tue Feb 14, 2012 1:36 pm
Been thanked: 2 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Hans Oostwal »

I have the same problem and tryed serval time,s all above.
I found a tool "Xloder" its fee, you can downoad it form here
http://diydrones.com/profiles/blogs/ard ... er-xloader

you can select your typeArduno and directory from your made hex file.
My problem for a moment solved.

best regards,
Hans

Hans Oostwal
Flowcode V4 User
Posts: 3
Joined: Tue Feb 14, 2012 1:36 pm
Been thanked: 2 times

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Hans Oostwal »

I think i found the soluton.
I use the Arduno Dumeolove mega32p en this is how it works

all Arduino????.bat files work so I use te one who came with this version of
FC5.
Te parameters string in the topic must be:
zie attachment file,s.
-parameters progammer
-msg.txt
You have to adapt your com port and baudrate.!!!!!!!!!!!!! and release you USB en connect again.
Maby this is helpfull for others enthosiastic users (like me) of Flowcode.

Ok thank you,

Best regards,
Hans Oostwal
Attachments
blink_B5_B1.msg.txt
(3.01 KiB) Downloaded 370 times

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

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Steve D »

Hi, the last post of this discussion string seems to indicate a fix to the problem of not being able to program an Arduino, although I have an Ethernet version my issue appears similar and like Hans have tried the previous postings. The last post that Hans left seems to infer that he resolved his issue, but I don't understand what he is saying, can you please explain.

(Sorry Hans I'm not trying to be funny)


Re: USB programming to Arduino Mega 2560 R2 Issue
by Hans Oostwal » Wed Aug 22, 2012 12:20 pm

I think i found the soluton.
I use the Arduno Dumeolove mega32p en this is how it works

all Arduino????.bat files work so I use te one who came with this version of
FC5.
Te parameters string in the topic must be:
zie attachment file,s.
-parameters progammer
-msg.txt
You have to adapt your com port and baudrate.!!!!!!!!!!!!! and release you USB en connect again.
Maby this is helpfull for others enthosiastic users (like me) of Flowcode.

Ok thank you,

Best regards,
Hans Oostwal
ATTACHMENTS
blink_B5_B1.msg.txt
(3.09 KiB) Downloaded 24 times

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:

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by DavidA »

Hi Steve,

Have you been through this guide to programming Arduino via USB in Flowcode?

http://www.matrixmultimedia.com/support ... f=68&t=797

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

Re: USB programming to Arduino Mega 2560 R2 Issue

Post by Steve D »

Hi David, yes and I've copied the library file into the specified directory.

I'll go thru the instructions again if you think it worthwhile, I suppose I was drawn to this post as I'm getting the exact same error message. But I don't understand what finally fixed the issue for Hans?


Cheers, Steve

sethukumar
Posts: 1
Joined: Thu Jun 20, 2013 7:12 pm

atmega8 using flowcode v5

Post by sethukumar »

hi there,,i compiled my chip(robotic controller m1) using flowcode avr v5 but the thing is wen i compile there is an error like avrdude.exe ,,,i cant figure out wats the problem in my code ,,i am ataching c file ,,,plz see it
Attachments
finallyigot.c
(3.9 KiB) Downloaded 235 times

Post Reply