Welcome! Log In Create A New Profile

Advanced

Error compiling Firmware

Posted by Thias 
Error compiling Firmware
January 05, 2011 03:44PM
Hi there!
I downloaded Version 20100806 of reprap Software, Arduino 22, Java JDK 6.23 x64. I am running on W7 64bit.
Then renamed the configuration.h opened the sketch in Arduino, made NO changes, checked/compiled the sketch and got this:
In file included from FiveD_GCode_Interpreter.cpp:8:
/hostcom.h: In member function 'void hostcom::putInit()':
hostcom.h:96: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'void hostcom::put(char*)':
hostcom.h:97: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'void hostcom::put(const float&)':
hostcom.h:98: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'void hostcom::put(const long int&)':
hostcom.h:99: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'void hostcom::put(int)':
hostcom.h:100: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'void hostcom::putEnd()':
hostcom.h:101: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'byte hostcom::gotData()':
hostcom.h:102: error: 'Serial' was not declared in this scope
/hostcom.h: In member function 'char hostcom::get()':
hostcom.h:103: error: 'Serial' was not declared in this scope
FiveD_GCode_Interpreter.cpp: In member function 'void PIDcontrol::pidCalculation(int)':
pid:120: error: 'bedtemptable' was not declared in this scope
pid:122: error: 'temptable' was not declared in this scope
Can't figure out what went wrong...

Greetings
Matthias

Edit:
I tried the same on a XP-machine, same result.

Edited 1 time(s). Last edit at 01/05/2011 05:04PM by Thias.
Re: Error compiling Firmware
January 06, 2011 05:48AM
Did you install the sanguino addon for arduino? Did you select the sanguino board?

[reprap.org]

Edited 1 time(s). Last edit at 01/06/2011 05:49AM by brupje.
Re: Error compiling Firmware
January 06, 2011 06:20AM
Oh, I forgot: I am using a Arduino Mega. And yes, I selected it.
Yesterday night I tried it again with an older arduino software verion (18) and that worked somehow...

Edited 1 time(s). Last edit at 01/06/2011 06:20AM by Thias.
nrp
Re: Error compiling Firmware
January 16, 2011 08:19PM
Looks like a bug in preprocessing in Arduino-0022. I'm seeing the same issue. If you comment out the HardwareSerial.h include or move the WProgram.h include above it in FiveD_GCode_Interpreter, it works fine.

#include "WProgram.h"
#include <HardwareSerial.h>

Edited 3 time(s). Last edit at 01/16/2011 08:24PM by nrp.
Re: Error compiling Firmware
February 08, 2011 03:30PM
Ive had the same problems, ive switched to ardunio 18 and compiled fine...
but wont upload to board???
the motherboard worked fine
Re: Error compiling Firmware
March 12, 2011 01:17AM
Hi,

I had a similar problem compiling ipv6EtherShield
[sites.google.com]

I found that "WProgram.h" does
#include "wiring.h"
which does
#include
which, depending upon which arduino you have does stuff like
#elif defined (__AVR_ATmega328P__) || defined (__AVR_ATmega328__)
# include
which defines
#define UBRR0H _SFR_MEM8(0xC5)

Now,
arduino-0022/hardware/arduino/cores/arduino/HardwareSerial.h
does
#if defined(UBRRH) || defined(UBRR0H)
extern HardwareSerial Serial;
which breaks if UBRR0H was not defined.

Versions of the IDE up to and including arduino-0021 did *not* have the
#if defined(UBRRH) || defined(UBRR0H)
line.

====

So, to get your program to work under arduino-0022
#include "WProgram.h" or "wiring.h" or

PS. arduino-*/hardware/arduino/cores/arduino/HardwareSerial.cpp
has
#include "wiring.h"

John
Sorry, only registered users may post in this forum.

Click here to login