Community
cancel
Showing results for 
Search instead for 
Did you mean: 
GKell2
Novice
1,658 Views

C/C++ Eclipse Migration - Arduino libraries availability

Jump to solution

Hi all,

this is my first question here so go easy on me! I just wanted to ask for your general advice before I begin my new Galileo project. Like most beginners I've outgrown the Arduino IDE and am willing to move onto pure C/C++, so naturally I've migrated to the Intel Eclipse environment. After reading Intel's documentation, I've just a few short queries before I want to delve into things:

  • How easy is it just to import Arduino libraries? For instance could I just import SoftwareSerial or TinyGPS as just .cpp and .h files and hope things will work? Or is there a better way?

  • I've discovered Intel's MRAA library - is this the de jure way of accessing the pins? Since I couldn't find a table matching MRAA pin to GPIO for the Galileo Gen 2, I'm presuming they match up like for like?

  • To make a target connection I need the IP address for my Galileo, correct? Since it isn't clear in the guide I presume I need my ethernet cable to find my IP. I'm guessing it's just as possible to do this over WiFi?

  • Finally, Is there anything I'm overlooking or should know in hindsight, before I go down the road of Eclipse?

Thanks for help in advance!

1 Solution
Diego_V_Intel
Employee
69 Views

Hello Spokkam,

The Arduino libraries can't be used just by importing them in a C/C++ script. You would have to re-write them. Most of the Arduino libraries are written based on the Arduino architecture, so even though they are .cpp and .h files, the Galileo architecture is different and the libraries won't work. An example is the SoftwareSerial library. This common library used in Arduino doesn't work in Galileo due to architecture differences. However, there could be libraries that had been written without architecture dependencies, so those libraries might be used directly in a C++ script. Each library is different, some of them might be easy to use in a C/C++ script, but other ones might not.

Regarding the MRAA library question, this is the library used to access and configure the GPIOs of the board. Have you checked the MRAA repo? You will find information about this library and the boards supported (Galileo included): https://github.com/intel-iot-devkit/mraa intel-iot-devkit/mraa · GitHub

Regarding the IP address question, as you said, you need one in order to get connection to your board using Eclipse. You can assign an IP address to your Galileo by Ethernet or Wi-Fi. However, for Wi-Fi connection you need an additional network card. Please check the following site for further details about Wi-Fi connection in Galileo: http://www.malinov.com/Home/sergey-s-blog/intelgalileo-addingwifi Intel Galileo Meets Wireless - Malinov Family Web Presence

Additionally, you will find all the information available regarding Eclipse in the following sites:

Regards,

Diego.

View solution in original post

2 Replies
Diego_V_Intel
Employee
70 Views

Hello Spokkam,

The Arduino libraries can't be used just by importing them in a C/C++ script. You would have to re-write them. Most of the Arduino libraries are written based on the Arduino architecture, so even though they are .cpp and .h files, the Galileo architecture is different and the libraries won't work. An example is the SoftwareSerial library. This common library used in Arduino doesn't work in Galileo due to architecture differences. However, there could be libraries that had been written without architecture dependencies, so those libraries might be used directly in a C++ script. Each library is different, some of them might be easy to use in a C/C++ script, but other ones might not.

Regarding the MRAA library question, this is the library used to access and configure the GPIOs of the board. Have you checked the MRAA repo? You will find information about this library and the boards supported (Galileo included): https://github.com/intel-iot-devkit/mraa intel-iot-devkit/mraa · GitHub

Regarding the IP address question, as you said, you need one in order to get connection to your board using Eclipse. You can assign an IP address to your Galileo by Ethernet or Wi-Fi. However, for Wi-Fi connection you need an additional network card. Please check the following site for further details about Wi-Fi connection in Galileo: http://www.malinov.com/Home/sergey-s-blog/intelgalileo-addingwifi Intel Galileo Meets Wireless - Malinov Family Web Presence

Additionally, you will find all the information available regarding Eclipse in the following sites:

Regards,

Diego.

View solution in original post

DPose
New Contributor II
69 Views

DiegoV_Intel wrote:

Additionally, you will find all the information available regarding Eclipse in the following sites:

Boy it would have been nice to know about these like forever ago.

Reply