compiling error Sprinter firmware

Showing 1-9 of 9 messages
compiling error Sprinter firmware Dik@DPC 3/30/12 7:05 AM
I have tried to verify and upload the Sprinter firmware to my Arduino
Mega 256.
It makes no difference if the Arduino is connected or not.

I keep getting the followig error message:

HIGH was not declared in this scope

It referres to the line under the TAB Sd2Card.cpp:

void Sd2Card::chipSelectHigh(void) {
  digitalWrite(chipSelectPin_, HIGH);

In the error log window the following list of errors appeared.


Sd2Card.cpp:20:22: error: WProgram.h: No such file or directory
Sd2Card.cpp: In member function 'void Sd2Card::chipSelectHigh()':
Sd2Card.cpp:145: error: 'HIGH' was not declared in this scope
Sd2Card.cpp:145: error: 'digitalWrite' was not declared in this scope
Sd2Card.cpp: In member function 'void Sd2Card::chipSelectLow()':
Sd2Card.cpp:149: error: 'LOW' was not declared in this scope
Sd2Card.cpp:149: error: 'digitalWrite' was not declared in this scope
Sd2Card.cpp: In member function 'uint8_t Sd2Card::init(uint8_t,
uint8_t)':
Sd2Card.cpp:216: error: 'millis' was not declared in this scope
Sd2Card.cpp:220: error: 'OUTPUT' was not declared in this scope
Sd2Card.cpp:220: error: 'pinMode' was not declared in this scope
Sd2Card.cpp:222: error: 'INPUT' was not declared in this scope
Sd2Card.cpp: In member function 'uint8_t
Sd2Card::waitNotBusy(uint16_t)':
Sd2Card.cpp:471: error: 'millis' was not declared in this scope
Sd2Card.cpp: In member function 'uint8_t Sd2Card::waitStartBlock()':
Sd2Card.cpp:481: error: 'millis' was not declared in this scope
Re: compiling error Sprinter firmware zapgadget 4/24/12 1:05 AM
It's down to changes in the Arduino environment V1.0.  I found an answer which worked for me on the reprap forums:


sfisher10
In case anybody is interested, Sprinter will compile with Arduino 1.0 
with the following changes: 

Sd2Card.cpp 

#include <WProgram.h> --> #include <Arduino.h> 

SdFat.h 

void write(uint8_t b); --> size_t write(uint8_t b); 

SdFile.h 

#include <WProgram.h> --> #include <Arduino.h> 

void SdFile::write(uint8_t b) { --> size_t SdFile::write(uint8_t b) 


Sprinter.h 

#include <WProgram.h> --> #include <Arduino.h> 

Also, the IDE will rename "Sprinter.pde" to "Sprinter.ino" as ".ino" 
is the new default file extension.

Re: compiling error Sprinter firmware brad.pau...@gmail.com 10/9/12 6:45 PM
Worked perfectly! Thanks a mil. (A couple of your .h file names are really .cpp, but we get it.)
Re: compiling error Sprinter firmware miguelang...@gmail.com 6/11/13 12:50 AM
Thanks
Re: compiling error Sprinter firmware erik.ve...@gmail.com 1/25/14 12:48 PM
Thank you very much zapgadget it works like a charm
unk...@googlegroups.com 5/10/14 6:18 AM <This message has been deleted.>
Re: compiling error Sprinter firmware onnie...@gmail.com 5/10/14 6:46 AM
AH! got it. THANKS!
Re: compiling error Sprinter firmware onnie...@gmail.com 5/10/14 6:57 AM


On Saturday, May 10, 2014 10:46:39 PM UTC+9, onnie...@gmail.com wrote:
AH! got it. THANKS!

BTW: do not rename SdFile.cpp to SdFile.h

it screws a lot of things up
Re: compiling error Sprinter firmware doncs...@gmail.com 8/15/14 10:53 AM
An easier solution is to create a WProgram.h file that includes Arduino.h and place it in the directory with Arduino.h.