element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
RIoTboard
  • Products
  • Dev Tools
  • Single-Board Computers
  • RIoTboard
  • More
  • Cancel
RIoTboard
Blog Riotboard Yocto  : Part5 : Application Development using ADT
  • Blog
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
RIoTboard requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: tusharp
  • Date Created: 24 Oct 2014 2:50 PM Date Created
  • Views 486 views
  • Likes 1 like
  • Comments 2 comments
  • tusharp
  • yocto
  • image
  • bitbake
  • yocto-recipe
  • freescale
  • package
  • imx6
  • riotboard
  • helloworld
  • embedded
  • setup
  • riot
  • cortex-a9
  • meta
  • kernel
  • yocto-bsp
  • poky
  • bsp
  • arm9
  • linux
Related
Recommended

Riotboard Yocto  : Part5 : Application Development using ADT

tusharp
tusharp
24 Oct 2014

Contents:
Part1 : Environment setup and initial build
Part2 : Build u-boot using Yocto
Part3 : Build Kernel using Yocto
Part4 : Package Development using Yocto
Part5 : Application Development using ADT     <-- You are here

 

 

Previously we build a package in yocto and managed to get it bundled with sdcard image.

 

Users developing apps for a target hardware need a development platform.

The development platform consists of  primarily Toolchain & IDE.

 

For developing apps we need to get the toolchain first.

The toolchain can be either a  pre-built tarball  or build manually using yocto


As usual :  we will start with yocto environment set-up:

~$ cd fsl-arm-yocto-bsp

~/fsl-arm-yocto-bsp$  MACHINE=riotboard source fsl-setup-release.sh -b build -e fb

~/fsl-arm-yocto-bsp/build$

 

 

 

Using pre-built ADT tarball:

 

In my previous blog we had built a helloworld package using the yocto sources available locally.

but everyone may not be interested in wasting at-least 30GB disk space just for developing a Riotboard  app.

 

Its better to use a pre-built toolchain from Yocto repositories:

http://downloads.yoctoproject.org/releases/yocto/yocto-1.5.2/toolchain/i686/

 

rwl9no.jpg

 

we will download the one for armv7a :

http://downloads.yoctoproject.org/releases/yocto/yocto-1.5.2/toolchain/i686/poky-eglibc-i686-core-image-sato-armv7a-vfp-neon-toolchain-1.5.1.sh

 

Once downloaded run the installer with defaults.

./poky-eglibc-i686-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.1.sh

 

accepting the defaults will install toolchain to /opt/poky/1.5.1


We will verify the downloaded toolchain by compiling  a c code.

setting up toolchain in environment .

 

cross compile and test a simple code.


myapp.c

#include <stdio.h>
void main()
{ printf("Hello Riot \n");
}

 

~$ mkdir riot_apps
~$ cd riot_apps/
~/riot_apps$
~/riot_apps$ source /opt/poky/1.5.2/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
~/riot_apps$ arm-poky-linux-gnueabi-gcc  myapp.c

 

Now copy the generated binary to Riotboard and execute .

2nq4ncw.jpg

 

 

Build toolchain using Yocto:

 

The toolchain we used above is nice and good (thanks to yocto guys),  but what if you have a custom package or a newly introduced library to integrate to toolchain.

Well we need to build one.

 

The build process is fairly simple.

 

Fetch all sources to build the toolchain:

bitbake -c fetchall meta-toolchain

Build the toolchain:

bitbake meta-toolchain

enter toolchain SDK directory:

cd /home/tushar/fsl-arm-yocto-bsp/build/tmp/deploy/sdk

Install the toolchain we just build:

./poky-eglibc-i686-meta-toolchain-cortexa9hf-vfp-neon-toolchain-1.5.2.sh

accepting the defaults will install toolchain to /opt/poky/1.5.2


Time to test the toolchain.

compiling c source used earlier in this blog.

cd  riot_apps

source /opt/poky/1.5.2/environment-setup-cortexa9hf-vfp-neon-poky-linux-gnueabi
arm-poky-linux-gnueabi-gcc  myapp.c

 

Now copy the generated binary to yocto and verify the working status..

 

 

Next we will try to compile and test a i2c user space driver .

you can use the  xtrinsic driver i wrote earlier.

 

using the previous settings

arm-poky-linux-gnueabi-gcc  xtrinsic_driver.c

It works..

fz0sp2.jpg


Plz check ADT Manual for more information.


I hope you liked the blog, let me know by comments if any challenges.

I will do my best to answer them.


  • Sign in to reply
  • Former Member
    Former Member over 7 years ago

    Really great

    Need more like this

    Thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 8 years ago

    Nice update.

     

    I  hope to find time to look into Yacto.

     

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube