Author Topic: virtualwire doesn't compile  (Read 3304 times)

SoundGuy

  • Newbie
  • *
  • Posts: 5
virtualwire doesn't compile
« on: August 11, 2015, 01:39:06 am »
I installed the arduino 1.6.5 and tried to complie a sketch with virtualwire. i get this error

Arduino: 1.6.5 (Windows 8.1), Board: "Digispark (Default - 16.5mhz)"

In file included from C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\cores\tiny/pins_arduino.h:31:0,
                 from C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\cores\tiny/WProgram.h:13,
                 from C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\cores\tiny/Arduino.h:4,
                 from C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\libraries\VirtualWire\VirtualWire.h:146,
                 from C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\libraries\VirtualWire\VirtualWire.cpp:31:
C:\Users\prog-2\AppData\Roaming\Arduino15\packages\digistump\hardware\avr\1.6.5\libraries\VirtualWire\VirtualWire.cpp:273:22: error: variable 'prescalers' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 uint8_t prescalers[] PROGMEM = {0, 0, 3, 6, 8, 10, 12}; /* Must be outside the function */
                      ^
Error compiling.

  This report would have more information with
  "Show verbose output during compilation"
  enabled in File > Preferences.

SoundGuy

  • Newbie
  • *
  • Posts: 5
Re: virtualwire doesn't compile
« Reply #1 on: August 11, 2015, 01:41:20 am »
I added const before that line and now it does complie

SoundGuy

  • Newbie
  • *
  • Posts: 5
Re: virtualwire doesn't compile
« Reply #2 on: August 11, 2015, 01:46:48 am »
commited a fix in github

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: virtualwire doesn't compile
« Reply #3 on: August 13, 2015, 10:21:43 pm »
THANKS for the commit - I'll merge it into the next release!