Difference between revisions of "ECE497 Instructor's Guide"

From eLinux.org
Jump to: navigation, search
m
m (FAQ: Removed)
 
(39 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[[Category:ECE497]]
+
[[Category:ECE497 | Instructor's]]
 +
[[Category:EmbeddedBeagleClass]]
 
[[Category: BeagleBoard]]
 
[[Category: BeagleBoard]]
 +
{{YoderHead}}
  
 
There are many choices that have to be made when designing a college course.  The open source world gives you even more choices.  The following takes you down the path I have chosen for my 32-bit embedded Linux course ([[ECE497 - 32-bit Embedded Linux, Rose-Hulman]]).  As we travel I'll point out what decisions needed to be made, what the options were and why I made my choice. Once you see where I've taken you, it should be easier for you to pick a path for your class.
 
There are many choices that have to be made when designing a college course.  The open source world gives you even more choices.  The following takes you down the path I have chosen for my 32-bit embedded Linux course ([[ECE497 - 32-bit Embedded Linux, Rose-Hulman]]).  As we travel I'll point out what decisions needed to be made, what the options were and why I made my choice. Once you see where I've taken you, it should be easier for you to pick a path for your class.
  
= What Hardware =
+
== What Hardware ==
There are many hardware platforms out there that support embedded Linux, how do you pick one?  In my case, Texas Instruments (TI) approached me and asked if I was interested in developing materials using the BeagleBoard.  I looked it over and said yes.  It's not a bad choice since nearly 30,000 have been sold and it has a very active community.
+
There are many hardware platforms out there that support embedded Linux, how do you pick one?  In my case, Texas Instruments (TI) approached me and asked if I was interested in developing materials using the BeagleBoard.  I looked it over and said yes.  It's not a bad choice since over 120,000 have been sold and it has a very active community.
  
The Beagle has a dual-core OMAP processor on it. One core is an ARM processor, the other a TI DSP. So one can work in both the embedded world and the DSP world with it.
+
There are many flavors of the Beagle. (Original, xM, Bone White, Bone Black). I'm using the BeagleBone Black since it is only $45 and is very capable.
  
= What Software =
+
== What Software ==
== Bare Metal, or Linux ==
+
=== Bare Metal, or Linux ===
Since the Beagle has both an ARM and a DSP, you could choose to focus on either.  If you main interest is DSP and you want to approach the Beagle as traditional DSP hardware I suggest you contact  [http://enpub.fulton.asu.edu/ivu/Workshops/DSPE2011/training.html#TI1 Mike Marrow].  He has pioneered the 'bare metal' approach to using an OMAP processor.
+
The original Beagle and the xM has both an ARM and a DSP, you could choose to focus on either.  If you main interest is DSP and you want to approach the Beagle as traditional DSP hardware I suggest you contact  [http://enpub.fulton.asu.edu/ivu/Workshops/DSPE2011/training.html#TI1 Mike Marrow].  He has pioneered the 'bare metal' approach to using an OMAP processor.
  
I decided to focus on Linux running on the ARM and treat the DSP as a peripheral. I think in the future this is how most DSP hardware will be used.
+
I decided to focus on Linux running on the ARM since the Bones don't have a DSP.
  
== Which Linux ==
+
=== Which Linux ===
 
Linux has many [http://www.openembedded.org/index.php/OEandYourDistro embedded distributions].  There seem to be three that are most active on the Beagle at this time.
 
Linux has many [http://www.openembedded.org/index.php/OEandYourDistro embedded distributions].  There seem to be three that are most active on the Beagle at this time.
  
Line 22: Line 24:
 
* [http://code.google.com/p/rowboat/ Android]
 
* [http://code.google.com/p/rowboat/ Android]
  
I use Angstrom.  The day I tried to install Ubuntu on the Beagle xM I discovered the instructions didn't work for the xM.  They might be working now. I have Android installed on one of my SD cards and have played with it some.  Although Android is based on Linux, I found Angstrom to be a more familiar environment.  You mileage may vary.
+
I use Angstrom.  That's what comes on the on board flash. I have Android installed on one of my SD cards and have played with it some.  Although Android is based on Linux, I found Angstrom to be a more familiar environment.  You mileage may vary.
  
== Which OS for the Host Computer ==
+
You can also try the Super-Jumbo image from [http://www.alwaysinnovating.com/beagleboard/ AlwaysInnovating].  It has four OSes on one image, though it only runs on the xMI'm not sure how easy it is to teach with.
The BeagleBoard is powerful enough that real development (editing, compiling, etc.) can be done on it without need of another computer. However, so can do much more using a host computer for development.  It is generally agreed that if your target computer is Linux, the host computer should be too.   
+
  
So which distro should you use?  I'm running Ubuntu 10.4 LTS, 32-bit.  It is required for some of the DSP development tools supplied by TIThe LTS means Long Term Support, which means it's supported for 3 years from its release data ([https://help.ubuntu.com/ April 2010])This also means you won't be having to upgrade every time you teach the class.
+
=== Which OS for the Host Computer ===
 +
The BeagleBoard is powerful enough that real development (editing, compiling, etc.) can be done on it without need of another computerHowever, one can do much more using a host computer for developmentIt is generally agreed that if your target computer is Linux, the host computer should be too.
  
== Native or Virtual Install ==
+
So which distro should you use?  I'm running Ubuntu 12.04 LTS, 64-bit. The LTS means Long Term Support, which means it's supported for 3 years from its release data ([https://help.ubuntu.com/ April 2012]).  This also means you won't be having to upgrade every time you teach the class.
 +
 
 +
=== Native or Virtual Install ===
 
Windows is the standard OS on my campus, so the first year I ran the course I ran the host OS in a virtual machine.  It worked fine, though there may have been a slight loss of performance.  I started with the free [http://elinux.org/ECE497_Installing_Ubuntu_in_VMware_Player VMware Player], but later switched to the free [https://help.ubuntu.com/community/VirtualBox Virtual Box] on the recommendation of my students.
 
Windows is the standard OS on my campus, so the first year I ran the course I ran the host OS in a virtual machine.  It worked fine, though there may have been a slight loss of performance.  I started with the free [http://elinux.org/ECE497_Installing_Ubuntu_in_VMware_Player VMware Player], but later switched to the free [https://help.ubuntu.com/community/VirtualBox Virtual Box] on the recommendation of my students.
  
 
This year I'm running Ubuntu native on a desktop and a laptop.  One of the things I gain is the desktop is always on so I can login to remotely and do things such as start a long download.  I share the keyboard and mouse with my Windows machine by using [http://synergy-foss.org/ Synergy].  Synergy allows cutting and pasting between machines which helps when producing handouts.
 
This year I'm running Ubuntu native on a desktop and a laptop.  One of the things I gain is the desktop is always on so I can login to remotely and do things such as start a long download.  I share the keyboard and mouse with my Windows machine by using [http://synergy-foss.org/ Synergy].  Synergy allows cutting and pasting between machines which helps when producing handouts.
  
== Installing on the SD Card ==
+
== What Topics Should be Covered? ==
Now that you've decided to run Angstrom on the Beagle, you have to choose how to get it on your SD card.  There are four broad choices:
+
 
+
* Partition and format your SD card, then download the root filesystem, kernel, etc. and copy.
+
* Download a disk image and copy it to the SD card.
+
* Use an online system to build the install you want.
+
* Download all the sources and build everything from scratch.
+
 
+
The last option is the 'true' open source way to do things, but it's too big of a step for my students.  One the first day I want them to have their Beagle up and running with all the demos that run on it.  I want them to see what it can do.  On the second day we'll start digging into the details of how it works.  This will eventually involve building many things from scratch.
+
 
+
<code>bitbake</code> is one of the tools developed by the Open Embedded (OE) group.  With a single <code>bitbake</code> one can download all the sources, compile them and create all the files needed to copy to the SD card to run Linux with all its demos.  The first year I taught the course I made the mistake of having my students build the whole system from source.  It took over 24 hours to run, and then failed to build completely.  This is the way of open source.  What worked today may not work tomorrow, but it may the day after.  Students need to learn the skill of what to do when things fail.  However this was too big of a build to have them learn on.
+
 
+
My instructions for doing the first three are here:  [[ECE497 Getting your Beagle running (precompiled)]]  Building from scratch instructions are here:  [[ECE497 Installing The Angstrom Distribution]]
+
 
+
= What Topics/Text =
+
 
+
When I first started planning for this course I was told "The hardest things about designing such a course is deciding what to leave out".  That is very true.  There is a huge range of topics that could be covered.  I decided that about half the course would be learning embedded Linux in general, (i.e. applies to any processor) and half would highlight the special features of the BeagleBoard.
+
 
+
The text I use is the [http://www.pearsonhighered.com/bookseller/academic/product/0,3110,0137017839,00.html Embedded Linux Primer] by Christopher Hallinan, published by Prentice Hall.  You can see a chapter [http://my.safaribooksonline.com/book/operating-systems-and-server-administration/embedded-linux/9780137061129 here].  The text does a good job of describing what happens from the moment power is applied to the processor until you have a full blown Linux running. It is not BeagleBoard specific, so there is sometimes a little foot work needed to see how things apply to the Beagle.  This isn't a bug, it's a feature.  The text has several listings from various processor reproduced throughout the book.  I have my students reproduce the listing for the Beagle.  It's a good way to see if they really understand what they are reading.
+
  
== Additional Topics ==
+
[[EBC_Embedded_Beagle_Class_Topics | Here]] is a list of topics that I've coveredThe list includes labs and exercises for nearly every topic.
Here are a few additional topics I have covered in the past, or plan to cover next time.
+
* '''Audio I/O'''.  I give an example of how to capture audio from the line in and send it to line out.
+
* '''Display Sub System''' (DSS).  The DSS on the OMAP supports 3 frame buffers, one for graphics and 2 for video.  I give them the c code needed to pull a frame of video from a web cam via [http://www.exploits.org/v4l Video 4 Linux] (v4l2) and store it in a file.  I also given code to take the frame from the file and put it in a video frame buffer.  They task is to combine the two programs to pull live video from the camera and display it on the monitor.
+
* '''DSP'''.  Next time I plan to have my students using the DSP via '''c6run''' ([[ECE497 Installing DSP Development Tools c6run]]).  c6run is a slick system that runs code on the DSP via the ARM without having to know all the details of how the two interact.  I plan to give details of how memory is shared between the two processors (ARM with virtual memory and the DSP without) and show how [http://processors.wiki.ti.com/index.php/CMEM_Overview cmem] manages it.
+
* '''OpenCV'''.  There is a port of the Open Computer Vision Library [http://opencv.willowgarage.com/wiki/ openCV].  I plan a one day overview of it with some demos.
+
* '''GStreamer'''.  There is also a port of [http://gstreamer.freedesktop.org/ GStreamer], the open Multimedia Framework. It even has a plugin that uses the DSP.
+
* '''Speech Recognition'''.  TI has an [https://gforge.ti.com/gf/project/tiesr/ embedded speech recognizer] that has been ported to the Beagle.  I'll present it and suggest projects that might use it.
+
  
I'll present other topics based on what the class is interested in.
+
=== Course Projects ===
  
== Course Projects ==
 
 
A major part of the course grade is based on a major project.  Here are some of the projects that have been done, or that I'm proposing:  [[ECE497 Project Ideas]]
 
A major part of the course grade is based on a major project.  Here are some of the projects that have been done, or that I'm proposing:  [[ECE497 Project Ideas]]
  
= Final Comments =
+
{{YoderFoot}}

Latest revision as of 17:42, 2 September 2013

thumb‎ Embedded Linux Class by Mark A. Yoder


There are many choices that have to be made when designing a college course. The open source world gives you even more choices. The following takes you down the path I have chosen for my 32-bit embedded Linux course (ECE497 - 32-bit Embedded Linux, Rose-Hulman). As we travel I'll point out what decisions needed to be made, what the options were and why I made my choice. Once you see where I've taken you, it should be easier for you to pick a path for your class.

What Hardware

There are many hardware platforms out there that support embedded Linux, how do you pick one? In my case, Texas Instruments (TI) approached me and asked if I was interested in developing materials using the BeagleBoard. I looked it over and said yes. It's not a bad choice since over 120,000 have been sold and it has a very active community.

There are many flavors of the Beagle. (Original, xM, Bone White, Bone Black). I'm using the BeagleBone Black since it is only $45 and is very capable.

What Software

Bare Metal, or Linux

The original Beagle and the xM has both an ARM and a DSP, you could choose to focus on either. If you main interest is DSP and you want to approach the Beagle as traditional DSP hardware I suggest you contact Mike Marrow. He has pioneered the 'bare metal' approach to using an OMAP processor.

I decided to focus on Linux running on the ARM since the Bones don't have a DSP.

Which Linux

Linux has many embedded distributions. There seem to be three that are most active on the Beagle at this time.

I use Angstrom. That's what comes on the on board flash. I have Android installed on one of my SD cards and have played with it some. Although Android is based on Linux, I found Angstrom to be a more familiar environment. You mileage may vary.

You can also try the Super-Jumbo image from AlwaysInnovating. It has four OSes on one image, though it only runs on the xM. I'm not sure how easy it is to teach with.

Which OS for the Host Computer

The BeagleBoard is powerful enough that real development (editing, compiling, etc.) can be done on it without need of another computer. However, one can do much more using a host computer for development. It is generally agreed that if your target computer is Linux, the host computer should be too.

So which distro should you use? I'm running Ubuntu 12.04 LTS, 64-bit. The LTS means Long Term Support, which means it's supported for 3 years from its release data (April 2012). This also means you won't be having to upgrade every time you teach the class.

Native or Virtual Install

Windows is the standard OS on my campus, so the first year I ran the course I ran the host OS in a virtual machine. It worked fine, though there may have been a slight loss of performance. I started with the free VMware Player, but later switched to the free Virtual Box on the recommendation of my students.

This year I'm running Ubuntu native on a desktop and a laptop. One of the things I gain is the desktop is always on so I can login to remotely and do things such as start a long download. I share the keyboard and mouse with my Windows machine by using Synergy. Synergy allows cutting and pasting between machines which helps when producing handouts.

What Topics Should be Covered?

Here is a list of topics that I've covered. The list includes labs and exercises for nearly every topic.

Course Projects

A major part of the course grade is based on a major project. Here are some of the projects that have been done, or that I'm proposing: ECE497 Project Ideas




thumb‎ Embedded Linux Class by Mark A. Yoder