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

I am sorry, i 've now realised that i am at the wrong place i had to post it on "Avrdude, stk500, Bootloader issues"
I am sorry, i 've now realised that i am at the wrong place i had to post it on "Avrdude, stk500, Bootloader issues"
I am sorry, i 've now realised that i am at the wrong place i had to post it on "Avrdude, stk500, Bootloader issues"

Hello people,

I am having a problem trying to upload a sketch on an Attiny. While i am able to upload it and run it perfectly on an Attiny85 using the Mellis's core i am having trouble uploading the sketch using Konde's core or (on a digispark) by using digistump's core.

You might thinking "why do you want to try and use a diferent core, when you can do your job just by using the first one?" and the answer is because i need to compile the code on an attiny167 or on a digispark Pro that its on supported by Mellis's core.

first of all i had two errors, one was "fixed" by just adding -fpermissive to platforms.txt the other one that i just can find a way (and i have tried too many things) is this:

C:\Program Files (x86)\Arduino\libraries\{Library}\{file}.cpp:89:1: error: unable to find a register to spill in class 'POINTER_REGS'

 }

 ^

C:\Program Files (x86)\Arduino\libraries\{Library}\{file}.cpp:89:1: error: this is the insn:

(insn 53 52 55 9 (set (reg:SF 56 [ D.4251 ])

        (mem:SF (post_inc:HI (reg:HI 70 [ ivtmp.95 ])) [9 MEM[base: _87, offset: 0B]+0 S4 A8])) C:\Program Files (x86)\Arduino\libraries\{Library}\{file}.cpp:78 99 {*movsf}

     (expr_list:REG_INC (reg:HI 70 [ ivtmp.95 ])

        (nil)))

C:\Program Files (x86)\Arduino\libraries\{Library}\{file}.cpp:89: confused by earlier errors, bailing out

I 've tried:

  • Re-installing Arduino
  • Deleting Arduino15 folder and 1
  • Changing platform.txt (even if i have no idea too many things about it..)
  • +many other things..

does anyone have any idea, at least how to work around the proplem ?

Thanks in advance,
George

I believe this is caused by a bug in the compiler:

Supposedly, the bug has been fixed in GCC 7. Although the current stable release of Arduino AVR Boards (which those ATtiny cores share compiler with) uses avr-gcc 5.4.0, the plan is to update to 7.3.0 soon and there is already a beta test version of Arduino AVR Boards available that uses it. Although the beta is mostly intended to be used for testing, I've been using it for 6+ months now exclusively without having a single problem, so I feel it's good enough for normal use. You can install it like this:

  • File > Preferences
  • Click the button on the right side of the "Additional Boards Manager URLs" field.
  • In the dialog that opens, add a new line to the input field and enter the following URL: http://downloads.arduino.cc/packages/package_avr_7.3.0_staging_index.json
  • Click the "OK" button.
  • Click the "OK" button.
  • Tools > Board > Boards Manager
  • Wait for the downloads to finish
  • Click on "Arduino AVR Boards by Arduino".
  • Click the "Update" button.
  • Wait for the update to finish. You should now have Arduino AVR Boards 1.6.220 installed.'
  • Click the "Close" button.
  • Cross your fingers for luck and try compiling your sketch again.

Wish you the best day! you 've made my day! Thanks you very much! the error has dissapeared!

You're welcome. I'm glad to hear it's working now. Enjoy!
Per