Compile struggle

Hi Folks!

I'm trying to compile THAT programm.

I got first errors fixed in my LAST.

I also modified the WaveRP.h library in the bastl libs. Make full path call to the same SdFat.h call.

No I come along with multiple errors and I don't know how to figure it out.

I cannot post errors it's too long :cry:

Could somebody help me going through that?!

Thank's!

When you encounter an error you'll see a button on the right side of the orange bar "Copy error messages". Click that button. Paste the error in a message here USING CODE TAGS (</> button on the toolbar).

Also, see my last reply on your other thread:
http://forum.arduino.cc/index.php?topic=541430.msg3689836#msg3689836

Hi pert!

I didn't see that last reply! That's what I was suspecting about the libraries...

I added full path to "WaveRP.h" "SdFat.h" call. This is part of the bastl LIBRARY provided.

I cannot paste all the errors, it's too long... Here's a part:

Arduino : 1.8.5 (Linux), Carte : "Arduino/Genuino Uno"

In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:93:19: error: 'SdBaseFile' does not name a type
   volatile static SdBaseFile *sdFile;

                   ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:13: error: 'SdBaseFile' has not been declared
   bool play(SdBaseFile* file); //,uint32_t _pos=0

             ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:137:15: error: 'SdBaseFile' has not been declared
   bool record(SdBaseFile* file, uint16_t rate, uint8_t pin, uint8_t ref);

               ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:141:13: error: 'SdBaseFile' has not been declared
   bool trim(SdBaseFile* file);

             ^
grandPa_1_2:84: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t noteSampleRateTable[65]={
         ^
grandPa_1_2:226: error: 'prog_uint16_t' has not been declared
 uint32_t curveMap(uint16_t value, uint8_t numberOfPoints, prog_uint16_t * tableMap){
                                                           ^
In file included from /home/jean/arduino-1.8.5/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
                 from sketch/grandPa_1_2.ino.cpp:1:
/home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino: In function 'uint32_t mapVOct(uint16_t)':
grandPa_1_2:194: error: 'noteSampleRateTable' was not declared in this scope
       if(abs(value-cvInputCalibrate[i])<3) return pgm_read_word_near(noteSampleRateTable+(i*6));
                                                                      ^
grandPa_1_2:195: error: 'noteSampleRateTable' was not declared in this scope
       if(abs(value-cvInputCalibrate[i+1])<3) return pgm_read_word_near(noteSampleRateTable+((1+i)*6));
                                                                        ^
grandPa_1_2:206: error: 'noteSampleRateTable' was not declared in this scope
       outMax=pgm_read_word_near(noteSampleRateTable+((i*6)+_note+1));//tableMap[numberOfPoints+i+1];
                                 ^
grandPa_1_2:207: error: 'noteSampleRateTable' was not declared in this scope
       outMin=pgm_read_word_near(noteSampleRateTable+(i*6)+_note+0);
                                 ^
/home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino: At global scope:
grandPa_1_2:219: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t granSizeMap[16]={
         ^
grandPa_1_2:223: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t shiftSpeedMap[20]={
         ^
grandPa_1_2:226: error: 'prog_uint16_t' has not been declared
 uint32_t curveMap(uint16_t value, uint8_t numberOfPoints, prog_uint16_t * tableMap){
                                                           ^
MEM:2: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t clearTo[]={
         ^
MEM:31: error: 'prog_char' does not name a type
 PROGMEM prog_char labels[]={
         ^
MEM:78: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t maxValue[]={
         ^
In file included from /home/jean/arduino-1.8.5/hardware/arduino/avr/cores/arduino/Arduino.h:28:0,
                 from sketch/grandPa_1_2.ino.cpp:1:
/home/jean/Arduino/eurorack/grandPa_1_2/MEM.ino: In function 'int maxVal(uint8_t)':
MEM:101: error: 'maxValue' was not declared in this scope
   return  pgm_read_word_near(maxValue+_maxVal);
                              ^
/home/jean/Arduino/eurorack/grandPa_1_2/MEM.ino: In function 'void clearSound(unsigned char)':
MEM:308: error: 'clearTo' was not declared in this scope
     setVar(i,j, pgm_read_word_near(clearTo+j));
                                    ^
/home/jean/Arduino/eurorack/grandPa_1_2/SD.ino: In function 'bool play(uint8_t)':
SD:128: error: no matching function for call to 'WaveRP::play(SdFile*)'
     if (!wave.play(&file)) { //,uint32_t _pos=0
                         ^
/home/jean/Arduino/eurorack/grandPa_1_2/SD.ino:128:25: note: candidate is:
In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note: bool WaveRP::play(int*)
   bool play(SdBaseFile* file); //,uint32_t _pos=0

        ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note:   no known conversion for argument 1 from 'SdFile*' to 'int*'
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino: At global scope:
SOUND:27: error: 'prog_uint16_t' does not name a type
 PROGMEM prog_uint16_t usefulLengths[17]={
         ^
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino: In function 'void updateSound()':
SOUND:57: error: no matching function for call to 'WaveRP::play(SdFile*)'
           wave.play(&file);
                          ^
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino:57:26: note: candidate is:
In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note: bool WaveRP::play(int*)
   bool play(SdBaseFile* file); //,uint32_t _pos=0

        ^

Yes there's a lot :cry:

Ganjouille:
I cannot paste all the errors, it's too long... Here's a part:

When you need to post text that exceeds the 9000 character limit of the forum you can always save it to a .txt file and then post the file as an attachment. You will see the "Attachments and other options" link after clicking the "Reply" button on a thread.

In this case it's usually best to fix the first errors at the top of the output, then recompile, as often later errors are caused by the prior errors.

Ganjouille:

/home/jean/Arduino/libraries/bastl-master/WaveRP.h:93:19: error: 'SdBaseFile' does not name a type

volatile static SdBaseFile *sdFile;

I didn't see a file named WaveRP.h in the bastl repository you provided a link to.

Ganjouille:

grandPa_1_2:84: error: 'prog_uint16_t' does not name a type

PROGMEM prog_uint16_t noteSampleRateTable[65]={

This is another symptom of the old code. It's easily fixed though. You need to change all instances of prog_uint16_t to const uint16_t. See:

An alternative is to use Arduino IDE 1.0.6, but it's annoying to use such an old IDE version.

Thanks pert! txt file is now attached.

I didn't see a file named WaveRP.h in the bastl repository you provided a link to.

Yes sorry! This is another point. I found this file in the microGranny library.

I merged the two bastl libs into the bastl directory in home/Arduino/libraries/bastl...

Im was on the way making a github repo with all changes I make in the programm, don't know if it can be usefull... I get no response from support email from bastl instruments sadly.

So first I try with the 1.0.6 IDE version.

If not working I will go for make this code compile!

Just for saying: There's also a hex file for granPa_1_1 I already uploaded to the MCU but I have v1.2 PCB...

See ya!

errors.txt (10.1 KB)

So I tried the older IDE version and it's not working. The actual SdFat library is not recognized by the IDE. I probably need the older version... Maybe I can find it.

Next I replaced all prog_uint16_t. Know I get less errors:

Arduino : 1.8.5 (Linux), Carte : "Arduino/Genuino Uno"

In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:93:19: error: 'SdBaseFile' does not name a type
   volatile static SdBaseFile *sdFile;

                   ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:13: error: 'SdBaseFile' has not been declared
   bool play(SdBaseFile* file); //,uint32_t _pos=0

             ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:137:15: error: 'SdBaseFile' has not been declared
   bool record(SdBaseFile* file, uint16_t rate, uint8_t pin, uint8_t ref);

               ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:141:13: error: 'SdBaseFile' has not been declared
   bool trim(SdBaseFile* file);

             ^
grandPa_1_2:84: error: variable 'noteSampleRateTable' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t noteSampleRateTable[65]={
                                        ^
grandPa_1_2:219: error: variable 'granSizeMap' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t granSizeMap[16]={
                                ^
grandPa_1_2:223: error: variable 'shiftSpeedMap' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t shiftSpeedMap[20]={
                                  ^
MEM:2: error: variable 'clearTo' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t clearTo[]={
                          ^
MEM:31: error: 'prog_char' does not name a type
 PROGMEM prog_char labels[]={
         ^
MEM:78: error: variable 'maxValue' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t maxValue[]={
                           ^
/home/jean/Arduino/eurorack/grandPa_1_2/SD.ino: In function 'bool play(uint8_t)':
SD:128: error: no matching function for call to 'WaveRP::play(SdFile*)'
     if (!wave.play(&file)) { //,uint32_t _pos=0
                         ^
/home/jean/Arduino/eurorack/grandPa_1_2/SD.ino:128:25: note: candidate is:
In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note: bool WaveRP::play(int*)
   bool play(SdBaseFile* file); //,uint32_t _pos=0

        ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note:   no known conversion for argument 1 from 'SdFile*' to 'int*'
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino: At global scope:
SOUND:27: error: variable 'usefulLengths' must be const in order to be put into read-only section by means of '__attribute__((progmem))'
 PROGMEM uint16_t usefulLengths[17]={
                                  ^
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino: In function 'void updateSound()':
SOUND:57: error: no matching function for call to 'WaveRP::play(SdFile*)'
           wave.play(&file);
                          ^
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino:57:26: note: candidate is:
In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note: bool WaveRP::play(int*)
   bool play(SdBaseFile* file); //,uint32_t _pos=0

        ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note:   no known conversion for argument 1 from 'SdFile*' to 'int*'
SOUND:74: error: no matching function for call to 'WaveRP::play(SdFile*)'
           wave.play(&file);
                          ^
/home/jean/Arduino/eurorack/grandPa_1_2/SOUND.ino:74:26: note: candidate is:
In file included from /home/jean/Arduino/eurorack/grandPa_1_2/grandPa_1_2.ino:34:0:
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note: bool WaveRP::play(int*)
   bool play(SdBaseFile* file); //,uint32_t _pos=0

        ^
/home/jean/Arduino/libraries/bastl-master/WaveRP.h:136:8: note:   no known conversion for argument 1 from 'SdFile*' to 'int*'
exit status 1
variable 'noteSampleRateTable' must be const in order to be put into read-only section by means of '__attribute__((progmem))'

Ce rapport pourrait être plus détaillé avec
l'option "Afficher les résultats détaillés de la compilation"
activée dans Fichier -> Préférences.

On way could be to replace the code concerning SD card. It look like that's the node of the errors. But there's a huge gap in my knowledges for doing that...

Greetz!

Ah, the library thing is a problem. It's unfortunate that the old releases (assuming they actually were making releases) of the SdFat library don't seem to be available from their original home on Google Code and are also not present in the GitHub repository. The oldest release of the library is still in the 1.5 library format, which is incompatible with Arduino IDE 1.0.6. You can go back farther in history from there. The oldest available version of the library on GitHub is here:
https://github.com/greiman/SdFat/archive/3f7f5cd8e9afb876ecfe9eda19679ebab33109ce.zip
Note that version is in 1.0 library format and also contains the SdFatUtil.h file that is missing from more recent versions of the library. So give that a try. Make sure to remove the #include <SD.h> line so that the Arduino SD library will no longer be used. Now that you've fixed the prog_* type errors you are probably better off to continue using Arduino IDE 1.8.5.