Topics

Errors using the IDE for Arduino


Dave Glenn
 

Followed the directions in setting up the environment but getting many errors when trying to verify. 
I feel it must be something global to the IDE to get so many syntax type errors. using 1.8.13 version of the arduino IDE

Error:
Arduino: 1.8.13 (Windows 10), Board: "Adafruit Feather M4 Express (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, Off"
 
 
 
 
 
In file included from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:34: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                  ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:33: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:17: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:16: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_altimeter.h:36,
 
                 from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:81:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/model_baro.h: In member function 'int BarometerModel::begin()':
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/model_baro.h:102:17: error: 'class Adafruit_BMP3XX' has no member named 'begin_SPI'
 
  102 |       if (baro->begin_SPI(bmp_cs)) {
 
      |                 ^~~~~~~~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_baro.h: In member function 'void ViewBaro::scaleMarks(int, int)':
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_baro.h:320:62: error: call of overloaded 'map(int&, int, float, int, const int&)' is ambiguous
 
  320 |       int deltay = map(p,   0,fMaxPa - fMinPa,  0,graphHeight);
 
      |                                                              ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_baro.h: In member function 'void ViewBaro::drawGraph()':
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_baro.h:463:88: error: call of overloaded 'map(float&, float&, float&, const int&, const int&)' is ambiguous
 
  463 |           int y1 = map(baroModel.pressureStack[ii].pressure,  yBotPa,yTopPa,  yBot,yTop);
 
      |                                                                                        ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/view_baro.h:469:61: error: call of overloaded 'map(time_t&, time_t&, time_t&, const int&, const int&)' is ambiguous
 
  469 |           int x1 = map( t1,   minTime,maxTime,  xDay1,xRight);
 
      |                                                             ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:89:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h: At global scope:
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h:38:8: error: 'DS1804' does not name a type; did you mean 'DS1804_H'?
 
   38 | extern DS1804 volume;                 // digital potentiometer
 
      |        ^~~~~~
 
      |        DS1804_H
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h: In member function 'void ViewVolume::setVolume(int)':
 
C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h:122:7: error: 'volume' was not declared in this scope; did you mean 'volumeUp'?
 
  122 |       volume.setWiperPosition( wiperPosition );
 
      |       ^~~~~~
 
      |       volumeUp
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: At global scope:
 
Griduino:227:1: error: 'DS1804' does not name a type; did you mean 'DS1804_H'?
 
  227 | DS1804 volume = DS1804( PIN_VCS,     PIN_VINC,  PIN_VUD,  DS1804_TEN );
 
      | ^~~~~~
 
      | DS1804_H
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: In function 'void mapTouchToScreen(TSPoint, Point*)':
 
Griduino:389:69: error: call of overloaded 'map(int16_t&, int, int, int, int16_t)' is ambiguous
 
  389 |   screen->x = map(touch.y,  Y_MIN_OHMS,Y_MAX_OHMS,    0, tft.width());
 
      |                                                                     ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
Griduino:390:70: error: call of overloaded 'map(int16_t&, int, int, int, int16_t)' is ambiguous
 
  390 |   screen->y = map(touch.x,  X_MAX_OHMS,X_MIN_OHMS,    0, tft.height());
 
      |                                                                      ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: In function 'void setup()':
 
Griduino:848:3: error: 'volume' was not declared in this scope
 
  848 |   volume.unlock();                    // unlock digipot (in case someone else, like an example pgm, has locked it)
 
      |   ^~~~~~
 
Multiple libraries were found for "SdFat.h"
 
 Used: C:\Users\Ham\Documents\Arduino\libraries\SdFat
 
 Not used: C:\Users\Ham\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork
 
exit status 1
 
'DS1804' does not name a type; did you mean 'DS1804_H'?
 


Barry Hansen
 

Here’s a first guess at one thing to start with. 
It would seem that your Griduino files are stored within the “libraries “ folder.

Ref:
 C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h:122:7: error: 'volume' was not declared in this scope; did you mean 'volumeUp'?

The standard practice is to store the source tree in a folder with the same name as the .INO file. Also avoid hyphens in filenames for the Arduino workbench; they usually work until it’s shared with someone and then there’s compatibility issues. So create a folder named “ C:\Users\Ham\Documents\Arduino\Griduino\” and move all of the Griduino files up there. This would be a good start. Let us know how it works. 

Barry

On Feb 24, 2021, at 4:10 PM, Dave Glenn <n6teb@...> wrote:

C:\Users\Ham\Documents\Arduino\libraries\Griduino-master/cfg_volume.h:122:7: error: 'volume' was not declared in this scope; did you mean 'volumeUp'?


Dave Glenn
 

Thanks Barry, 
Seems to be getting better but still getting these syntax type errors. Any more clues?

Arduino: 1.8.13 (Windows 10), Board: "Adafruit Feather M4 Express (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, On"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
In file included from sketch\save_restore.cpp:29:
 
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h
 
   38 | #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h
 
      |  ^~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:42:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h
 
   42 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h
 
      |  ^~~~~
 
In file included from sketch\cfg_volume2.cpp:30:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:34: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                  ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:33: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:17: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:16: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
cfg_volume2.cpp:42:8: error: 'DS1804' does not name a type; did you mean 'DS1804_H'?
 
   42 | extern DS1804 volume;                 // digital potentiometer
 
      |        ^~~~~~
 
      |        DS1804_H
 
sketch\cfg_volume2.cpp: In function 'void setVolume2(int)':
 
cfg_volume2.cpp:100:3: error: 'volume' was not declared in this scope; did you mean 'volMute2'?
 
  100 |   volume.setWiperPosition( wiperPosition );
 
      |   ^~~~~~
 
      |   volMute2
 
In file included from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:34: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                  ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |                             ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                   ^~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:33: note: to match this '('
 
  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))
 
      |                                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'
 
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
 
      |          ^~~~~~~~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:17: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                 ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:22: error: expected ')' before 'x'
 
   87 | uint32_t abs(int32_t x);
 
      |                      ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:18: note: in definition of macro 'abs'
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                  ^
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:131:16: note: to match this '('
 
  131 | #define abs(x) ((x)>0?(x):-(x))
 
      |                ^
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:87:10: note: in expansion of macro 'abs'
 
   87 | uint32_t abs(int32_t x);
 
      |          ^~~
 
In file included from sketch\view_altimeter.h:36,
 
                 from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:81:
 
sketch\model_baro.h: In member function 'int BarometerModel::begin()':
 
model_baro.h:102:17: error: 'class Adafruit_BMP3XX' has no member named 'begin_SPI'
 
  102 |       if (baro->begin_SPI(bmp_cs)) {
 
      |                 ^~~~~~~~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
sketch\view_baro.h: In member function 'void ViewBaro::scaleMarks(int, int)':
 
view_baro.h:320:62: error: call of overloaded 'map(int&, int, float, int, const int&)' is ambiguous
 
  320 |       int deltay = map(p,   0,fMaxPa - fMinPa,  0,graphHeight);
 
      |                                                              ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
sketch\view_baro.h: In member function 'void ViewBaro::drawGraph()':
 
view_baro.h:463:88: error: call of overloaded 'map(float&, float&, float&, const int&, const int&)' is ambiguous
 
  463 |           int y1 = map(baroModel.pressureStack[ii].pressure,  yBotPa,yTopPa,  yBot,yTop);
 
      |                                                                                        ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:82:
 
view_baro.h:469:61: error: call of overloaded 'map(time_t&, time_t&, time_t&, const int&, const int&)' is ambiguous
 
  469 |           int x1 = map( t1,   minTime,maxTime,  xDay1,xRight);
 
      |                                                             ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:89:
 
sketch\cfg_volume.h: At global scope:
 
cfg_volume.h:38:8: error: 'DS1804' does not name a type; did you mean 'DS1804_H'?
 
   38 | extern DS1804 volume;                 // digital potentiometer
 
      |        ^~~~~~
 
      |        DS1804_H
 
sketch\cfg_volume.h: In member function 'void ViewVolume::setVolume(int)':
 
cfg_volume.h:122:7: error: 'volume' was not declared in this scope; did you mean 'volumeUp'?
 
  122 |       volume.setWiperPosition( wiperPosition );
 
      |       ^~~~~~
 
      |       volumeUp
 
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:50:49: error: expected class-name before ',' token
 
   50 | class Adafruit_SPIFlash : public BaseBlockDriver, public Adafruit_SPIFlashBase {
 
      |                                                 ^
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: At global scope:
 
Griduino:227:1: error: 'DS1804' does not name a type; did you mean 'DS1804_H'?
 
  227 | DS1804 volume = DS1804( PIN_VCS,     PIN_VINC,  PIN_VUD,  DS1804_TEN );
 
      | ^~~~~~
 
      | DS1804_H
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: In function 'void mapTouchToScreen(TSPoint, Point*)':
 
Griduino:389:69: error: call of overloaded 'map(int16_t&, int, int, int, int16_t)' is ambiguous
 
  389 |   screen->x = map(touch.y,  Y_MIN_OHMS,Y_MAX_OHMS,    0, tft.width());
 
      |                                                                     ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
Griduino:390:70: error: call of overloaded 'map(int16_t&, int, int, int, int16_t)' is ambiguous
 
  390 |   screen->y = map(touch.x,  X_MAX_OHMS,X_MIN_OHMS,    0, tft.height());
 
      |                                                                      ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:81,
 
                 from sketch\Griduino.ino.cpp:1:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/WMath.h:25:13: note: candidate: 'long int map(long int, long int, long int, long int, long int)'
 
   25 | extern long map( long, long, long, long, long ) ;
 
      |             ^~~
 
In file included from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:76:
 
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:85:10: note: candidate: 'uint32_t map(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)'
 
   85 | uint32_t map(uint32_t x, uint32_t in_min, uint32_t in_max, uint32_t out_min, uint32_t out_max);
 
      |          ^~~
 
C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino: In function 'void setup()':
 
Griduino:848:3: error: 'volume' was not declared in this scope
 
  848 |   volume.unlock();                    // unlock digipot (in case someone else, like an example pgm, has locked it)
 
      |   ^~~~~~
 
save_restore.cpp:37:1: error: 'FatFileSystem' does not name a type
 
   37 | FatFileSystem gFatfs;          // file system object from SdFat
 
      | ^~~~~~~~~~~~~
 
sketch\save_restore.cpp: In member function 'int SaveRestore::readConfig(byte*, int)':
 
save_restore.cpp:68:19: error: 'gFatfs' was not declared in this scope
 
   68 |   File readFile = gFatfs.open(fqFilename, FILE_READ);
 
      |                   ^~~~~~
 
save_restore.cpp:75:83: error: call of overloaded 'println(long long unsigned int, int)' is ambiguous
 
   75 |   Serial.print(". Total file size (bytes): "); Serial.println(readFile.size(), DEC);
 
      |                                                                                   ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Stream.h:26,
 
                 from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/HardwareSerial.h:24,
 
                 from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:82,
 
                 from sketch\save_restore.cpp:24:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:79:12: note: candidate: 'size_t Print::println(unsigned char, int)'
 
   79 |     size_t println(unsigned char, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:80:12: note: candidate: 'size_t Print::println(int, int)'
 
   80 |     size_t println(int, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:81:12: note: candidate: 'size_t Print::println(unsigned int, int)'
 
   81 |     size_t println(unsigned int, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:82:12: note: candidate: 'size_t Print::println(long int, int)'
 
   82 |     size_t println(long, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:83:12: note: candidate: 'size_t Print::println(long unsigned int, int)'
 
   83 |     size_t println(unsigned long, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:84:12: note: candidate: 'size_t Print::println(double, int)'
 
   84 |     size_t println(double, int = 2);
 
      |            ^~~~~~~
 
save_restore.cpp:76:88: error: call of overloaded 'println(long long unsigned int, int)' is ambiguous
 
   76 |   Serial.print(". Current position in file: "); Serial.println(readFile.position(), DEC);
 
      |                                                                                        ^
 
In file included from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Stream.h:26,
 
                 from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/HardwareSerial.h:24,
 
                 from C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:82,
 
                 from sketch\save_restore.cpp:24:
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:79:12: note: candidate: 'size_t Print::println(unsigned char, int)'
 
   79 |     size_t println(unsigned char, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:80:12: note: candidate: 'size_t Print::println(int, int)'
 
   80 |     size_t println(int, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:81:12: note: candidate: 'size_t Print::println(unsigned int, int)'
 
   81 |     size_t println(unsigned int, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:82:12: note: candidate: 'size_t Print::println(long int, int)'
 
   82 |     size_t println(long, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:83:12: note: candidate: 'size_t Print::println(long unsigned int, int)'
 
   83 |     size_t println(unsigned long, int = DEC);
 
      |            ^~~~~~~
 
C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Print.h:84:12: note: candidate: 'size_t Print::println(double, int)'
 
   84 |     size_t println(double, int = 2);
 
      |            ^~~~~~~
 
sketch\save_restore.cpp: In member function 'int SaveRestore::writeConfig(const byte*, int)':
 
save_restore.cpp:133:3: error: 'gFatfs' was not declared in this scope
 
  133 |   gFatfs.remove(fqFilename);  // delete old file (or else it would append data to the end)
 
      |   ^~~~~~
 
sketch\save_restore.cpp: In member function 'int SaveRestore::openFlash()':
 
save_restore.cpp:179:8: error: 'gFatfs' was not declared in this scope
 
  179 |   if (!gFatfs.begin(&gFlash)) {
 
      |        ^~~~~~
 
save_restore.cpp:190:8: error: 'gFatfs' was not declared in this scope
 
  190 |   if (!gFatfs.exists(CONFIG_FOLDER)) {
 
      |        ^~~~~~
 
Multiple libraries were found for "SdFat.h"
 
 Used: C:\Users\Ham\Documents\Arduino\libraries\SdFat
 
 Not used: C:\Users\Ham\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork
 
exit status 1
 
'DS1804' does not name a type; did you mean 'DS1804_H'?
 
 
 
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
 


Barry Hansen
 

Hi Dave, I had to paw through some Adafruit libraries for clues.

 

Your first error message is this, so I’ll start here:

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h”

 

It suggests the IDE’s library list does not find the correct “SdFatConfig.h” file, which should be from “SdFat_-_Adafruit_Fork”.

Check what libraries are installed using:

  • Open Arduino IDE
  • Tools > Manage Libraries…
  • Choose Type = Installed, and Topic=Data Storage
  • It should show this list:

 


There’s a bunch of SDFat things available. Choosing the right ones are a twisty maze of little passages, all alike.

Note that Griduino has been tested with only the latest, version 1.2.3 of “SdFat – Adafruit Fork” by Bill Greiman.

Let us know if this fixes the first error message or not.

By the way, it will be normal to get compiler warnings about “LITTLE_ENDIAN” and “m_dateTime”.

Cheers, Barry K7BWH

 

From: Griduino@groups.io <Griduino@groups.io> On Behalf Of Dave Glenn
Sent: Thursday, February 25, 2021 9:33 AM
To: Griduino@groups.io
Subject: Re: [Griduino] Errors using the IDE for Arduino

 

Thanks Barry, 
Seems to be getting better but still getting these syntax type errors. Any more clues?

Arduino: 1.8.13 (Windows 10), Board: "Adafruit Feather M4 Express (SAMD51), Enabled, 120 MHz (standard), Small (-Os) (standard), 50 MHz (standard), Arduino, On"

 

In file included from sketch\save_restore.cpp:29:

 

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

 

   38 | #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

 

      |  ^~~~~

 

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:42:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h

 

   42 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h

 

      |  ^~~~~

 

In file included from sketch\cfg_volume2.cpp:30:

 

C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'

 

   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);

 

      |                             ^

 

C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:35: note: in definition of macro 'constrain'

 

  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))

 

      |                                   ^~~

 

C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\cores\arduino/Arduino.h:132:34: note: to match this '('

 

  132 | #define constrain(amt,low,high) ((amt)<(low)?(low):((amt)>(high)?(high):(amt)))

 

      |                                  ^

 

C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:10: note: in expansion of macro 'constrain'

 

   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);

 

      |          ^~~~~~~~~

 

<…snip…>

 

This report would have more information with

"Show verbose output during compilation"

option enabled in File -> Preferences.

 


Dave Glenn
 

I checked the versions of those 3 libraries and found that spiFlash was version 3.4 so I changed it to 3.3.6 but no change. The other 2 are the correct versions. 
I do see I have another sdFat but I chose the one that says adafruitfork
see image below, Also here is the first few lines of errors. look to be the same. 

In file included from sketch\save_restore.cpp:29:
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h
   38 | #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h
      |  ^~~~~
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:42:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h
   42 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h
      |  ^~~~~
C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:50:49: error: expected class-name before ',' token
   50 | class Adafruit_SPIFlash : public BaseBlockDriver, public Adafruit_SPIFlashBase {
      |                                                 ^
In file included from sketch\Griduino.ino.cpp:1:
C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'
   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);
      |                             ^


Barry K7BWH
 

Hi Dave,

Thanks for the update. It sure looks like the Arduino IDE is pulling in the wrong library of something from somewhere.

To figure this out, can you recompile with ‘verbose’ option?

This option is in File > Preferences:

 


Then when you compile, the console output will tell us exactly where it loads each #include file.

Copy/paste it in to an email to me – griduino at gmail.com – you can mail it directly instead of through the forum, if you want.

This is a good puzzle.

Barry Hansen K7BWH

 

From: Griduino@groups.io <Griduino@groups.io> On Behalf Of Dave Glenn
Sent: Thursday, February 25, 2021 5:44 PM
To: Griduino@groups.io
Subject: Re: [Griduino] Errors using the IDE for Arduino

 

I checked the versions of those 3 libraries and found that spiFlash was version 3.4 so I changed it to 3.3.6 but no change. The other 2 are the correct versions. 
I do see I have another sdFat but I chose the one that says adafruitfork
see image below, Also here is the first few lines of errors. look to be the same. 

In file included from sketch\save_restore.cpp:29:

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:38:2: error: #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

   38 | #error ENABLE_EXTENDED_TRANSFER_CLASS must be set to 1 in SdFat SdFatConfig.h

      |  ^~~~~

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:42:2: error: #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h

   42 | #error FAT12_SUPPORT must be set to 1 in SdFat SdFatConfig.h

      |  ^~~~~

C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash\src/Adafruit_SPIFlash.h:50:49: error: expected class-name before ',' token

   50 | class Adafruit_SPIFlash : public BaseBlockDriver, public Adafruit_SPIFlashBase {

      |                                                 ^

In file included from sketch\Griduino.ino.cpp:1:

C:\Users\Ham\Documents\Arduino\libraries\DS1804-master/DS1804.h:86:29: error: expected ')' before 'x'

   86 | uint32_t constrain(uint32_t x, uint32_t a, uint32_t b);

      |                             ^


Dave Glenn
 

I sent an email with the verbose messages. Let me know what you think. 
Dave


Barry Hansen
 

Thanks Dave. I got your message with the verbose compiler dump and I’ll look into it today. I didn’t see any obvious fixes jump out at me right away.

Another user reported compile errors, but I don’t know yet if they’re the same or different. He was previously able to build just fine.

Cheers, Barry

 

From: Griduino@groups.io <Griduino@groups.io> On Behalf Of Dave Glenn
Sent: Friday, February 26, 2021 1:31 PM
To: Griduino@groups.io
Subject: Re: [Griduino] Errors using the IDE for Arduino

 

I sent an email with the verbose messages. Let me know what you think. 
Dave


Dave Glenn
 

Hi Barry,
Getting  closer, made all the changes you suggested in email. Down to fewer errors. 
Here is the Verbose listing starting at the first error encountered. 

"C:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"Griduino.ino\"\"\"" -DF_CPU=120000000L -DARDUINO=10813 -DARDUINO_FEATHER_M4 -DARDUINO_ARCH_SAMD -D__SAMD51J19A__ -DADAFRUIT_FEATHER_M4_EXPRESS -D__SAMD51__ -DUSB_VID=0x239A -DUSB_PID=0x8022 -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"Adafruit Feather M4\"" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51J19A__ -DADAFRUIT_FEATHER_M4_EXPRESS -D__SAMD51__ -DUSB_VID=0x239A -DUSB_PID=0x8022 -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"Adafruit Feather M4\"" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\CMSIS\\5.4.0/CMSIS/Core/Include/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\CMSIS\\5.4.0/CMSIS/DSP/Include/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\variants\\feather_m4" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_ILI9341" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\SPI" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\Adafruit_ZeroDMA" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_TouchScreen" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_GPS_Library\\src" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\Wire" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\DS1804\\src" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Time-master" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_BMP3XX_Library" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\SdFat_-_Adafruit_Fork\\src" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_SPIFlash\\src" "C:\\Users\\Ham\\AppData\\Local\\Temp\\arduino_build_880890\\sketch\\unit_test.cpp" -o "C:\\Users\\Ham\\AppData\\Local\\Temp\\arduino_build_880890\\sketch\\unit_test.cpp.o"
In file included from C:\Users\Ham\AppData\Local\Temp\arduino_build_880890\sketch\view_altimeter.h:36,
                 from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:83:
C:\Users\Ham\AppData\Local\Temp\arduino_build_880890\sketch\model_baro.h: In member function 'int BarometerModel::begin()':
model_baro.h:102:1: error: 'R' was not declared in this scope
  102 | R      if (baro->begin_SPI(bmp_cs)) {
      | ^
model_baro.h:148:9: error: 'else' without a previous 'if'
  148 |       } else {
      |         ^~~~
Using library Adafruit_ILI9341 at version 1.5.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_ILI9341 
Using library Adafruit_GFX_Library at version 1.10.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_GFX_Library 
Using library SPI at version 1.0 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\SPI 
Using library Adafruit_ZeroDMA at version 1.0.4 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\Adafruit_ZeroDMA 
Using library Adafruit_TouchScreen at version 1.1.1 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_TouchScreen 
Using library Adafruit_GPS_Library at version 1.5.4 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_GPS_Library 
Using library Wire at version 1.0 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\Wire 
Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_NeoPixel 
Using library DS1804 at version 0.1.1 in folder: C:\Users\Ham\Documents\Arduino\libraries\DS1804 
Using library Time-master at version 1.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Time-master 
Using library Adafruit_BMP3XX_Library at version 2.0.2 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_BMP3XX_Library 
Using library Adafruit_BusIO at version 1.7.2 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_BusIO 
Using library SdFat_-_Adafruit_Fork at version 1.2.3 in folder: C:\Users\Ham\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork 
Using library Adafruit_SPIFlash at version 3.4.0 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash 
exit status 1
'R' was not declared in this scope
 
 


Barry Hansen
 

Ah, progress. And forward progress at that!

Dave, fetch a new copy of model_baro.h from GitHub and replace the existing file. Something happened to your local copy.

The master copy does not have ‘R’ in line 102, and in fact your line 102 corresponds to the master copy’s line 104.

The ripple effect of a syntax error on 102 causes the mismatched brace message on line 148.

Best regards,

Barry Hansen K7BWH

 

From: Griduino@groups.io <Griduino@groups.io> On Behalf Of Dave Glenn
Sent: Saturday, February 27, 2021 12:33 PM
To: Griduino@groups.io
Subject: Re: [Griduino] Errors using the IDE for Arduino

 

Hi Barry,
Getting  closer, made all the changes you suggested in email. Down to fewer errors. 
Here is the Verbose listing starting at the first error encountered. 

"C:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\arm-none-eabi-gcc\\9-2019q4/bin/arm-none-eabi-g++" -mcpu=cortex-m4 -mthumb -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -fno-threadsafe-statics -nostdlib --param max-inline-insns-single=500 -fno-rtti -fno-exceptions -MMD "-D__SKETCH_NAME__=\"\"\"Griduino.ino\"\"\"" -DF_CPU=120000000L -DARDUINO=10813 -DARDUINO_FEATHER_M4 -DARDUINO_ARCH_SAMD -D__SAMD51J19A__ -DADAFRUIT_FEATHER_M4_EXPRESS -D__SAMD51__ -DUSB_VID=0x239A -DUSB_PID=0x8022 -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"Adafruit Feather M4\"" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -DENABLE_CACHE -Os -DVARIANT_QSPI_BAUD_DEFAULT=50000000 -D__SAMD51J19A__ -DADAFRUIT_FEATHER_M4_EXPRESS -D__SAMD51__ -DUSB_VID=0x239A -DUSB_PID=0x8022 -DUSBCON -DUSB_CONFIG_POWER=100 "-DUSB_MANUFACTURER=\"Adafruit LLC\"" "-DUSB_PRODUCT=\"Adafruit Feather M4\"" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino/TinyUSB/Adafruit_TinyUSB_ArduinoCore/tinyusb/src" -D__FPU_PRESENT -DARM_MATH_CM4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\CMSIS\\5.4.0/CMSIS/Core/Include/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\tools\\CMSIS\\5.4.0/CMSIS/DSP/Include/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\CMSIS-Atmel\\1.2.0/CMSIS/Device/ATMEL/" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\cores\\arduino" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\variants\\feather_m4" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_ILI9341" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_GFX_Library" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\SPI" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\Adafruit_ZeroDMA" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_TouchScreen" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_GPS_Library\\src" "-IC:\\Users\\Ham\\AppData\\Local\\Arduino15\\packages\\adafruit\\hardware\\samd\\1.6.5\\libraries\\Wire" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_NeoPixel" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\DS1804\\src" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Time-master" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_BMP3XX_Library" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_BusIO" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\SdFat_-_Adafruit_Fork\\src" "-IC:\\Users\\Ham\\Documents\\Arduino\\libraries\\Adafruit_SPIFlash\\src" "C:\\Users\\Ham\\AppData\\Local\\Temp\\arduino_build_880890\\sketch\\unit_test.cpp" -o "C:\\Users\\Ham\\AppData\\Local\\Temp\\arduino_build_880890\\sketch\\unit_test.cpp.o"

In file included from C:\Users\Ham\AppData\Local\Temp\arduino_build_880890\sketch\view_altimeter.h:36,

                 from C:\Users\Ham\Documents\Arduino\Griduino\Griduino.ino:83:

C:\Users\Ham\AppData\Local\Temp\arduino_build_880890\sketch\model_baro.h: In member function 'int BarometerModel::begin()':

model_baro.h:102:1: error: 'R' was not declared in this scope

  102 | R      if (baro->begin_SPI(bmp_cs)) {

      | ^

model_baro.h:148:9: error: 'else' without a previous 'if'

  148 |       } else {

      |         ^~~~

Using library Adafruit_ILI9341 at version 1.5.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_ILI9341 

Using library Adafruit_GFX_Library at version 1.10.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_GFX_Library 

Using library SPI at version 1.0 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\SPI 

Using library Adafruit_ZeroDMA at version 1.0.4 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\Adafruit_ZeroDMA 

Using library Adafruit_TouchScreen at version 1.1.1 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_TouchScreen 

Using library Adafruit_GPS_Library at version 1.5.4 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_GPS_Library 

Using library Wire at version 1.0 in folder: C:\Users\Ham\AppData\Local\Arduino15\packages\adafruit\hardware\samd\1.6.5\libraries\Wire 

Using library Adafruit_NeoPixel at version 1.7.0 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_NeoPixel 

Using library DS1804 at version 0.1.1 in folder: C:\Users\Ham\Documents\Arduino\libraries\DS1804 

Using library Time-master at version 1.6 in folder: C:\Users\Ham\Documents\Arduino\libraries\Time-master 

Using library Adafruit_BMP3XX_Library at version 2.0.2 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_BMP3XX_Library 

Using library Adafruit_BusIO at version 1.7.2 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_BusIO 

Using library SdFat_-_Adafruit_Fork at version 1.2.3 in folder: C:\Users\Ham\Documents\Arduino\libraries\SdFat_-_Adafruit_Fork 

Using library Adafruit_SPIFlash at version 3.4.0 in folder: C:\Users\Ham\Documents\Arduino\libraries\Adafruit_SPIFlash 

exit status 1

'R' was not declared in this scope

 

 


Dave Glenn
 

Success!  Thanks for all the help.. I just finished uploading to the feather and all looks good. 
Very cool product. 
Thanks again, 73 Dave N6TEB


Barry Hansen
 

That’s great news, Dave, thanks.

I’ll add a few tips to the programming instructions to help the next guy avoid some potholes.

Have fun with the source code – I know I sure did.

Barry K7BWH

 

From: Griduino@groups.io <Griduino@groups.io> On Behalf Of Dave Glenn
Sent: Sunday, February 28, 2021 11:53 AM
To: Griduino@groups.io
Subject: Re: [Griduino] Errors using the IDE for Arduino

 

Success!  Thanks for all the help.. I just finished uploading to the feather and all looks good. 
Very cool product. 
Thanks again, 73 Dave N6TEB