Page 1 of 1

Arduino Mega 2560 - Programming Timeout

Posted: Fri Nov 21, 2014 11:55 am
by Benj
Hello All,

We have been looking into the Arduino Mega 2560 programming issues and this is the outcome.

An Arduino Mega 2560 R3 will work fine with Flowcode v6.1 as is. Other Arduino targets should also work fine.

The original Arduino Mega 2560 doesn’t work with the programming software in Flowcode. We have replicated exactly the programmer parameters used by the Arduino software and this still isn’t working so it looks like the Arduino software is doing something extra on top of what the AVRdude programming software is doing.

Anyway we have investigated the Xloader tool available from here and this does work really well.
http://russemotto.com/xloader/

Again we investigated the AVRdude version and parameters but had no joy with this so whatever the Arduino software is doing, the Xloader must also be doing.

To use the Xloader tool to program a Mega2560 follow the steps below:

1. Compile your Flowcode project to hex
2. Open the Xloader.exe tool
3. Select the hex file you want to load
4. Select the Arduino device – Mega (ATMEGA2560)
5. Select the correct COM port for your Mega
6. Ensure the Baud rate is set to 115200
7. Click Upload.

Any Arduino guru's out there who might be able to spot what is going on or how we can resolve this please let us know.

Re: Arduino Mega 2560 - Programming Timeout

Posted: Fri Nov 21, 2014 1:09 pm
by jgu1
Hi Ben!

Thanks for the info. I am one of the unlucky ones who bought one of the old model in the belief I could use it in FC 6, but without success. But now is there light ahead with this Xloader. :D
I will test it, and you hear. I have meanwhile bought some R3 models, both in Mega and Uno and I must say that it seem to be successful. What I've been playing with them in the FC works perfectly. (Yet) compiles quickly, etc.. :D

But you can not implement Xloader in FC compiler option and then make a path or something automatically starting Xloader and then use it in FC :lol:

Unfortunately I have no solution to fix the problem. But looking forward to FC6 works with any kind of Arduino board. Sure some can and will help.

Have a nice weekend.

Jorgen

Re: Arduino Mega 2560 - Programming Timeout

Posted: Fri Nov 21, 2014 6:48 pm
by dazz
Hi
My original board was working but it's now buried in a project, check the firmware version as i believe the updated one is v1, check in control panels properties, so you may have to update the bootloader. (mine had the updated firmware, I can also confirm xloader is a good piece of software as i used to use it to check an arduino if i couldnt upload from flowcode
Regards
Dazz

Re: Arduino Mega 2560 - Programming Timeout

Posted: Fri Nov 21, 2014 9:08 pm
by jgu1
Hi!

I am speechless. compilation with Xloader. Perfect. :D :D :D
It can also compile the newer versions of Mega and Uno. Easy, fast and Works. Maybe an extra step during progamming in FC, but ok....

But Dazz you wrote: " check in control panels properties, so you may have to update the bootloader. (mine had the updated firmware) Do I seach for bootloader Can´t find it control panel :?: Can you please explain, hi,hi.

Jorgen

Re: Arduino Mega 2560 - Programming Timeout

Posted: Fri Nov 21, 2014 10:07 pm
by JohnCrow
Hi

Just tried the xloader program, works fine with the Uno and Mega 2560 (both R3) Hex files.

But still getting this error with the Mega in FC6.1 (The Uno works fine)

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

Reading | ################################################## | 100% 0.01s

avrdude.exe: Device signature = 0x1e9801
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: stk500v2_command(): command failed
avrdude.exe done. Thank you.

Error returned from [avrdude]

C:\Program Files (x86)\Matrix Multimedia\Flowcode V6\compilers\avr\batchfiles\avrc_arduinoA.bat reported error code 1

FINISHED

I have just re-flashed the bootloader using the Arduino GUI
As I have posted before, it is a genuine Arduino not a clone

Any suggestions

Thanks

Re: Arduino Mega 2560 - Programming Timeout

Posted: Mon Feb 16, 2015 3:36 pm
by stregato
Hello John
to find a solution to the problem
I too have the same problem

Re: Arduino Mega 2560 - Programming Timeout

Posted: Mon Feb 16, 2015 5:19 pm
by Benj
Hello,

I notice that Arduino has just done a new update that they have apparently been working on for 2 years? Could they maybe have changed their bootloaders again!?

Re: Arduino Mega 2560 - Programming Timeout

Posted: Fri Feb 20, 2015 12:52 pm
by JohnCrow
Hi Benj

You are right, the problem is related to the boot loader.
I have just reloaded the bootload from an old version of the arduino software (0022) and it now works in flowcode.
Previously I have been using 1.0.5 / 1.0.6 and have reloaded the bootloader from this after programming with the AVR programmer.

Now do I dare to try the bootloader in the new release of the arduino software? . if it aint broke don't fix it :)

Re: Arduino Mega 2560 - Programming Timeout

Posted: Tue Feb 24, 2015 3:55 pm
by dazz
try the new one jon, if it fails reload the original ;)
Regards
Dazz