I seem to be able to build C++ programs from the command line (on the Joule 570) with something like this
g++ -pthread -Wall -Wextra -pedantic -ansi -std=c++1y -ggdb -m64 --sysroot= -m64 -march=corei7 -I/usr/include/upm -I/usr/include/mraa -c myProg.cpp
# other stuff trimmed
g++ objectFiles.o -o myProg -lmraa -lpthread
but when I run and try to use the SPI I get
$ ./myProg
Error initialising SPI bus
This seems to work fine from Eclipse under Ubuntu using that system. Any ideas what's missing from the command line to get programs to work?
I'm running these versions
$ uname -a
Linux intel-corei7-64 4.4.15-yocto-standard # 1 SMP PREEMPT Fri Aug 12 22:04:24 UTC 2016 x86_64 GNU/Linux
$ mraa-gpio version
Version v1.5.1-1-gd043faf on Intel GT Tuchuck
Thanks.
Link Copied
Hi Sarir,
Thanks for your interest in the Intel Joule Platform.
Could you please refer to this thread ( ) a user had the same problem as you. Please try to first update your mraa library first and then use the sample code given in the thread. I hope you find this information useful.
I will be waiting for your reply, have a nice day.
Best Regards,
-Jose.
Hi Sarir,
Were you able to use the SPI interface with the Intel Joule Platform? Please let me know in order to assist you.
Hope you have a nice day!
Best Regards,
-Jose.
I think I have the latest MRAA library: 1.1.5-1, from the command "mraa-gpio version" (for some reason I can't paste into this window).
It still doesn't work.
Hi Sarir,
I'm sorry for the late reply, what error did you get when you try the sample code given in my previous reply? Please let me know in order to assist you.
I will be waiting for your reply, have a nice day!
Best Regards,
-Jose.
For more complete information about compiler optimizations, see our Optimization Notice.