Compiler warning for Grand Central M4

Hydropower

New member
I try to compile Sunray 1.0.324 but get compiler errors about SDCARD_SS_PIN being redefined. I read that I should downgrade Adafruit SAMD Boards to 1.7.5, so I did, but I get the same result anyway.
I have searched the forum and from what I can find others get past this issue by downgrading to 1.7.5, but that won't work for me. Am I missing something obvious?

Br.
Henrik
 
Are you sure it's error and not simple warning ?
It compile on my side with samd 1.7.16
Check the installed library into arduino ide Certainly you don't have the correct one.
 
Are you sure it's error and not simple warning ?
It compile on my side with samd 1.7.16
Check the installed library into arduino ide Certainly you don't have the correct one.
You are right, it's a warning. Although it disturbs me that I cannot get a clean build on an unmodified software!
I am sure I build the 1.7.5 version of samd and a clean 1.0.324 with only the configs.h copied and adjusted on a few minor points (like encoder setting).

It feels like we have a mixed up order of compilation since the configs.h has defined the SDCARD_SS_PIN (which it won't do if it already exist) and later one of the samd-files tries to define the same macro. The samd parts should, in my mind, come before the sunray application code!
 
Zuletzt bearbeitet:
If I take
Code:
#include "config.h"
in sunray and robot.h and move them to the end of their include-sections.
If I then take
Code:
#include <Arduino.h>
in battery.cpp and move it to the top of its include-section.
I then get a project that compiles clean, without any warnings!

Am I the only one with this issue or is everyone else just ignoring the warnings?
 
This, of course, assumes that we don't intend to replace the default assignment of SDCARD_SS_PIN (that is to PIN_SPI1_SS) with a 4. I have not taken the time to evaluate what PIN_SPI1_SS actually boils down to, I just assumes it will be 4 in the end (and I'm not in a state with my build where I can test if it actually works on real hardware, I can just see that the compilation warnings are gone). If that is not the case and we want it to be 4, then there should at least be a comment about why there is a compilator warning.
 
Oben