There are already a lot of good resources online for getting started with the Edison, but I wanted to share the problems I ran into while starting working with the two boards.
The first step I recommend is to watch this video by Kevin Sidwar, or follow his quickstart guide:
C/C++ Development on the Edison using Eclipse
I wanted to start doing development using C/C++, so I followed this guide from Intel.
One important thing that the guide doesn’t mention:
The Edison shows up in the Remote Systems window labeled as “galileo”. My first move was to rename it to “Edison”. I found that actually breaks the connection between Eclipse and the Edison, so at this point I definitely recommend that you do not rename the galileo in the Eclipse remote system directory to anything else:
If you do change it, you will probably get the following error while trying to Run an application:
For Google indexing sake, the error is:
Error during file upload.
Could not find the remote connection.
The problem was especially frustrating because Eclipse still allows you to make a connection to the renamed target, but you can’t run applications or open the terminal. I’ll need to do some more digging to understand why the name is hardcoded in this way.
Accessing the Breakout Board Pins using MRAA library
The next problem I ran into was trying to convert the
2_cpp_helloworld project into a simple test to toggle one of the GPIO pins. The first step I had to do was to add the following references. (Right click on the Project and Click properties)
After the header files were added I was getting the following errors when compiling:
undefined reference to 'mraa_adc_raw_bits'
The solution to this is to make a fix in the linker to include the mraa library.
Change the linker flags to the following:
Finally, when I was trying to run the application, the console was throwing the following error:
"Intel Edison Failed to initialize Arduino board TriState"
The fix for this is to upgrade the
libmraa library on the Edison:
The method to upgrade is pretty easy, just run the following three commands on the Edison:
echo "src intel-iotdk http://iotdk.intel.com/repos/1.1/intelgalactic" > /etc/opkg/intel-iotdk.conf
Breakout Board to MRAA Pin Number
The final tip I have to share is the location of the GPIO pins and their numbers:
This document has the following useful table:
|MRAA Number||Physical Pin||Edison Pin||Notes||Pinmode0||Pinmode1||Pinmode2|
|1||J17-2||NC||Nothing from mraa|
|2||J17-3||NC||Nothing from mraa|
|3||J17-4||VIN||Nothing from mraa|
|5||J17-6||RCVR_MODE||Nothing from mraa|
|12||J17-13||OSC_CLK_OUT_0||Nothing from mraa/check|
|16||J18-3||GPI_PWRBTN_N||Nothing from mraa|
|17||J18-4||MSIC_SLP_CLK2||Nothing from mraa|
|18||J18-5||V_VBAT_BKUP||Nothing from mraa|
|22||J18-9||NC||Nothing from mraa|
|27||J18-14||FW_RCVR||Nothing from mraa|
|28||J19-1||NC||Nothing from mraa|
|29||J19-2||V_V1P80||Nothing from mraa|
|30||J19-3||GND||Nothing from mraa|
|34||J19-7||RESET_OUT||Nothing from mraa|
|42||J20-1||V_VSYS||Nothing from mraa|
|43||J20-2||V_V3P30||Nothing from mraa|
The rows 17-2o are shown in this diagram:
Pin one is on the right side. The breakout board also shows the pin and row on the silkscreen.
Hopefully this post will help resolve some pesky problems, or at very least helped you avoid having the same problems I faced. If you found this article helpful, feel free to drop a note in the comments below.