Please refer to the
Lab Web Page and Lab Schedule for all due dates.
Objectives:
- To introduce the Netburner version of the Eclipse Intergrated Development
Environment (IDE) called NBEclipse.
- To introduce the use of CVS (concurrent version system) for collaboration
in the coding environmnent.
- To introduce the use of the Netburner monitor and Mttty for downloading code.
Introduction
NBEclipse
The integrated development environment (IDE) used in CMPE401 is called
NBEclipse and is provided by Netburner. NBEclipse is a customized version
of the Eclipse IDE specifically targeted at our Coldfire 5234-based boards. It
includes a rudimentary editor, a debugger, a CVS plugin and many other tools
that automate the process of developing, writing to flash memory, and
running code.
Concurrent Version System (CVS)
Software developers need tools to manage source code when many developers are
working concurrently on the same project. Many code management systems exist
and in CMPE401, we'll be using a well known tool, CVS . You will be getting all
of your provided code from an anonymous CVS server and checking in your code
solutions to an authenticated server. The CVS plugin provided with NBEclipse will be used to
interact with the anonymous and student CVS repositories.
Mttty
The Netburner boards come with a Netburner-provided monitor in flash memory. This
monitor provides features that allow code to be downloaded to the board and then executed. It
also has some limited debugging aids like displaying the contents of memory locations and CPU
registers. A serial communications application is used to send
commands to the monitor. We'll be using Mttty for viewing the monitor commands
and stdio output.
Tutorial Code
The code provided for this tutorial displays a trailing
pattern on the LEDs and an incrementing pattern between zero and
nine on the seven segment display. The software running on the board has also
been configured to generate a toggling signal at every tick (i.e. heartbeat) of the operating
system timer as well as a toggling signal on task context switches. The
heartbeat is available on pin J2[44] and the context switch on pin J2[42].
No coding is required in this tutorial. The code provided to you in this tutorial can be used in later laboratory sessions as a simple "sanity check".
Instructions:
Retrieve, and Build a Project from CVS
- Start by creating a workspace for NBEclipse to use by clicking on Start->My Documents.
Create a new folder and name it CMPE401_Workspace (or anything else that you want).
In our lab environment, the 'My Documents' directory is linked to S:\Documents via samba. If your S:\ drive is not being mounted properly talk to your TA or lab instructor for help.
- Open NBEclipse by clicking Start->All Programs->Netburner NNDK->NBEclipse->NBEclipse.
If NBEclipse prompts you to select a new workspace, browse to your newly created CMPE401_Workspace folder.
- Import the tutorial code from the anonymous CVS server by selecting:
File-> New-> Project... ->CVS -> Projects from CVS and click on Next.

- Specify the Host as e3-11-27.ece.ualberta.ca and the Repository Path as
/opt/cvs/cmpe401fall2008. The User field should contain anoncvs.
Set the Connection type to be pserver and then click on Next.

- Click on tut and then click on Next.
- Select "Check out as project in the workspace". You can now click "Finish" at this point.

- Build the tutorial project by either right-clicking on the tut project and selecting Build Project
or by clicking Project->Build Project.
This instruction assumes that the Project is set to build the Release version (this is the default).
You can verify this by right-clicking on the project and selecting "Active Build Configuration".
Make sure that "Release" is selected. Note that the first time NBEclipse runs it will have the "Build
Automatically" feature turned on. Turn it off by clicking Project->Build Automatically.

- Note that if the build is successful you'll see the "Build complete for project tut" message.

Configuring the Board Network Settings
- Before you connect any cables it is important that you put on your static strap. Taking precautions
against damage caused by the discharge of static electricity is critical to the health of your electrical components. Modern electronic devices can be damaged or destroyed by discharges of only hundreds of volts, well below the strenth of discharges that a human would feel or notice. Make it a habit when working in the lab.

- To see what is going on when we run code we need to connect using both the serial and ethernet
cables. There are two serial ports available on the board, but you should use the one shown on
the diagram and labeled as J8. There will be a port conflict in lab 1 if this is not used.
You can verify that the board is on by viewing the power LED next to the power plug. Once your
cables are plugged in your board will look like this.

- Now we need to set up the connection settings for the module so that we can communicate
with the module. Start up the program IPSetup by clicking on the IPSetup icon in the toolbar.
The module must be plugged in and powered for it to be recognized.

- All of the boards in the lab have been pre-configured.
Ensure that the settings match the ones in the photo below. To change the settings enter them
into the configuration box on the left and then click "Set".

- Next we'll connect over the serial connection using Mttty. Click on Start->All
Programs->Netburner NNDK->Mttty Serial Terminal and
click connect. Alternatively, click on the Mttty icon within the NBEclipse toolbar.
Reset the board by pressing the Reset button on the board
(did you remember to wear the static strap?). Ensure you can see some messages from the
NB monitor before continuing. Once the
timeout expires the main program will run. Note that whatever program happens to be loaded
in flash memory will run. The loaded program may not necessarily be yours.

Flashing and Running the Project Code
- To run the code we need to open the NBEclipse C/C++ perspective. So select
Window->Open Perspective->C/C++

- We will now run the provided tutorial program that you've just built.
Click on the tut project so that it is selected.
Now click on the little arrow beside Run
.
Double click the text “NetBurner Launcher” on the left, and the name tut
will appear as a defined project below it. Type in the IP address 192.168.1.2,
or click search if the module cannot be found at that address.
If the IP address for the board has been changed then click on search to find it.
Click apply and run.
<
-
The AutoUpdate program should be able to send the program now, and it will
run after being stored in flash memory. Watch in the Mttty window to see any messages
generated by the running code. Open your web browser, and type in the IP
address in the address bar, and the default webpage will be served from
the NetBurner module httpd server. You should also see a series of trailing
lights on the board and an incrementing counter on the four built-in seven
segment displays.
- If this method did not work, there may be several things wrong.
Go to the troubleshooting page for
general help with any errors that occur.
Last modified August 29, 2008