Firmware Compilation Errors

When I first attempted to compile the MakerBot controller software, I encountered compilation errors similar to this:

sd_raw.cpp: In function 'uint8_t sd_raw_init()':
sd_raw.cpp:165: error: 'DDRA' was not declared in this scope
sd_raw.cpp:165: error: 'DDA7' was not declared in this scope
sd_raw.cpp:166: error: 'DDA3' was not declared in this scope
sd_raw.cpp: In function 'uint8_t sd_raw_available()':
sd_raw.cpp:265: error: 'PINA' was not declared in this scope
sd_raw.cpp:265: error: 'PC7' was not declared in this scope
sd_raw.cpp: In function 'uint8_t sd_raw_locked()':
sd_raw.cpp:276: error: 'PINA' was not declared in this scope
sd_raw.cpp: In function 'uint8_t sd_raw_write(uint32_t, const uint8_t*, uint16_t)':
sd_raw.cpp:587: error: 'PINA' was not declared in this scope

It turned out that the issue was that I had downloaded and installed the Arduino development kit from http://arduino.cc — however, the MakerBot motherboard is an Ardiuno-derived board called Sanguino. I found instructions at http://sanguino.cc for downloading and installing some patches to the Arduino kit that enable it to support the Sanguino hardware — and then everything compiled perfectly.

When compiling the extruder controller firmware (e.g. to drive a stepper driven extruder, you may see errors like this:

o: In function ‘vector_11’:
C:\DOCUME~1\HENRIK~1\LOKALE~1\Temp\build6615072793951871476.tmp/
Timer1.cpp:9: multiple definition of ‘
vector_11’

C:\DOCUME~1\HENRIK~1\LOKALE~1\Temp\build6615072793951871476.tmp\Servo
\Servo.cpp.o:C:\Programmer\arduino-0018\libraries\Servo/Servo.cpp:103:
first defined here

This occurs with arduino-0018 and later, and a workaround (since we are not using servo motors) is to find the following section of code (at about line 100 of Servo.cpp) and comment out the underlined portion:

#ifndef WIRING // Wiring pre-defines signal handlers so don't define
any if compiling for the Wiring platform
// Interrupt handlers for Arduino
#if defined(_useTimer1)
SIGNAL (TIMER1_COMPA_vect)
{
handle_interrupts(_timer1, &TCNT1, &OCR1A);
}
#endif

Other Compilation errors

error: stdint.h: No such file or directory

This means you are missing some core libraries required for compilation. Simply run apt-get install avr-libc to install them.

Unless otherwise stated, the content of this page is licensed under GNU Free Documentation License.