Error when updating the firmware

#1
I have a gMax 1.5 dual extruder and am using Arduino to upload the new firmware posted by shaqfoo. I have chosen the board as Arduino Mega or Mega 2650 and the incoming port is the USB connection. Each time I load the Marlin.ino file into Arduino and upload, I get an error during compiling. Here is the error.

temperature.cpp: In function 'void manage_heater()':
temperature.cpp:665: error: unable to find a register to spill in class 'POINTER_REGS'
}
^
temperature.cpp:665: error: this is the insn:
(insn 98 97 100 4 (set (reg/v:SF 103 [ pid_input ])
(mem:SF (post_inc:HI (reg:HI 141 [ ivtmp.169 ])) [4 MEM[base: _101, offset: 0B]+0 S4 A8])) temperature.cpp:449 99 {*movsf}
(expr_list:REG_INC (reg:HI 141 [ ivtmp.169 ])
(nil)))
temperature.cpp:665: confused by earlier errors, bailing out
unable to find a register to spill in class 'POINTER_REGS'

AND HERE IS THE ASSOCIATED CODE WITH THE ERROR HIGHLIGHTING THE OPEN BRACKET AFTER THE LAST 'END IF' STATEMENT.

//code for controlling the extruder rate based on the width sensor
#ifdef FILAMENT_SENSOR
if(filament_sensor)
{
meas_shift_index=delay_index1-meas_delay_cm;
if(meas_shift_index<0)
meas_shift_index = meas_shift_index + (MAX_MEASUREMENT_DELAY+1); //loop around buffer if needed

//get the delayed info and add 100 to reconstitute to a percent of the nominal filament diameter
//then square it to get an area

if(meas_shift_index<0)
meas_shift_index=0;
else if (meas_shift_index>MAX_MEASUREMENT_DELAY)
meas_shift_index=MAX_MEASUREMENT_DELAY;

volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] = pow((float)(100+measurement_delay[meas_shift_index])/100.0,2);
if (volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM] <0.01)
volumetric_multiplier[FILAMENT_SENSOR_EXTRUDER_NUM]=0.01;
}
#endif
}
#define PGM_RD_W(x) (short)pgm_read_word(&x)


Any help???
 
#2
DJ,

What version of Arduino did you use?

I assisted another user and he had the same issue. It turns out it was his Arduino installation. More specifically the version he was using. After some research, we found out it is a known issue with Arduino.

Here is the link to a previous version of Arduino that compiles it fine. You don't have to run a windows installer, just unzip to it's own directory somewhere and run.

http://arduino.googlecode.com/files/ard ... indows.zip

I use 1.0.5 - (yes, I haven't updated in a while but it works for everything I do Arduino wise and that's quite a bit.)

If after you flash you get a MIN Temp error, move extruder2's plug on the ramps board from the T1 pins to T2. So the result will be EXT1 thermistor will plug into T0 on the ramps board, and EXT2 will plug into T2. There will be nothing plugged into T1. Do this only if you occur a mintemp error and that will go away.

If you trigger the Y endstop and it does not have any effect, move the Y endstop plug on the ramps board from YMIN to YMAX position.

Those are the two issues the other user encountered and they are simple and easy to fix.

Download version 1.0.5 from the link above and you should be good to go.

I'll stay tuned.

ShaqFoo
 
#4
Worked perfect with the Version 1.0.5 of Arduino that you linked me to.

I did get the MINTEMP error and moving to Thermistor #2 to T2 fixed it.

Now if I can just overcome this corrupted LCD screen. Looks fine and then is garbled.

Thanks again
 
#5
Garbled LCD? That happens when there is interference from the LCD cables to the ramps board. Those cables are unshielded.

Did they get moved at all?

Also, to clear a garbled screen you can remove/insert an SD card and it will reset the screen. The LCD issue isn't a firmware issue more of a mechanical one.

Try the SD card action I mentioned above.

ShaqFoo
 
#6
Shaq,
Oh, and I forgot to mention that I got the Y-stop error too. Once again, your suggestion in the above post solved the issue.

thanks again, dJ
 
#8
Not that I'm aware of.

The easiest way to isolate the issue is just reflash back. If the fan becomes operational, I'll delve deeper. If it doesn't , then you know it's the fan.

Also make sure the fan wires on in the ramps box are tight and secure and also that the fan wires are screwed in to the terminal blocks on the back of the extruder.

Nothing was modified in terms of cooling or fan pin designation so that is odd and no other users have had this issue. Heading out....I'll check back here in a few.
 
#10
I never got my fan working through the SD card mechanism file delivery so I switched to Repetier. The fan turns on and off perfectly. I did seem to damage my SD card reader so that may be the issue. I put the card in backwards accidental, but didnt jam force it in there. I suppose it was enough to bend the back part of the casing because now it only works if I squeeze it effectively pressing the card connections on the reading portion of SD card reader. this is why I switched to Repetier.
 
#11
cncpadawan said:
Hello!

Wanted to note I have upgraded to the firmware, and thus far, my fans seem to be working ok. Did you get the problem figured out?
Great! I'm glad it's working out for you.

Do you have a single or dual extruder? What new features have you used? Please share your experiences so others can learn from them.

Thanks!

ShaqFoo.

p.s. For the record, any issues people have had have all been mechanical or hardware related. (loose nozzle, loose belt, broken SD card,etc). Nothing to do with the firmware. The firmware is stable.
 
#12
This thread saved me many headaches.

My first issue was updating the firmware which I attempted myself awhile back prior to finding shaqFoo's post. After digging for awhile I realized that I needed to use and older version of Arduino to compile it. However shaq I greatly appreciate your extra comments in the firmware you uploaded.

Once I got it uploaded then came the min temp issue and a non functional Y end stop. Implemented both solutions here and it now works like a charm.

I started upgrading things for the Bed Auto-Level awhile back and designed a mount and arm for the servo/micro switch that replaces the LED Mount on the front of my dual extruder. I will test my setup and post my stuff in the next few days.

THANKS A BUNCH. :D
 
#14
Hi All,

It would be great if someone would create a short step-by-step for neophytes who may not be aware that their Gmax is using Ramps board rev1.4 and the firmware instructions are:

1. Download Arduino dev environment from the Arduino site Version 1.0.5 (not the latest)
2. Download Firmware from this forum depending on your printer.
3. Unzip, start Arduino dev environment and open the Marlin.pde file from the unziped folder
4. If desired Make the changes to the configuration.h (it will be one of the files that the ide will load) as discussed in this forum.
5. Verify the build (little checkbox in the upper left hand corner of the ide). Should build cleanly
6. Verify that the board selected is the "Mega 2560 or Mega SDK" and the port points to the serial port that appeared when you plugged in the gMax into your machine's usb port.
7. Perform the upload.

Please refer to the previous posts here on how to address Err: MINTEMP and the fact that your printer is now ignoring your y-endstop.

or something to that effect.

Nick
 
#15
Casper said:
I started upgrading things for the Bed Auto-Level awhile back and designed a mount and arm for the servo/micro switch that replaces the LED Mount on the front of my dual extruder. I will test my setup and post my stuff in the next few days.

THANKS A BUNCH. :D
Waiting ... Holding breath .... :D. Yes thanks to this thread my firmware upgrade was a non event. Thanks to everyone and especially to shaqFoo!!!!

Nick