Board index › Products › Audio Codec Shield

Arduino 1.6.3 library errors

5 posts · 19971 views

Arduino 1.6.3 library errors

by jayache80 » Tue Apr 07, 2015 08:59 UTC
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

by guest » Tue Apr 07, 2015 11:04 UTC
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

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

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

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

by jayache80 » Wed Apr 08, 2015 03:32 UTC
Thank you! Yes, your code worked for me.

Re: Arduino 1.6.3 library errors

by guest » Wed Apr 08, 2015 13:17 UTC
excellent, thanks for helping debug that with me. i will update the libraries.