suraj56 / sanguino

Automatically exported from code.google.com/p/sanguino
0 stars 0 forks source link

Compilation issues with Arduino IDE 1.01 during 'Verify' stage while using Sanguino-0101r1 #27

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy the sanguino folder into aduino-1.01/hardware
2. Start the arduino IDE (done as root to get USB hardware access)
2. Select Tools -> Board -> Sanguino W/ ATmega 644p
3. Select Tools -> Serial Port -> /dev/ttyUSB0
4. Open Marlin.pde file and click 'Verify'

What is the expected output? 
Expected a confirmation message upon successful compilation

What do you see instead?
1)
There are two instances or errors I get, one is the following:

In file included from SdVolume.cpp:20:
Marlin.h:30:26: error: WProgram.h: No such file or directory
In file included from Marlin.h:38,
                 from SdVolume.cpp:20:
MarlinSerial.h:115: error: expected ‘,’ or ‘...’ before ‘&’ token
MarlinSerial.h:115: error: ISO C++ forbids declaration of ‘String’ with no 
type
MarlinSerial.h:134: error: expected ‘,’ or ‘...’ before ‘&’ token
MarlinSerial.h:134: error: ISO C++ forbids declaration of ‘String’ with no 
type
MarlinSerial.h: In member function ‘void MarlinSerial::print(int)’:
MarlinSerial.h:117: error: ‘s’ was not declared in this scope

2)
The second error I believe I got when using the Sanguino folder included with 
Marlin, it is not relevant to this effort specifically but just for the heck of 
it here it is:

/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:6:21: error: Arduino.h: No such file or directory
In file included from 
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:1:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.h:
82: error: conflicting return type specified for ‘virtual size_t 
LiquidCrystal::write(uint8_t)’
/home/Zero/RepRap/arduino/arduino-1.0.1/hardware/Sanguino/cores/arduino/Print.h:
40: error:   overriding ‘virtual void Print::write(uint8_t)’
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::init(uint8_t, uint8_t, uint8_t, 
uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, 
uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:70: error: ‘OUTPUT’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:70: error: ‘pinMode’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::begin(uint8_t, uint8_t, 
uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:100: error: ‘delayMicroseconds’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:102: error: ‘LOW’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:102: error: ‘digitalWrite’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::clear()’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:164: error: ‘delayMicroseconds’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::home()’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:170: error: ‘delayMicroseconds’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::command(uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:258: error: ‘LOW’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘virtual size_t LiquidCrystal::write(uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:262: error: ‘HIGH’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::send(uint8_t, uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:270: error: ‘digitalWrite’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:274: error: ‘LOW’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::pulseEnable()’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:286: error: ‘LOW’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:286: error: ‘digitalWrite’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:287: error: ‘delayMicroseconds’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:288: error: ‘HIGH’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::write4bits(uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:296: error: ‘OUTPUT’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:296: error: ‘pinMode’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:297: error: ‘digitalWrite’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p: In member function ‘void LiquidCrystal::write8bits(uint8_t)’:
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:305: error: ‘OUTPUT’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:305: error: ‘pinMode’ was not declared in this scope
/home/Zero/RepRap/arduino/arduino-1.0.1/libraries/LiquidCrystal/LiquidCrystal.cp
p:306: error: ‘digitalWrite’ was not declared in this scope

What version of the product are you using? On what operating system?
Arduino IDE 1.01 with Sanguino-0101r1 on Fedora 16 x64

Please provide any additional information below.
Changing #define MOTHERBOARD from 62 to 5 and the board type from 644p to 1284p 
16mhz results in a successful compile leading me to believe this is a 644p 
specific issue.

The fact that this issue exists but with different output as shown above when 
using the marlin sanguino folder hints at the possibility of a larger 644p 
specific bug.

I believe this forum thread also talks about a similar problem which I found to 
be relevant/vaguely useful: http://forums.reprap.org/read.php?158,148571

Original issue reported on code.google.com by dmhone...@gmail.com on 4 Sep 2012 at 10:29

GoogleCodeExporter commented 8 years ago
You library/code does not support arduino/sangunio >1.0, "Marlin.h:30:26: 
error: WProgram.h: No such file or directory"  is a dead giveaway.  

Ref: http://arduino.cc/forum/index.php/topic,97455.0.html

Original comment by sutt...@gmail.com on 6 Sep 2012 at 12:13

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Thanks I'll try it tonight.

Also I'll actually pay more attention to the debug output before I post..

Original comment by dmhone...@gmail.com on 6 Sep 2012 at 12:40

GoogleCodeExporter commented 8 years ago
FWIW I fixed it by commenting out parts of the if statements in Marlin.h as 
follows:

#if ARDUINO >= 100 
  #if defined(__AVR_ATmega644P__)
    //#include "WProgram.h"
  //#else
    #include "Arduino.h"
  #endif
//#else
   //#include "WProgram.h"
#endif

Lazy but it works, as the ref link points out IDE 1.01 needs Arduino instead of 
WProgram in the include satement

Original comment by dmhone...@gmail.com on 6 Sep 2012 at 4:28

GoogleCodeExporter commented 8 years ago
I have this problem, and don't know enough about all this to fix it. I cannot 
verify or compile *anything*, including Blink. I have a sketchbook full of 
sketches I have been using for about a year now... and nothing works. I run 
Ubuntu 11.04. I am wondering if this is Java related? The only changed I made 
recently to my system were installing the latest JRE. Any help here is 
appreciated.
Thanks,
Jim

Original comment by baseball...@gmail.com on 23 Oct 2012 at 10:46

GoogleCodeExporter commented 8 years ago
See this http://code.google.com/p/sanguino/issues/detail?id=27#c1  It is 
possible that upgrading the JRE would mess with arduino but if you have the 
output above a version mismatch is more likely.

Original comment by sutt...@gmail.com on 23 Oct 2012 at 11:08