AnsweredAssumed Answered

Imx28evk variant, how to do something simple?

Question asked by Peter Sinka on Dec 12, 2013
Latest reply on Feb 28, 2014 by Yixing Kong

Hi Guys,


We have an imx28 processor board, based around the reference schematics, but with a slightly different pin mapping to fit our application.


I'm a hardware engineer, I can design integrated circuits and pcbs, but now I want to turn my hand to the embedded software side of things. The problem I am facing is where to begin, there is such a vast amount of information out there that it's hard to find a starting point. So I thought I'd ask how to do something simple and see if you guys could point me in right direction (I'm all for RTFM, I just need to know which M), all of this may have been covered in other posts I just wanted to gather it in one place, if this useful for other folk I will tidy it up.


So let's propose a noddy set of tasks for the IMX28EVK:


1) Build a linux distribution,

2) Setup a cross compile toolchain.

3) Add in an SSH server,

4) Add Nano (text editor) to the distro.

5) Access a GPIO VIA sysfs through the command line and switch on/off an LED

6) Access the GPIO using a GPIO driver and write a simple application to flash the LED

7) Set up an interrupt off another GPIO and have the LED change at the bush of a button.

8) Use another pin function (e.g. LRADC).


The Story So Far

1, 2) I followed Daiane's excellent Yocto training :

        As Well as Otavio's Tutorial : Yocto: Training in English

Good stuff so far:

  3) add in an SSH server (I don't have a serial port),

  I found this magic line to put into my local.conf file (I'm not sure this was the correct way to go about it):

   EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"

  Source :

3a) BTW a neat little tool for finding out the IP address :Advanced IP Scanner - Free, fast and easy-to-use network scanner

4) This is staring to get tricky,

I tried running "hob", but unfortunately it didn't like imx28 (I think it might have been the line I inserted for #3), so I couldn't get a package list, also it went ahead and edited my local.conf and bb.conf files so that I couldn't bitbake any more.

  After a bit of messing about I got back to it working again.

This is probably a good time to point out that if you do:

"source setup-environment build" and there is a build folder with conf files already it skips setting up the path variables, you can fix this by doing:

  "source setup-environment build_temp" then deleting build_temp.

  Don't do what I did first which was sudo apt-get install bitbake (I think it is the wrong version of bitbake that gets installed and the recipes don't bake correctly).

So back to #4 if you run hob with a clean local.conf file you can see all the packages, but for some reason a build didn't complete for me so I did:







I picked the GCC compiler from the list and added it in.


Great, so now I can write and compile code on my device accessed via an SSH.


5) Let's try and turn on LED 3 (GPIO3_5), Led 2 is already flashing away.


echo 101 > /sys/class/gpio/export

device or resource is busy


Now I'm stumped,

I Found this:


And actually what I think I want to be able to do is define a brand new dts (eventually I want to run on my own hardware),

it doesn't seem right to edit the one in build/tmp/.....


So any tips on tasks 5-8 ?

Also how do I stop LED2 flashing away? on my custom hardware I don't have LED2?