Welcome! Log In Create A New Profile

Advanced

Sprinter compiling doesn't work

Posted by Etherflash 
Sprinter compiling doesn't work
January 24, 2012 04:39PM
Hi I'm using the Arduino 1.0 IDE changed all the stuff to fit my hardware (Sanguinololu 1.3a, no endstops) and edited the files to make it compile:
Quote

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

Sd2Card.cpp

#include --> #include

SdFat.h

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

SdFile.h

#include --> #include

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

Sprinter.h

#include --> #include

Also, the IDE will rename "Sprinter.pde" to "Sprinter.ino" as ".ino"
is the new default file extension.
But I still get errors when compiling it:
Quote

In file included from SdFile.cpp:20:
SdFat.h:285: error: conflicting return type specified for 'virtual size_t SdFile::write(uint8_t)'
C:\arduino-1.0\hardware\Sanguino\cores\arduino/Print.h:37: error: overriding 'virtual void Print::write(uint8_t)'
thanks for your help
Re: Sprinter compiling doesn't work
January 24, 2012 06:32PM
Have you tried Arduino 0023?
Re: Sprinter compiling doesn't work
January 25, 2012 04:26AM
If I try to compile it with Arduino 0023 I get following error code:
Binary sketch size: 28824 bytes (of a 63488 byte maximum)

avrdude: Can't find programmer id "arduino"

Valid programmers are:
  dasa3    = serial port banging, reset=!dtr sck=rts mosi=txd miso=cts [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:776]
  dasa     = serial port banging, reset=rts sck=dtr mosi=txd miso=cts [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:763]
  siprog   = Lancos SI-Prog [www.lancos.com] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:750]
  ponyser  = design ponyprog serial, reset=!txd sck=rts mosi=dtr miso=cts [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:737]
  frank-stk200 = Frank STK200                   [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:702]
  blaster  = Altera ByteBlaster             [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:689]
  ere-isp-avr = ERE ISP-AVR [www.ere.co.th] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:679]
  atisp    = AT-ISP V1.1 programming cable for AVR-SDK1 from [micro-research.co.th]  [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:669]
  dapa     = Direct AVR Parallel Access cable [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:658]
  xil      = Xilinx JTAG cable              [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:645]
  futurlec = Futurlec.com programming cable. [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:628]
  abcmini  = ABCmini Board, aka Dick Smith HOTCHIP [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:618]
  picoweb  = Picoweb Programming Cable, [www.picoweb.net] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:608]
  sp12     = Steve Bolt's Programmer        [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:597]
  alf      = Nightshade ALF-PgmAVR, [nightshade.homeip.net] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:581]
  bascom   = Bascom SAMPLE programming cable [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:571]
  dt006    = Dontronics DT006               [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:561]
  pony-stk200 = Pony Prog STK200               [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:549]
  stk200   = STK200                         [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:533]
  bsd      = Brian Dean's Programmer, [www.bsdhome.com] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:522]
  pavr     = Jason Kyle's pAVR Serial Programmer [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:514]
  dragon_dw = Atmel AVR Dragon in debugWire mode [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:507]
  dragon_hvsp = Atmel AVR Dragon in HVSP mode  [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:499]
  dragon_pp = Atmel AVR Dragon in PP mode    [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:491]
  dragon_isp = Atmel AVR Dragon in ISP mode   [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:483]
  dragon_jtag = Atmel AVR Dragon in JTAG mode  [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:475]
  jtag2dw  = Atmel JTAG ICE mkII in debugWire mode [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:467]
  jtag2isp = Atmel JTAG ICE mkII in ISP mode [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:459]
  jtag2    = Atmel JTAG ICE mkII            [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:451]
  jtag2fast = Atmel JTAG ICE mkII            [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:443]
  jtag2slow = Atmel JTAG ICE mkII            [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:435]
  jtagmkII = Atmel JTAG ICE mkII            [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:427]
  jtag1slow = Atmel JTAG ICE (mkI)           [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:420]
  jtag1    = Atmel JTAG ICE (mkI)           [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:412]
  jtagmkI  = Atmel JTAG ICE (mkI)           [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:404]
  avr911   = Atmel AppNote AVR911 AVROSP    [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:398]
  avr109   = Atmel AppNote AVR109 Boot Loader [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:392]
  butterfly = Atmel Butterfly Development Board [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:386]
  usbtiny  = USBtiny simple USB programmer  [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:380]
  usbasp   = USBasp, [www.fischl.de] [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:374]
  avr910   = Atmel Low Cost Serial Programmer [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:368]
  stk500hvsp = Atmel STK500 V2 in high-voltage serial programming mode [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:362]
  stk500pp = Atmel STK500 V2 in parallel programming mode [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:356]
  stk500v2 = Atmel STK500 Version 2.x firmware [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:350]
  stk500v1 = Atmel STK500 Version 1.x firmware [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:344]
  stk500   = Atmel STK500                   [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:338]
  avrisp2  = Atmel AVR ISP mkII             [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:328]
  avrispmkII = Atmel AVR ISP mkII             [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:322]
  avrispv2 = Atmel AVR ISP V2               [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:316]
  avrisp   = Atmel AVR ISP                  [C:\arduino-0023\hardware/tools/avr/etc/avrdude.conf:310]


I'm getting the identical error. I'm a noob with a Longboat Prusa Mendel and I can't get the darn thing to do anything at all.

Did you have any luck with getting your's to work?

Thanks for listening.
Re: Sprinter compiling doesn't work
March 12, 2012 08:58PM
the problem is that you need to press the reset button on the motherboard before you click on upload press it hold it press the upload button on the arduino software and release the reset button after about one second.
Etherflash, thanks for the suggestion but I'm afraid I'm still not having any luck.

As far as I can tell I have modified the Sprinter config file properly as well as the Sanguino boards.txt file. The Sprinter files appear to compile properly (no red error lines). I've tried several versions of Arduino (0018, 0022, 0023, etc) and the upload results are always the same: 'avrdude: Can't find programmer id "arduino"'. Pressing the reset button before after and/or during the upload had no affect.

From reading other comments it seems that the issue has to do with a missing definition in the AVRDUDE.CONF file. This is the source for all the red line errors following the 'Can't Find..." message. There is no arduino definition in the file for any version before arduino 1.0 (and this version doesn't support the board yet").

I have found the local arduino preference.txt file which correctly lists the Sanguino board as the target so no help there.

At this point I'm going to go to bed and hope that the solution comes to me in a dream.

As that probably won't work either I have to ask you, was there anything else you changed (hardware or software) before you were able to upload the firmware?

Thanks for listening. Again.
Re: Sprinter compiling doesn't work
March 13, 2012 09:20PM
Can you post the contents of your Sanguino boards.txt and programmers.txt files?
You do have the Sanguino files in /hardware/Sanguino, correct?
Thanks in advance for your help Lincomatic2. Below are the files you requested. I modified the Boards.txt file changing the upload protocol to arduino. This was in accordance with the instructions I found on-line. I did not see any instructions to modify the programmers.txt file and have not done so. Was this necessary? If so then perhaps this is where I have gone wrong.

Both of these files,as well as the bootloaders and cores folders are located in the Sanguino folder that I have copied to arduino-0023/hardware/. Arduino 0023 is the version I am working with.



Boards.txt

##############################################################

sanguino.name=Sanguino
sanguino.upload.protocol=arduino
sanguino.upload.maximum_size=63488
sanguino.upload.speed=38400
sanguino.bootloader.low_fuses=0xFF
sanguino.bootloader.high_fuses=0xDC
sanguino.bootloader.extended_fuses=0xFD
sanguino.bootloader.path=atmega644p
sanguino.bootloader.file=ATmegaBOOT_644P.hex
sanguino.bootloader.unlock_bits=0x3F
sanguino.bootloader.lock_bits=0x0F
sanguino.build.mcu=atmega644p
sanguino.build.f_cpu=16000000L
sanguino.build.core=arduino


Programmers.txt

avrisp.name=AVR ISP
avrisp.communication=serial
avrisp.protocol=stk500v1
avrispmkii.name=AVRISP mkII
avrispmkii.communication=usb
avrispmkii.protocol=stk500v2
usbtinyisp.name=USBtinyISP
usbtinyisp.protocol=usbtiny
parallel.name=Parallel Programmer
parallel.protocol=dapa
parallel.force=true
# parallel.delay=200
arduinoisp.name=Arduino as ISP
arduinoisp.communication=serial
arduinoisp.protocol=stk500v1
arduinoisp.speed=19200
Re: Sprinter compiling doesn't work
March 15, 2012 11:29PM
OK, first of all, I don't know why you changed your upload.protocol to arduino.
It's not a valid protocol for avrdude.
If you have a standard Arduino bootloader installed, it should be using stk500.
Everthing else looks OK.

Does your Sanguino have a bootloader in it? If not, you need a programmer to install the bootloader.
I can go over that part if you need to, but first try

sanguino.upload.protocol=stk500

Edited 1 time(s). Last edit at 03/15/2012 11:29PM by lincomatic2.
Re: Sprinter compiling doesn't work
March 16, 2012 07:01AM
There could also be a mismatch for the baudrate. look in the driver properties if 19200 is selected.
I had changed the protocol to Arduino because of instructions I found via a link provided by my kit's manufacturer. I surmise that this instruction was not one I should have followed and it was probably specific to Aduino 1.0. The avrdude.conf for that version had references to Arduino whereas the earlier versions did not. I already knew this and in hindsight I should not have allowed my common sense to be overuled by someone else’s experience.

Anyway, I restarted from scratch. Installed the bootloader, downloaded the software, etc. but this time I left the protocol as stk500. This time when I attempted to upload the Sprinter it worked! Almost. The driver appeared to load properly but I received a single error line which stated something to the affect that "STK500v1 device detected...". I modified the boards.txt file to read stk500v1 and tried again. Success!

Off course when I tried to command the servos using redsnapper nothing happened. I checked the baud rate on redsnapper, in the sprinter config file and in my window com port and found that they were all different (115200, 19200 and 9600 respectively). After setting them all to 115200 I tried again with redsnapper. And it moved!!!! Hallelujah!

Next up, calibration and a test printing.

I would like to thank both of you (Lincomatic 2 and Etherflash) for taking the time to respond to my questions and problems. If I could I buy you both a beer or whatever it is you drink. Please feel free to have an extra one tonight. If your spouse says anything just blame it on me.
Re: Sprinter compiling doesn't work
March 17, 2012 01:32AM
Glad you got it working! You're way ahead of me. I've just been hacking firmware and playing with some motors & hot ends on a table while I wait for my other parts.
Re: Sprinter compiling doesn't work
March 17, 2012 06:37PM
Hmm. Just downloaded the latest version of avrdude, and it indeed now supports a programmer type called arduino.
I guess it's something used with Arduino 1.0?
Re: Sprinter compiling doesn't work
March 30, 2012 03:06PM
Lucky enough the problem boils down to a connection problem to the arduino board. It now runs perfectly.

Regards

Dik

Hi,

I'm having similar compiling problems as described in this topic.
I'm using Arduino 1.0, Arduino Mega with RAMPS 1.4.
After making the necessary changes to the firmware, Sprinter compiling finished, however leaving the following error log:

Changed to Arduino 0023, giving the same results.
Disconnected the RAMPS and still the same errors.

Error log after compiling:

avrdude: stk500v2_command(): unknown status 0xc8
avrdude: initialization failed, rc=-1
Double check connections and try again, or use -F to override
this check.

avrdude: stk500v2_command(): unknown status 0x01
avrdude: stk500v2_disable(): failed to leave programming mode

Edited 1 time(s). Last edit at 04/01/2012 05:11AM by TrickyDicky.
Sorry, only registered users may post in this forum.

Click here to login