Welcome! Log In Create A New Profile

Advanced

Everything was going so well...

Posted by KD0SKH 
Everything was going so well...
January 14, 2014 09:37PM
I decided to get a new hotend for the Techzone (JHead from Reifsnyder).

I figured I would follow this guide to get everything working.

I used the recommended version of the IDE, and the same for the sanguino firmware. I used 22 for the monotronics in Configuration.h

I run "Verify" and I'm greeted with the following explosion:


fastio.h:29:126: error: pasting "DIO" and "-" does not give a valid preprocessing token
 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)
                                                                                                                              ^
fastio.h:48:25: note: in expansion of macro '_WRITE'
 #define  WRITE(IO, v)   _WRITE(IO, v)
                         ^
heater.cpp:345:4: note: in expansion of macro 'WRITE'
    WRITE(HEATER_1_PIN,LOW);
    ^
pins.h:346:23: error: invalid suffix "_PIN" on integer constant
 #define HEATER_1_PIN -1
                       ^
fastio.h:17:30: note: in definition of macro 'MASK'
  #define  MASK(PIN)    (1 << PIN)
                              ^
fastio.h:48:25: note: in expansion of macro '_WRITE'
 #define  WRITE(IO, v)   _WRITE(IO, v)
                         ^
heater.cpp:345:4: note: in expansion of macro 'WRITE'
    WRITE(HEATER_1_PIN,LOW);
    ^
heater.cpp:345:10: note: in expansion of macro 'HEATER_1_PIN'
    WRITE(HEATER_1_PIN,LOW);
          ^
heater.cpp: In function 'void PID_autotune(int)':
fastio.h:29:39: error: 'DIO' was not declared in this scope
 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)
                                       ^
fastio.h:48:25: note: in expansion of macro '_WRITE'
 #define  WRITE(IO, v)   _WRITE(IO, v)
                         ^
heater.cpp:345:4: note: in expansion of macro 'WRITE'
    WRITE(HEATER_1_PIN,LOW);
    ^
fastio.h:29:96: error: 'DIO' was not declared in this scope
 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)
                                                                                                ^
fastio.h:48:25: note: in expansion of macro '_WRITE'
 #define  WRITE(IO, v)   _WRITE(IO, v)
                         ^
heater.cpp:345:4: note: in expansion of macro 'WRITE'
    WRITE(HEATER_1_PIN,LOW);
    ^

What the hell now?! Attached are all relevant files in a handy .zip archive.
Attachments:
open | download - Sprinter-master.zip (117.1 KB)
Re: Everything was going so well...
January 14, 2014 10:41PM
do you have the sangulino files included.

[sanguino.cc]

this would fix the fact that it cant find certain pins.
Re: Everything was going so well...
January 14, 2014 11:00PM
I didn't change the files at all. Do I need to
#include
anything from the hardware/sanguino directory in the header files? Before, all I needed was to have the Sanguino folder in the hardware directory of whatever arduino IDE I was running
Re: Everything was going so well...
January 15, 2014 12:30AM
do you have the sangulino files included.
Re: Everything was going so well...
January 15, 2014 01:21AM
Install Arduino Software

The Sanguino uses the Arduino and adds some small modifications to support our particular board.

First, you'll need to install the Arduino software.

If you already have it installed, then skip this step.

Install Sanguino Software

Visit the Sanguino Software download page and download the latest version of the Sanguino software.

Copy Sanguino folders

Unzip the Sanguino software file. It contains some folders that need to be copied into the Arduino software directory.

For arduino-0018 and newer:

copy /sanguino to arduino-0018/hardware/ You should end up with arduino-0018/hardware/sanguino/
For arduino-0012

copy sanguino-software-1.x/cores/sanguino to arduino-0012/hardware/cores/sanguino
copy sanguino-software-1.x/bootloaders/atmega644p to arduino-0012/hardware/bootloaders/atmega644p
copy all the folders in sanguino-software-1.x/libraries/ to arduino-0012/hardware/libraries/ overwriting the existing libraries.
Edit boards.txt

This is only for arduino-0012 or older

Open the Arduino file located at arduino-0012/hardware/boards.txt and append the text from sanguino-software-1.x/boards.txt to the end of the arduino boards.txt file.

If you open the file in Notepad, it will look like crap. Use a decent file editor like Notepad++

Restart Arduino

Restart (or start) your Arduino host software. From the Tools -> Board menu, select the Sanguino board. You will now be able to use your Sanguino board just as you would a normal Arduino board.
Re: Everything was going so well...
January 15, 2014 07:40PM
Alright, everything seems to compile on Windows. I'll post the relevant files tonight if I can upload the firmware in case anyone has the same problem.
Re: Everything was going so well...
January 16, 2014 01:16AM
Alright. I can upload Sprinter to the Huxley! I have to run it in Windows *grumble*. I'm using Arduino-0023, Sanguino 23r4, and Sprinter from around November 2011 using git. I've updated the wiki with the details.

At this point, I'm finding that actually making things work on my printer to be a nightmare. I might try newer versions of Sprinter, or just dive in and mess around with calibration for a bit. Right now the endstops don't work, the Y axis only moves in one direction (but x,z, and extruder do, huh). Attached my current Sprinter configuration.h for anyone familiar with Sprinter to take a look at,
Attachments:
open | download - Configuration.h (9.5 KB)
Sorry, only registered users may post in this forum.

Click here to login