Marlin: error: unable to find a register to spill in class 'POINTER_REGS'

Created on 12 Oct 2016  Â·  15Comments  Â·  Source: MarlinFirmware/Marlin

If I enable #define PIDTEMP I get the following error:

/Volumes/Data/Github/Marlin/.build/sketch/temperature.cpp: In function 'Temperature::manage_heater() [clone .part.4]':
/Volumes/Data/Github/Marlin/.build/sketch/temperature.cpp:797:1: error: unable to find a register to spill in class 'POINTER_REGS'
 }
 ^
/Volumes/Data/Github/Marlin/.build/sketch/temperature.cpp:797:1: error: this is the insn:
(insn 115 112 117 4 (set (reg:SF 128 [ D.2293 ])
        (mem:SF (post_inc:HI (reg:HI 140 [ ivtmp.114 ])) [7 MEM[base: _146, offset: 0B]+0 S4 A8])) /Volumes/Data/Github/Marlin/.build/sketch/temperature.cpp:684 100 {*movsf}
     (expr_list:REG_INC (reg:HI 140 [ ivtmp.114 ])
        (nil)))
/Volumes/Data/Github/Marlin/.build/sketch/temperature.cpp:797: confused by earlier errors, bailing out
lto-wrapper: /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-gcc returned 1 exit status

Without PIDTEMP, it compiles fine.

  • Marlin RCBugFix as of Oct 11, 2016
  • configured with dual extruder
  • avr-gcc (GCC) 4.9.2

Can anyone help ?

Discussion Question

All 15 comments

Did other tests:
With PID but SINGLENOZZLE it compiles ok.
WIth PID and 1 extruder compiles ok.

What version of Arduino compiler are you using? From memory, I had a
similar issue and got fixed using a newer version.
On Wed., 12 Oct. 2016 at 12:18, ovidiu [email protected] wrote:

Did other tests:
With PID but SINGLENOZZLE it compiles ok.
WIth PID and 1 extruder compiles ok.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/MarlinFirmware/Marlin/issues/5004#issuecomment-253115271,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGcPb9GKtGi50H7w326EqLH-yQwo4Kdaks5qzF-vgaJpZM4KUWT9
.

avr-gcc (GCC) 4.9.2 which comes with Arduin 1.6.13 (latest - I even updated to nightly build)

  • running macOS 10.12

Try a different version. Which version of Marlin are you trying?
On Wed., 12 Oct. 2016 at 12:46, ovidiu [email protected] wrote:

avr-gcc (GCC) 4.9.2 which comes with Arduin 1.6.13 (latest - I even
updated to nightly build)

  • running macOS 10.12

—
You are receiving this because you commented.

Reply to this email directly, view it on GitHub
https://github.com/MarlinFirmware/Marlin/issues/5004#issuecomment-253117925,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGcPbzwPVeKTnWL5Jw-QYmDJi5bcmT8mks5qzGYUgaJpZM4KUWT9
.

Marlin RCBugFix as of Oct 11, 2016

I guess, I'll download older versions of Arduino...

1.6.11 same results

I have run out of ideas.... is this the latest RCBugFix?

Regards,

Ernesto

On 12 Oct. 2016, at 12:55, ovidiu [email protected] wrote:

1.6.11 same results

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

yes, Marlin RCBugFix as of Oct 11, 2016

Thanks for trying. Maybe someone else... For now I have compiled with single extruder (until I need my second one)

Looks as if you try to compile Marlin 1.0.x

Truly. We haven't seen a spill error since late 2015… #1523, #1603, #2253, #2746...

The compiler sometimes gets confused. Sometimes just shuffling the code around at random solves the issue. Perhaps if you move some functions around in temperature.cpp…. This is when code-folding can come in extra handy.

@Blue-Marlin, no I'm sure it's the right version...

@thinkyhead, well... you can't be more right...

I had the above compile error.
I downgraded the Arduino. Recompiled. Same problem.
Restore the Arduino to latest version. . Recompiled. Same problem.
Changed to single nozzle. Compile successfully.
Changed back dual nozzle. Compile successfully !!!! Huh ???

I just hope this will not repeat... It did show up out of the blue after many successful compiles...

Sometimes quitting / restarting Arduino IDE is enough to make it realize something needs a re-compile. Generally the combination of 2 extruders plus PIDTEMP enabled (the default) seems to be implicated in those older issues. But then, maybe there were problematic characters in the file, or maybe whitespace was the issue. It seemed that simply changing the specific file where the compiler complained, in any way, would make the issue go away. So maybe that's all it takes…?

I'm command line compiling so there's no restart. But it's good to know that "messing" with the source code can solve this ...

It's annoying to see this erratic behavior on the compiler... but at least we know these tricks.

Regards,

Ernesto

On 12 Oct. 2016, at 19:41, ovidiu [email protected] wrote:

I'm command line compiling so there's no restart. But it's good to know that "messing" with the source code can solve this ...

—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Crossing my fingers that this is not going to become a regular thing.

Was this page helpful?
0 / 5 - 0 ratings