Welcome! Log In Create A New Profile

Advanced

How to download the arduino firmware

Posted by davidgoodenough 
How to download the arduino firmware
September 28, 2008 01:53PM
I have obviously missed something basic, so please humour me.

I have now got the hardware ready for testing. I have tested the individual parts, now to load the firmware and run the reprap host software.

I have downloaded the Arduino IDE, the reprap arduino firmware, and the reprap host software. The IDE works (I used it when testing the individual boards) and I have unpacked the firmware into the hardware/libraries directory.

I opened the menus and found Sketch/Add File... and I located the SNAP pde file under the reprap firmware directory.

So then I ask the IDE to compile it, but it complains:-

Snap.h, no such file.

So obviously I am doing something wrong.

What exactly is the procedure for doing this. I can not find any pages on the reprap site what detail this, other than just to say load it and go.

David
Re: How to download the arduino firmware
September 28, 2008 02:01PM
I also realise that I can do it using File/Sketchbook/Open, but I get exactly the same error.

As far as I know I am using the latest (well I am using Arduino_11 not 12) versions of the three packages (arguino, firmware and host).

David
Re: How to download the arduino firmware
September 29, 2008 03:36AM
I can't remeber exactaly how it's done but i do remeber it is important that the .h files are in the right place and it used to be the case that they needed moving into one of the Arduino core directories. But it's a while since i did any Arduino stuff.

Do you have other .h files that compile OK?


Ian
[www.bitsfrombytes.com]
emt
Re: How to download the arduino firmware
September 29, 2008 03:54AM
Check this thread

[forums.reprap.org]


Regards

Ian
Re: How to download the arduino firmware
September 29, 2008 04:45AM
Would it possible for someone who has a procedure that works to document it, step by step and put it on the RepRap site as part of the software install pages. The referenced forum entry makes little sense to me I am afraid.
emt
Re: How to download the arduino firmware
September 29, 2008 09:20AM
Hi

Following the instructions here at which point do you have a problem?

[reprap.org]


Regards

Ian
Re: How to download the arduino firmware
September 29, 2008 10:01AM
my guess is that I did something wrong in stage 3, as by the time I came to compile it the compile failed complaining about missing .h files.

I am also confused as to how I come to load two images into the arduino at once.

A sequence of screen shots would be helpful just as the step by step photos
of the assembly of the circuit boards is very useful.
Re: How to download the arduino firmware
September 29, 2008 11:13AM
davidgoodenough Wrote:
-------------------------------------------------------
> I am also confused as to how I come to load two
> images into the arduino at once.

I don't think you do load two images at once. If you mean the SNAP and the G-code versions of the Arduino code, you don't use them both at the same time. Perhaps someone who has tried both can tell you which they recommend and why.
Re: How to download the arduino firmware
September 29, 2008 05:31PM
OK, so I re-read the install instructions, and realised that I may have misunderstood and copied the library directory to the wrong place. I am also unclear as to whether I use the reprap/library directory in place of the harware/libraries directory, or whether I need to merge the two.

I tried replacing the libraries direcory, and now it fails at line 439 of math.h when I load the arduino IDE. It looks right to me, but obviously the compiler does not like it. Google does not show any previous problems here.

Please, some worked examples that actually show the steps that are needed would make this so much easier.
emt
Re: How to download the arduino firmware
September 30, 2008 04:32AM
You add the firmware libraries to the existing Arduino hardware libraries.

Be aware that to force a recompile of any changes made to files in the libraries you must delete the object file in the library.

My procedure:-

Just tested successfully on clean PC.

Fresh Install Arduino version 011 software.

Copy sub directories in reprap-arduino-firmware-1.3/library directory to Arduino hardware/libraries directory.

I end up with 14 sub directories below /libraries.

Open Single_Arduino_SNAP.pde in arduino.

Compile.

You will see an error regarding obsolete header file.

BUT it will compile without error.

This works for me. (Windows OS).

If you change a file in libraries which you invariably have to do to match your thermister/thermocouple delete the object file ?????.o

In view of your difficulty I just down loaded Arduino 012 tried the above and I got an error in math.h.

So for the moment stick to Arduino version 011 until someone with more knowledge than me figures out what is wrong.


Regards

Ian
Re: How to download the arduino firmware
September 30, 2008 04:57AM
Thanks, I will follow your procedure. I am using Linux (Debian unstable) and I have 011 not 012, but I suppose that I may be using too recent a version of avr-libc6 (which includes math.h). Do you know what version you are using?
emt
Re: How to download the arduino firmware
September 30, 2008 09:53AM
Arduino release 012 was upgraded to avr-libc6. Therefore release 011 uses an earlier libc but I have not found a reference to which version. Was there a libc5? If so I guess that's what is in 011.


Regards

Ian
Re: How to download the arduino firmware
October 02, 2008 09:06AM
Right, well I have found out what the problem is with math.h

A recent update to wiring.h has defined a round macro, so the definition on line 439 of math.h of another round macro gets confused. So in ThermoplastExtruder_SNAP_v1.h just before the #include math.h you need to insert a line which reads:-

#undef round

and then it will compile cleanly.

Unfortunately it builds a binary which is too big (over 15,000 bytes). So currently Debian Unstable/Testing and shortly to be Stable will be unable to build the SNAP binary.

I gave up and found and borrowed a Windows laptop, installed the Windows version 011 IDE and programmed my Arduino with that. Which given that I try to to everything with Linux was a shame.
Re: How to download the arduino firmware
October 11, 2008 10:19AM
I have been using arduino software for several years....

Don't put the library files in the arduino's library. Leave it as it was downloaded from the link Ian gave earlier.

Why? Each time arduino comes out with a new version you would have to copy the same files to the same locations again. By leaving them the way you unzipped them they will still compile with no problems.

There is one caveat... After you unzip the file, move the new folder(don't even have to rename it) into the arduino's sketchbook....mine is located in the Documents folder named Arduino. Seems like the original arduino install created it. Been too long for me to remember.

At my age, yesterday would be too long. :-)

The only file you need to open in the arduino ide is "GCode_Interpreter.pde" the other files were already included into this one. The ide makes coding much easier than using an actual c compiler. Designed for artist types.

When I try it under linux things may change but I have used arduino on xp-pro and vista with no problems.

By the way, using v12 the code compiled to only 13012 bytes. None of the above fixes were necessary. Haven't downloaded to the arduino because it's busted.

Actually it's disassembled.
Sorry, only registered users may post in this forum.

Click here to login