Hi Cliodhna, From: Ni Scanaill, Cliodhna Sent: Wednesday, November 16, 2016 1:17 PM To: VanCutsem, Geoffroy <geoffroy.vancutsem at intel.com>; Philippe Coval <philippe.coval at osg.samsung.com>; iotivity-dev at lists.iotivity.org Subject: RE: [dev] Using ADT to cross-compile for Yocto
Hi Geoffroy, Thank you for your detailed reply. I persisted with the Makefile approach as cross compiling with a Makefile worked well for developing small applications on a previous Yocto project that I worked on. On that project we created recipes when we had a final version of our code and we had to integrate code into our secure build. [Geoffroy] That sounds like a very reasonable approach. I found a Makefile that worked with my SDK. This Makefile is located in build/tmp/work/core2-32-poky-linux/iotivity-simple-client/1.1.0-r0/iotivity-simple-client. (Note: the Makefile for OICSensorBoard does not work). [Geoffroy] Great, I'm glad you found something that worked! Thanks for reporting that the OICsensorBoard Makefile does not work. IIRC, it was one of the early sample code that was provided with IoTivity but it seems it hasn't been touched for a while now. I believe it only really lives in meta-oic and not in the IoTivity tree. I agree with Philippe that having additional examples outside of the tree is a good thing... but not so much if these are bit-rotten (and that's my concern over these now). I'm working remotely today but I'll post full contents of makefile tomorrow for anyone else who needs a makefile for Yocto. I had to add "-lpthread" to "YOCTOLDFLAGS", but other than that the makefile works as is. [Geoffroy] Do you mean you've had to add this to the iotivity-simple-client Makefile? If true, it looks like iotivity-simple-client would need a similar patch than what iotivity-sensorboard already has [1]. [1] http://git.yoctoproject.org/cgit/cgit.cgi/meta-oic/tree/recipes-apps/iotivity-sensorboard/files/0001-Build-Use-LDFLAGS-variable-from-env-and-add-pthread-.patch I haven't used devkit. The Edison IoTivity installation has v1.0 of Iotivity, and the Galileo Gen 2 has v1.0.1 of Iotivity. I pulled the latest meta-oic repo on my Edison build to bring it up to date (v1.0.1), as my Gen 2 couldn't communicate with Edisons due to different versions of IoTivity. [Geoffroy] Is there any particular reason you are sticking to 1.0.1? IoTivity 1.1.1 was added recently to meta-oic (http://git.yoctoproject.org/cgit/cgit.cgi/meta-oic/) and it's had 1.1.0 for a few months. I actually have lots of notes on building and deploying Edison, Gen2, Ubuntu and Arduino that I can post on Wiki if that helps anyone. I found lots of conflicting sources of information and gotchas when I was building for these targets and I expect others will run into similar problems. [Geoffroy] I can only encourage you to do it! There is room for improvement on the documentation side of things so that would be appreciated! Regards, Cliodhna From: VanCutsem, Geoffroy Sent: Wednesday, November 16, 2016 11:17 AM To: Ni Scanaill, Cliodhna <cliodhna.ni.scanaill at intel.com<mailto:cliodhna.ni.scanaill at intel.com>>; Philippe Coval <philippe.coval at osg.samsung.com<mailto:philippe.coval at osg.samsung.com>>; iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> Subject: RE: [dev] Using ADT to cross-compile for Yocto Hi Cliodhna, Are you only using a Makefile or do you also use autotools for example? It sounds like your set-up is all in good shape and working as expected so this is likely a problem in the Makefile itself. I don't have an example at hand but the following section of the Yocto documentation may already give you some hints as to what is not working correctly in your case: http://www.yoctoproject.org/docs/2.2/sdk-manual/sdk-manual.html#sdk-adding-makefile-only-software Do you have a recipe for your app? Cross-compiling using the Yocto tools typically means you have a recipe and bitbake will use it to fetch, configure, compile, etc. your app. These days, 'devtool' is of great help when you need to create a recipe but I do not remember off the top of my head what Yocto release the Edison BSP is based off (and it may not have 'devtool' as a result). Thanks, Geoffroy From: Ni Scanaill, Cliodhna Sent: Monday, November 14, 2016 4:06 PM To: Philippe Coval <philippe.coval at osg.samsung.com<mailto:philippe.coval at osg.samsung.com>>; VanCutsem, Geoffroy <geoffroy.vancutsem at intel.com<mailto:geoffroy.vancutsem at intel.com>>; iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> Subject: RE: [dev] Using ADT to cross-compile for Yocto Hi Geoffroy and Philippe, Thank you for the quick replies. I have already build Yocto images successfully for both Edison and Galileo Gen 2 using meta-oic layer and I can run the example files. My current challenge is cross-compiling simple applications on my Ubuntu machine for these boards without rebuilding all of Yocto (I will look into building for BLE after I figure this out). I built an SDK using the instructions in the README, but I'm probably missing something in my Makefile as it fails to build. The other method I found to cross-compile applications for Yocto is ADT (http://www.yoctoproject.org/docs/1.8/adt-manual/adt-manual.html). I successfully built and tested the "hello.c" example on Edison but I cannot build "simpleclient.cpp" using these instructions. If anyone has used either of these methods, I would appreciate a copy of their Makefile (to use the SDK) or their adt_installer.conf file (for the ADT) so I can see where I'm going wrong. Regards, Cliodhna From: Philippe Coval [mailto:[email protected]] Sent: Monday, November 14, 2016 11:19 AM To: VanCutsem, Geoffroy <geoffroy.vancutsem at intel.com<mailto:geoffroy.vancutsem at intel.com>>; Ni Scanaill, Cliodhna <cliodhna.ni.scanaill at intel.com<mailto:cliodhna.ni.scanaill at intel.com>>; iotivity-dev at lists.iotivity.org<mailto:iotivity-dev at lists.iotivity.org> Subject: Re: [dev] Using ADT to cross-compile for Yocto On 14/11/16 12:11, VanCutsem, Geoffroy wrote: Hi Cliodhna, Hi, To add IoTivity to Yocto, you should add the meta-oic layer to your build system: http://git.yoctoproject.org/cgit/cgit.cgi/meta-oic. The top-level README file in that layer includes some instructions in that regard but do not hesitate to get back to this list if anything is unclear. Or read/edit that page https://wiki.iotivity.org/yocto I could try to reproduce on current version, but I lack a breakout board for my edison (to reflash it) So maybe we can add explanations to rebuild iotivity for existing yocto images. What I'm less sure about is the status of BLE support on Linux systems (such as Ubuntu, Yocto, etc.). Tizen supports BLE, and there some layers for tizen-distro: https://wiki.tizen.org/wiki/Yocto I have checked them with meta-oic it just work(ed) : http://www.slideshare.net/SamsungOSG/connected-tizen-bringing-tizen-to-your-connected-devices-using-the-yocto-project So port is possible, I'd be glad to help on that Hope that helps -- mailto:philippe.coval at osg.samsung.com gpg:0x467094BC https://blogs.s-osg.org/author/pcoval/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.iotivity.org/pipermail/iotivity-dev/attachments/20161117/e7d21396/attachment.html>
