My "stdxxx.h" includes are now above the chibios includes. They now use angled brackets.
Code: Select all
In file included from main.c:31:0:
main.c: In function 'sd2puts':
main.h:118:26: warning: passing argument 1 of 'chprintf' from incompatible pointer type [enabled by default]
#define ESP ((struct BaseSequentialStream *)&SD2)
^
main.c:460:13: note: in expansion of macro 'ESP'
chprintf (ESP, "%s", p);
^
In file included from main.c:25:0:
../ChibiOS_2.6.6/os/various/chprintf.h:69:20: note: expected 'struct BaseSequentialStream *' but argument is of type 'struct BaseSequentialStream *'
static INLINE void chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
^
The "sd2puts" used to call the write to sd2 directly, but while converting to use chprintf, I have this compatibility function that just prints the string using the "new" method...
Giovanni, the message should read something like: "expected 'float *' but argument is of type 'int *'", but apparently the types are different, but the textual representation for the warning message is the same.
So, your suggestion that it SHOULD not be the problem makes me suspicious that it actually IS the problem.
Well... My suspicions were wrong.... Searching for the definition(s) of BaseSequentialStream, I saw examples that used a cast to "(BaseSequentialStream *)&SDU1" instead of the "struct BaseSequentialStream *" that I was using.... I had copied the type from the warning message of gcc instead of from an example. Aaargh!
Correcting the casts and types resulted in many less warnings, leaving just a couple, where one was an actual bug that needed fixing....
Thanks for your help by the way!!