spi.h

189 views
Skip to first unread message

William Premerlani

unread,
Mar 3, 2016, 9:05:48 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
Team,
I am working with some model rocket hobbiests to adapt MatrixPilot to rocket stabilization.
One of them is starting to work on the code. He is using the latest version of MPLABX, which cannot find the file spi.h
It seems to me there was a posting about how to fix that, but I cannot find it.
Can someone refresh my memory?
Best regards,
Bill

Mark Whitehorn

unread,
Mar 3, 2016, 9:24:10 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
Could it be that there is no such file? The branch I have has spiUtils.c and .h, but nothing called spi.*

--
You received this message because you are subscribed to the Google Groups "uavdevboard-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uavdevboard-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

William Premerlani

unread,
Mar 3, 2016, 9:35:05 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
Mark,

Thanks for getting back to me.
I am not sure what is going on.

I am very puzzled.
The same exact code builds just fine for me under an old version of MPLABX.
The code does not build under the latest version of MPLABX. It cannot find spi.h.

The rocket code was forked off an older version of MatrixPilot around the time Robert was restructuring it.
One of the source code files includes spi.h.
On my computer, there is no such file in the MP project, yet somehow the project builds ok.
On my new rocketeer friend's computer, the project does not build. He has the latest version of MPLABX
I recall that others have reported the same problem and that someone (Peter? Robert?) explained that it was an issue with newer versions of MPLABX and explained how to fix it.
Best regards,
Bill

Mark Whitehorn

unread,
Mar 3, 2016, 9:45:01 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
OK, spi.h is in the xc16 support library for the particular MCU you're building for. So the problem must be that something isn't installed properly.

Mark Whitehorn

unread,
Mar 3, 2016, 9:47:13 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
maybe the XC16 compiler isn't installed,

William Premerlani

unread,
Mar 3, 2016, 9:57:57 AM3/3/16
to uavdevboard-dev, Peter Hollands, Robert Dickenson
Mark,
Thanks.
XC16 is installed.
I finally found the spi.h file on my computer, is was very hard to locate. I am sending it to my friend Brian.
I do not remember all of the details exactly, but I am 100% sure that MicroChip made a change in the way that MPLABX works so that the latest versions of MPLABX do not work with some versions of MatrixPilot. I know there was a discussion on this subject, but I cannot find it now.
Best regards,
Bill

Peter Hollands

unread,
Mar 3, 2016, 10:30:13 AM3/3/16
to William Premerlani, uavdevboard-dev, Robert Dickenson
Yes, we did discuss this some time ago on the uavdevboard forum. That link provides detailed instructions with screenshots.

The newer versions of the XC16 compiler no longer come with the support library that includes spi.h in the Microchip application folder.
The same issue can also cause an error with delay.h
So with the new versions of XC16 you now have to download the peripheral support library and install it separately. So new users will now have to download:-
  • MPLAB-X
  • The XC16 compiler
  • and the Peripheral Support Libary which includes spi.h
Best wishes, Pete

Mark Whitehorn

unread,
Mar 3, 2016, 10:38:59 AM3/3/16
to uavdevb...@googlegroups.com, William Premerlani, Robert Dickenson
Just installed the latest MPLAB (3.25) and XC16 compiler (1.25) on Ubuntu 15.10. Verified the compiler error before installing the dsPIC support library for the new compiler.
The integrated git support looks like a big improvement :)
Bill, I'd recommend that the rocket guys install the complete support lib to make sure the compiler works properly.

73, Mark

William Premerlani

unread,
Mar 3, 2016, 10:51:01 AM3/3/16
to Peter Hollands, br...@liquidfyre.com, uavdevboard-dev, Robert Dickenson
Hi Peter:
Thank you so much.
Brian:
See below.
Best regards,
Bill

William Premerlani

unread,
Mar 3, 2016, 10:51:58 AM3/3/16
to Mark Whitehorn, br...@liquidfyre.com, uavdevboard-dev, Robert Dickenson
Mark,
Thanks.

Brian:
See below.
Bill
Reply all
Reply to author
Forward
0 new messages