Community
cancel
Showing results for 
Search instead for 
Did you mean: 
thass1
New Contributor I
2,024 Views

Adding C++ sensor library in Eclipse and some other questions

Hi,

I am trying to use a pulse sensor with my Intel Galileo Gen2 board and I have the C++ library for it https://software.intel.com/en-us/iot/hardware/sensors/pulse-sensor https://software.intel.com/en-us/iot/hardware/sensors/pulse-sensor. I tried to search this library in eclipse through sensor support view option but it is not showing in the list. Could anyone please inform me how to use that library mentioned in the previous link in my project.

I also tried to use the same sensor in java program since it's has library in sensor support but when run the code I got no java found error. I followed this instruction for https://software.intel.com/en-us/eclipse-user-guide-for-java installing Java eclipse IDE but got no result. Do we have to install java on the board Linux separately in order to program it in java?

Also is the Linux commands used in Galileo's Linux is similar to other Linux distribution commands? and where can I find the API to write my own programs for the board?

I will appreciate any help in this regard. I search for the forum but couldn't able to find any solution for it.

7 Replies
Pablo_M_Intel
Employee
64 Views

Hi taha82,

To add a new file to your Eclipse library folder follow these steps:

Open Eclipse > Right-click on the name of the project > Click on Properties > Go to C/C++ Build > Go to Settings > Under the Tool Settings tab, go to Cross G++ Linker > Click on Libraries > In the Library Search Path Window you'll see an Add icon, click on it and search for the path of the new library.

There's also a section in the Eclipse User Guide for C/C++ that covers working with sensors, https://software.intel.com/en-us/working-with-sensors-in-eclipse https://software.intel.com/en-us/working-with-sensors-in-eclipse.

About using Java, you'll have to install Java to the board, separately, to make it work.

Regarding the Linux commands, Yocto is very similar to most Linux distributions when it comes to commands. I would suggest you to check this FAQ for more information, https://wiki.yoctoproject.org/wiki/FAQ https://wiki.yoctoproject.org/wiki/FAQ.

Strictly speaking, there's no Galileo API. There are two approaches to program the device: a) using standard Linux techniques and b) using the different IDEs available (Eclipse in your case).

Regards,

PabloM_Intel

thass1
New Contributor I
64 Views

Hi Pablo,

Thanks for your reply. I tried to install the library and all the errors are removed but got just one error at the time of compiling

c:/iotdk-ide-win/devkit-x86/sysroots/x86_64-pokysdk-mingw32/usr/bin/i586-poky-linux/../../libexec/i586-poky-linux/gcc/i586-poky-linux/4.9.1/ld.exe: cannot find -lpulsensor.h

I also tried to find why pulse sensor is supported in upm but not showing in eclipse sensor list and i found one upm xml file in devkit-x86/sysroot/i586-poky-linux directory on my windows. It has already pulse sensor added but the data are not complete. I added the sensor but got sensor data out of sync error while viewing the sensor list .

Can you please point me to some good Java installing guide. I checked

I understand we can't program at low level abstraction, what I mean to ask is that there should be some API or functions to access the Galileo board features such as USB port etc. Like the UCM and mraa libraries have API and list of functions to use.

Thank you for giving me confident to use Linux commands. I used the compgen -c on the bash and it showed me all the commands supported in Galileo Linux.

I am also getting an error while connecting to the board "The repository version detected on the target is older than eclipse." which is quite self explanatory but I don't know how to update the repository version.

thass1
New Contributor I
64 Views

anyone know how to solve these issues?

Pablo_M_Intel
Employee
64 Views

Hi taha82,

Could you please tell us which image you are using on your Galileo? Are you using the uClibc or the eclibc image? Here's a great guide on how to add Java to your device https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-... https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-....

Also, are you using the AlexT or Intel IoT repo to add packages?

Regards,

PabloM_Intel

Carlos_M_Intel
Employee
64 Views

Hi taha82,

Do you have updates on this?

Could you give us more information about the image and repo you are using?

Regards,

Charlie

thass1
New Contributor I
64 Views

Sorry for the late reply, I got busy in other stuff. I have Plenty of question. I used the eclibc image from https://software.intel.com/en-us/programming-blank-sd-card-with-yocto-linux-image-windows Making a bootable micro SD Card with Windows* | Intel® Developer Zone and I am getting version mismatch error. Is there any other better image to use? which I can use with eclipse IDE. Where can I get the latest one?Is the Linux image found here https://software.intel.com/en-us/iot/hardware/galileo/downloads IoT - Intel® Galileo Board Download | Intel® Developer Zone is different than the one I am using. I understand that there are many Galileo Linux images but no one has yet make Java enabled image yet. I think there are lots of people who wants to work with Java so it will be helpful if someone make Java enabled Linux image. It will save lot of time for other people.

For adding the pulse sensor issue in c++ I created an issue at https://github.com/intel-iot-devkit/upm/issues/300 Pulse sensor in eclipse c++ supported sensor list · Issue # 300 · intel-iot-devkit/upm · GitHub but haven't done any update regarding it.

At the moment I am trying to install java on the Linux by using these instructions . I read somewhere that I can install Java SE embedded works on Galileo, what do I have to do for it? I also found an Intel page where they announced that Java run time is added into Linux image now https://software.intel.com/en-us/blogs/2015/10/13/announcing-intel-iot-developer-kit-v20 Announcing Intel® IoT Developer Kit v2.0 with Java* Support | Intel® Developer Zone . Can you confirm that? I also found one this https://www.youtube.com/watch?v=0U_YOW8WWTc Introducing Zulu Embedded and running Java on Intel® Edison and Galileo - YouTube . Has anyone worked with this yet?

Pablo_M_Intel
Employee
64 Views

Hi taha82,

They should be the same image, but still I would suggest you to download it from the Galileo Download center, https://software.intel.com/en-us/iot/hardware/galileo/downloads https://software.intel.com/en-us/iot/hardware/galileo/downloads. And the eglibc and uClibc are the only images available from Intel's side.

About Java, none of the images has Java support built-in, but you might want to take a look at this link https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-... https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-.... Where Matthias Hahn share some suggestions for adding Java to a Yocto image. You can use the Eclipse IDE to build your applications using Java. Check this guide https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-... https://software.intel.com/en-us/blogs/2014/04/04/some-hints-on-yocto-builds-for-iot-devkit-example-....

Regarding the Zulu Embedded tutorial I haven't tried that before, but if you give a try you can share your results here.

Regards,

PabloM_Intel

Reply