Page 1 of 1

Arduino 1.6.3 library errors

PostPosted: Tue Apr 07, 2015 1:59 am
by jayache80
Hello,

I have an Arduino UNO (an older revision I believe, if that matters) and running Arduino 1.6.3 IDE. I cannot get most of the examples to compile and it appears to be an issue with the libraries. I know I have the libraries installed as they show up in the dropdown menu in the IDE, however I keep getting errors like this:

lfo.pde:36:10: error: 'prog_int16_t' does not name a type
In file included from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/WString.h:29:0,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Print.h:26,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino/Stream.h:26,
from C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire/Wire.h:26,
from lfo.pde:17:
lfo.pde: In function 'void __vector_11()':
lfo.pde:89:30: error: 'sinewave' was not declared in this scope
lfo.pde:98:30: error: 'sinewave' was not declared in this scope
Error compiling.

Is there a compatibility issue I missed? Sorry, I'm kind of a noob.

Re: Arduino 1.6.3 library errors

PostPosted: Tue Apr 07, 2015 4:04 am
by guest
it looks like same problem with the new avr-gcc that arduino comes with. they changed how they put data into program memory. i will have to rewrite the library. you can follow the FHT/FFT threads in regards to progmem if you want to have a look at the issue yourself.

check to see that everything works EXCEPT for sketches that include progmem (sine generator). that pretty much just leaves the delay programs.

Re: Arduino 1.6.3 library errors

PostPosted: Tue Apr 07, 2015 4:27 am
by guest
ok, can you try this for me: open up the sine_generator sketch. change the initial progmem definition at the top frome:

Code: Select all
PROGMEM  prog_int16_t sinewave[]  = {
  // this file is stored in AudioCodec.h and is a 1024 value
  // sinewave lookup table of signed 16bit integers
  // you can replace it with your own waveform if you like
  #include <sinetable.inc>
};


to

Code: Select all
extern const  int16_t sinewave[] PROGMEM = {
  // this file is stored in AudioCodec.h and is a 1024 value
  // sinewave lookup table of signed 16bit integers
  // you can replace it with your own waveform if you like
  #include <sinetable.inc>
};

Re: Arduino 1.6.3 library errors

PostPosted: Tue Apr 07, 2015 8:32 pm
by jayache80
Thank you! Yes, your code worked for me.

Re: Arduino 1.6.3 library errors

PostPosted: Wed Apr 08, 2015 6:17 am
by guest
excellent, thanks for helping debug that with me. i will update the libraries.