I was toying with a USBwiz dev board, and have successfully gotten it to do some simple things over i2c. I wanted to make use of the library you can download at:
http://www.ghielectronics.com/de...
it is written for the MCC18 compiler, I get a little rambunctious every now and then and just tried to
slap an include into the top of some of the example i2c code from the avr-libc. i.e.:
#include "USBwiz_lib/USBwiz_lib.c"
USBwiz_lib/p18f458.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘unsigned’
the corresponding line from the aforementioned file in the error is:
extern volatile far unsigned char RXF0SIDH;
And then there is a large number that are essentially the same.
and then one other grouping of errors like this:
USBwiz_lib/p19f458.h:2238: warning: ignoring #pragma varlocate
the corresponding line:
#pragma varlocate 15 RXF0SIDH
As you can see they are both related to the same variable, so maybe all of the errors boil down to a single common foreign variable declaration. Is there an easy fix? Would it be prudent to attempt to change those variable declarations to something a little bit more familiar, or should I be enable some different C-standard or something else in my makefile, or am I fighting windmills here and this will never work?
EDIT: wanted to clarify that I am using GCC and that's why I'm posting here; additionally I'm using ubuntu 710 which means the version of GCC is 4.1.3 here