Firmware FAQ

From RepRap
Jump to: navigation, search

If you have a question answered, you should post what it was and how you fixed it here.


General FAQ

MotherBoard FAQ

Arduino displays "Programmer Not Responding"

There are a number of problems that cause this, but the most predominant is mis-timed resetting. On the Sanguino-derived gen-3 motherboard, you need to press the reset button in order to upload the firmware to it. This can be tricky, because not all computers are equal and may compile the firmware in different spans of time. You want to press reset as soon as you see the "Binary sketch size: X bytes (of a X byte maximum)" message. If the error continues, check your cables.

On at least some versions of the RepRap Gen3 motherboard, jumpering the auto reset jumper allows the Arduino IDE to automatically reset the board when uploading, which is very convenient and avoids all the manual timing issues. Similar approaches work on the Arduino Mega or similar boards. On the Seeeduino Mega, for example, there is a small SPDT switch on the board which enables auto reset.

In addition it is worth checking the configuration for the sanguino board within your arduino board.txt configuration. If you get the following

avrdude: stk500_recv(): programmer is not responding

It might be that the sanguino boards.txt file is using the wrong configuration. Using the example of the latest arduino download (0018) on a ubuntu platform the boards.txt file is in /usr/share/arduino/hardware/Sanguino. The following needs to be done in order to ensure that the correct protocol is used for uploading firmware:

Change sanguino.upload.protocol=stk500 to sanguino.upload.protocol=arduino in the boards.txt file

In summary replace the stk500 protocol with arduino and the issue should go away.

Serious "WTF" errors

Anything that has no obvious answer.

Errors with Compiling

When the compiler in the Arduino software fails before even uploading anything, you have a compiler error.

Motherboard Firmware

.../crtm644p.o:(init9+0x0): undefined reference to `main'

When compiling firware for Sanguino (Atmel 644P), this is often caused by the lack of the main.cpp file in the sanguino core directory.

Fix: Copy the main.cpp file from the arduino core directory to the sanguino core directory.

  • See the Sanguino won't compile thread in the RepRap forums.
  • This file seems to be included in the current Sanguino-0018r1_1_4.zip file, so this fix is probably only needed for those with earlier copies of the Sanguino processor definition files.

Extruder Firmware

"o: In function `__vector_11': multiple definition (...)"

Known for Arduino 0018, all OSs. This is an issue with the servo library included in the Arduino environment. A fix may be had by removing the offending sections of servo.cpp. When the error appears, there should be text highlighted in the Arduino window. This is a function that is not needed, so perform some ninja C++ and remove it. You may do this by deletion or the more elegant (yet kludge) "#if 0 {function} #endif" method. Either way, you should remove the entire function such that none of it runs. Like so:

#if 0
blah blah blah (Function Name)
{
blah blah blah (Function Content)
}
#endif

Example available here http://pastebin.com/VqFrSKqD Originally Submitted by Ben_R.

"Sketch size too big" when USE_THERMISTOR enabled (on Arduino, Gen 2 Electronics)

When using Gcode_interpreter code for Arduino, enabling the thermistor causes a "Sketch size too big" error on Arduino0018 software.

Workaround / Solution

  • Downgrade to Arduino0015. Apparently the software was written for Arduino0015, and each version of the arduino software will create a slightly different size sketch, depending on the compiler versions (most likely).
  • See the size too big when enabling Thermistor on Gcode_Interperter thread in the forums.
  • This issue and its workaround were originally reported by Leav on 2010-06-07.

Further reading