0
votes

I'm lost at this point and would appreciate any help! I downloaded this library from an old GitHub and I can't even compile it.

Arduino: 1.6.6 Hourly Build 2015/10/14 10:42 (Windows 8.1), Board: "ATtiny 

x5 series, ATtiny85, 8 mhz (internal), B.O.D. Disabled"

Warning: platform.txt from core 'Arduino SAMD (32-bits ARM Cortex-M0+) Boards' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
Warning: platform.txt from core 'ATtiny Classic' contains deprecated recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/{archive_file}" "{object_file}", automatically converted to recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{archive_file_path}" "{object_file}". Consider upgrading this core.
In file included from C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/ShiftPWM.h:25:0,

                 from C:\Users\Luke Bouchard\Documents\Arduino\test\test.ino:13:

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:318:3: error: 'PORTC' was not declared in this scope

  &PORTC,

   ^

C:\Users\Luke Bouchard\Documents\Arduino\libraries\ShiftPWM-master/pins_arduino_compile_time.h:319:3: error: 'PORTD' was not declared in this scope

  &PORTD,

   ^

exit status 1
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.
1
Post your code that you are trying to compile.bigjosh

1 Answers

0
votes

It looks like your library does not support the ATTINY85 chip.

To make the code compatible with the ATTINY, I had to make the following changes to the library...

  • Reduce the code size to fit inside the ATTINY limited FLASH space.
  • Eliminate all dependencies on SPI and Serial hardware since ATTINY doesn't have them.
  • Use the existing Timer0 interrupt for refresh triggers since the ATTINY has fewer timers.
  • Define pin and device mapping for the ATTINY.

I also made some aesthetic changes like having the buffer statically allocated at compile time since without a Serial connection there would be no way to see the "out of memory" error.

The fork is here... https://github.com/bigjosh/ShiftPWM-Redux

The readme includes information on necessary changes to your code to move from the old library to the new one (not hard). The examples in the fork are also updated to work with the new library so are a good start point.