Problem getting Grove Starer Kit to Work

I have the Grove starter kit. I have followed all the instructions. But whne I try to get the rgb light experiment to work, I am having problems.
When I run the command:

g++ rgb_lcd_demo.cpp -o rgb_lcd_demo -g -Wall -lupm-i2clcd

I get this error message:
In file included from rgb_lcd_demo.cpp:9:0:
/usr/local/include/upm/jhd1313m1.h:33:17: fatal error: upm.h: No such file or directory
#include <upm.h>
^
compilation terminated.

I can see this file at
/usr/local/include/upm/upm.h

How can I get this code to compile?

Hi @dstrower,

It looks like the header fils of libupm for building the sources are missing.

Would you mind trying installing the package bellow and try again?


$ sudo apt-get install libmraa-dev libupm-dev

I tried that and I have the same problem.

Hi @dstrower,

I am downloading the latest 16.09 image to try it your situation and it still showing that I have to wait more than an hour for finishing downloading it.

I will post the result when I retry on my place.

Hi @dstrower,

From your error message, it seems like searching different include path than the libupm headers are installed.

This is the path where the headers of libupm is installed.


$ dpkg-query -L libupm-dev | grep jhd1313m1.h
/usr/include/upm/jhd1313m1.h

And this is the default search patch for include path of g++.


$ echo | gcc -Wp,-v -x c++ - -fsyntax-only
ignoring duplicate directory &quot;/usr/include/aarch64-linux-gnu/c++/4.9&quot;
ignoring nonexistent directory &quot;/usr/local/include/aarch64-linux-gnu&quot;
ignoring nonexistent directory &quot;/usr/lib/gcc/aarch64-linux-gnu/4.9/../../../../aarch64-linux-gnu/include&quot;
#include &quot;...&quot; search starts here:
#include &lt;...&gt; search starts here:
 /usr/include/c++/4.9
 /usr/include/aarch64-linux-gnu/c++/4.9
 /usr/include/c++/4.9/backward
 /usr/lib/gcc/aarch64-linux-gnu/4.9/include
 /usr/local/include
 /usr/lib/gcc/aarch64-linux-gnu/4.9/include-fixed
 /usr/include/aarch64-linux-gnu
 /usr/include
End of search list.

But your error message is looking the path for “/usr/local/include/” instead of “/usr/include”

Did you install gcc/g++ by yourself other than debian repository?

How about trying adding include path?


$ g++ -I /usr/local/include/ rgb_lcd_demo.cpp -o rgb_lcd_demo -g -Wall -lupm-i2clcd

I got it to work! I loaded the latest version of UNIX but I had the same problem. I am confused as to why it works for you and not me if we are running the same version of the US. I followed the instructions.
Your post gave me an idea. I renamed the file in directory /usr/local/include/ so that it is no longer found when the compile is done. This forces the compiler to find the correct jhd1313m1.h file. After the compile, I hooked u the LCD display and I run the executable program and it worked.

Thank you for your help.

Hi @dstrower,

Thank you for letting us know that the LCD display is working.

This is the entire procedure I tried.


$ ntpdate pool.ntp.org
(this is to confirm network connection and set the correct time for building the source later)
$ sudo apt-get update
$ sudo apt-get dist-upgrade -u
$ sudo apt-get install git build-essential autoconf automake libtool swig3.0 python-dev nodejs-dev cmake pkg-config libpcre3-dev
$ sudo apt-get install libmraa-dev libupm-dev
$ sudo apt-get clean
$ git clone https://github.com/96boards/Starter_Kit_for_96Boards
$ cd Starter_Kit_for_96Boards
$ cd rgb_lcd_demo
$ make
$ sudo ./rgb_lcd_demo

Happy to know it is working at your place now.

Hi @dstrower,

Oh, also I used the 16.09 Debian linaro-alip image.

1 Like

Hi there, I’m also having this issue. I have tried all the above steps, but am having no luck at all, do you have any ideas what might be wrong?

linaro@linaro-alip:~$ cd Starter_Kit_for_96Boards/
linaro@linaro-alip:~/Starter_Kit_for_96Boards$ ls
96Boards-Sensorskit-RevC-Getting-Started-A4.pdf  LICENSE      humid_temp    touch_switch
96Boards-Sensorskit-RevC-Getting-Started-A6.pdf  Sensors.pdf  light_buzz    tweeting_doorbell
96Boards-Sensorskit-RevC-Getting-Started.odt     button_led   rgb_lcd_demo
linaro@linaro-alip:~/Starter_Kit_for_96Boards$ cd rgb_lcd_demo/
linaro@linaro-alip:~/Starter_Kit_for_96Boards/rgb_lcd_demo$ make
g++ -Wall -g  -lupm-i2clcd  rgb_lcd_demo.cpp   -o rgb_lcd_demo
In file included from rgb_lcd_demo.cpp:9:0:
/usr/local/include/upm/jhd1313m1.h:33:17: fatal error: upm.h: No such file or directory
 #include &lt;upm.h&gt;
                 ^
compilation terminated.
&lt;builtin&gt;: recipe for target &#039;rgb_lcd_demo&#039; failed
make: *** [rgb_lcd_demo] Error 1

and…

linaro@linaro-alip:~/Starter_Kit_for_96Boards/rgb_lcd_demo$ g++ -I /usr/local/include/upm/ rgb_lcd_demo.cpp -o rgb_lcd_demo -g -Wall -lupm-i2clcd
In file included from rgb_lcd_demo.cpp:9:0:
/usr/local/include/upm/jhd1313m1.h:33:17: fatal error: upm.h: No such file or directory
 #include &lt;upm.h&gt;
                 ^
compilation terminated.

linaro@linaro-alip:~/Starter_Kit_for_96Boards/rgb_lcd_demo$ g++ -I /usr/local/include/ rgb_lcd_demo.cpp -o rgb_lcd_demo -g -Wall -lupm-i2clcd
In file included from rgb_lcd_demo.cpp:9:0:
/usr/local/include/upm/jhd1313m1.h:33:17: fatal error: upm.h: No such file or directory
 #include &lt;upm.h&gt;
                 ^
compilation terminated.

I have tried also to rename the files in /usr/local/include/ which results in that file not being found…

linaro@linaro-alip:~/Starter_Kit_for_96Boards/rgb_lcd_demo$ make
g++ -Wall -g  -lupm-i2clcd  rgb_lcd_demo.cpp   -o rgb_lcd_demo
rgb_lcd_demo.cpp:9:27: fatal error: upm/jhd1313m1.h: No such file or directory
 #include &quot;upm/jhd1313m1.h&quot;
                           ^
compilation terminated.
&lt;builtin&gt;: recipe for target &#039;rgb_lcd_demo&#039; failed
make: *** [rgb_lcd_demo] Error 1

I’m using 4.4.23-linaro-lt-qcom with the Qualcomm dragonboard 410c, any help would be greatly appreciated.

Thanks

I had the exact same problem as James.
I tryied to include

g++ -I /usr/local/include/ -I /usr/local/include/upm rgb_lcd_demo.cpp -o rgb_lcd_demo -g -Wall -lupm-i2clcd

I also edited the rgb_lcd_demo.cpp file and included:

#include "/usr/local/include/upm/jhd1313m1.h" #include "/usr/local/include/upm/upm.h"

But the compilation cannot find the upm as a type.

This is caused by an API change (and other re-organisation) of the UPM library.
You need to change


#include &quot;upm/jhd1313m1.h&quot;

To:


#include &quot;upm/jhd1313m1.hpp&quot;

not working please help, could not able to find any upm folder into my user local include…

It seems this is related to:

dragonboard410-c not maintaining any document, where we can check debian version base changes and get to know which function is changed and which not. also starter kit guide contain old examples which not working on new debian version buster. LInux kernal not work after update all radio networks devices seems not working. and for this we need to reinstall … how we can learn in fast mood

I used the latest version of linaro-dev: 660.
I had to make modifications to the code and Makefile.

g++ doesn’t seem to have default path defined correctly, I had to specify them in the Makefile and correct the libraries to link:
LDFLAGS=-L/usr/lib/aarch64-linux-gnu -lupm-lcd -lupm-jhd1313m1
Added the path for include files (normally, it shouldn’t be necessary)
CXXFLAGS=-Wall -g -I/usr/include -I/usr/include/upm

The code itself needed a minor correction:
added:
#include <unistd.h> /* For sleep() */

With that, it worked!