- I’m running my own programs but started getting an “Error during file upload” message. This worked minutes ago, what should I do?
- How can I use my old Intel® Edison projects with this version of Eclipse?
- My old projects don’t run anymore with this version of Eclipse or I’m getting build errors even though they worked fine before. Why?
- How do I start and configure a new/sample project?
- What do I need to change if I want to use other UPM sensors?
- I looked at all the UPM library files but realized I have a sensor that is not supported by UPM, can I still use it?
- I ended up writing a new interface for my sensor, is it possible to add it to the UPM library?
- Can I use the Eclipse IDE to build, test, and maintain my new UPM sensors?
Q) I’m running my own programs but started getting an “Error during file upload” message. This worked minutes ago, what should I do?
This usually happens if you left your program running on the device and try to upload it again, because the application binary is already in use. A simple way to fix it is to do a software disconnect from the IDE. On the Window -> Show View -> Other menu select Remote Systems (under the Remote Systems group). Then from this new tab right click on your Intel® Galileo/Edison board and select Disconnect, which will terminate the running process and fix the issue.
Q) How can I use my old Intel® Edison projects with this version of Eclipse?
If you worked with the Intel® IoT Developer Kit versionn of Eclipse before, you can load your older projects using this version too. To do so, either set your workspace path to the previous one, or copy your previous project files over if you ended up using a newly created workspace. Then go to File -> Import and from the General category select Existing Projects into Workspace.
Q) How do I start and configure a new/sample project?
See the Starting/Duplicating a Project article.
Q) What do I need to change if I want to use other UPM sensors?
From the Intel IoT Developer Kit tab open the Sensors Examples using UPM libraries and browse through the example files to identify the sensor you would like to add. You can also use this list:https://iotdk.intel.com/docs/master/upm/modules.html to see if the sensor is currently supported; however, some newly added sensors might not be included. Once you find the sensor, open up the project properties, go to C/C++ Build -> Settings -> Tool Settings -> Cross G++ Linker -> Miscellaneous, and add your library to the linker flags. Some sensors share the same library file while others have their own. For instance, if you want to use the Grove - Air Quality Sensor, put –lupm-gas in the Miscellaneous box, while for the Grove - Digital Accelerometer (16g) enter –lupm-adxl345. Alternatively, you can find all the UPM library files under /usr/lib on your Intel Galileo/Edison device, and you can update MRAA and UPM with opkg.
Q) I looked at all the UPM library files but realized I have a sensor that is not supported by UPM, can I still use it?
We’re sorry, but because there are thousands of sensors out there, it’s not unlikely you might want to use a sensor that is not currently implemented in UPM. Your starting point in this situation is to identify what kind of sensor you’re dealing with, as lib MRAA provides some generic interfaces that might be useful in your quest to get the sensor working. Sometimes it’s as simple as reading a value of an analog pin and processing it, but other sensors might be a lot more complicated. As a general rule of thumb, try to identify a similar sensor to the one you have that already exists in UPM and take a look at the code to understand how it works. You will notice that different manufacturers may use the same chip on a similar sensor, in which case the UPM code should work with little or no changes at all. When this is not the case, use the existing sources and examples when possible, but most importantly the sensor data sheets to get you on your way. More details, including porting Arduino examples and building UPM, are here:
Q) I ended up writing a new interface for my sensor, is it possible to add it to the UPM library?
We actually encourage the community to contribute to lib UPM by adding new and cool sensors you used in a project. Interface code must adhere to a few guidelines before we add it to the library. Thus we encourage you to read through our contributions guide as it will speed up the review process. You can find more information here: https://iotdk.intel.com/docs/master/upm/contributions.html
Q) Can I use the Eclipse IDE to build, test, and maintain my new UPM sensors?
This is not an easy task, but should be possible with some effort. UPM uses CMake* to generate makefiles that will compile the source code. While there is an Eclipse plugin available for this sort of project (CMakeBuilder), most users report having better success using the existing makefile project type available by default in Eclipse and running CMake separately. To set this up you will have to import your UPM clone into Eclipse as a Makefile project and set the toolchain accordingly. A good way to understand this process is by performing a separate build of UPM first. You can find more about this in the build guide: https://iotdk.intel.com/docs/master/upm/building.html
For more such intel IoT resources and tools from Intel, please visit the Intel® Developer Zone