Closed rei-vilo closed 7 years ago
Actually, there are two SPI libraries:
/Users/ReiVilo/Library/Energia15/packages/energia/hardware/cc3200/1.0.2/system/driverlib/spi.h
/Users/ReiVilo/Library/Energia15/packages/energia/hardware/cc3200/1.0.2/libraries/SPI/SPI.h
Order matters!
hardware/cc3200/1.0.2/system/driverlib
is included before hardware/cc3200/1.0.2/libraries/SPI/
, compilation fails, because hardware/cc3200/1.0.2/libraries/SPI/
isn't taken into account.hardware/cc3200/1.0.2/libraries/SPI/
is included before hardware/cc3200/1.0.2/system/driverlib
, compilation succeeds.How can I make use of the "solution" above? Is there a make file or something to edit?
Thanks in advance.
You can easily work around it for now by editing the file:
compiler.driverlib.c.flags="-I{build.system.path}/driverlib" "-I{build.system.path}/inc" "-I{build.system.path}”
and replace it with:
compiler.driverlib.c.flags="-I{build.system.path}" "-I{build.system.path}/inc" "-I{build.system.path}”
Is this trick also valid for the Pervasive Displays library?
Thank you.
Yes it is. The issue is that there is a C compiler include flag that points at {build.system.path}/driverlib. This is an error and it should be {build.system.path}. Driverlib headers should be included with driverlib/xzy.h
Thanks, Robert, it worked like a charm.
For Mac OS X users:
~/Library/Energia15/packages/energia/hardware/cc3200/1.0.2/platform.txt
I'm facing the same problem as well,but I'm running Energia on Windows 10. Could you please help me out?
You need to look for the corresponding folder on Windows and perform the same operation as in https://github.com/energia/cc3200-core/issues/5#issuecomment-247780464
I'm using Energia version 1.6.10E18, and in the path E:\energia-1.6.10E18-windows\energia-1.6.10E18\hardware\energia the only folder I can find is named MSP30 even though I've installed the CC3200 board support package from the board manager. There is only one platform.txt file in the entire Energia installation folder and it doesn't have the above lines of code in it. Appreciate the help,thanks.
On windows the path looks like this: c:\Users\yourname\AppData\Local\Energia15\packages\energia\hardware\cc3200\1.0.2\platform.txt
Thank you so much@StefanSch . The sketch compiles without errors now. :-)
Fixed and committed.
Thanks!
Still to be released.
When the SPI library is called from a library, compilation fails, even when SPI has been included in the main sketch.
The
arm-none-eabi-g++
command line is missing the include-I/Users/ReiVilo/Library/Energia15/packages/energia/hardware/cc3200/1.0.2/libraries/SPI
.