Last time I explained how to install the Leopard board SDK (from Ridgerun).
This time, I'm going to have a test run of the existing sample.
As a reference paper, I downloaded a paper from Leopard hompage's FAQS.
The document title is "Developing_Apps_RR_SDK.pdf".
At first this document explains how to install the development environment, which has ben
convered by the last article. It will be somewhat redundant with the above document,
but perhaps it will give the reader another point of view. On top of that, I will explain
things that are not covered by this document. Example: the document says:
"open Minicom, set up the communication with the Leopard Board by Serial Port,"
But it does not explain how to setup the communication.
We will try to run the "hello" program.
1. Building the application
The source, config and make files are in $DEVDIR/myapps/hello
Leave them as they are for this first test.
Now run the following command:
- Code: Select all
$make config
The following setup system will appear in the terminal window:
Click image to enlarge.

Use the arrow keys to navigate (or press the initial letter). When on "user applications",
press enter. You will get the following menu:
Click image to enlarge.

Press the space bar to enable or disable an application. A star appears in the box [ ] preceding
the application name. This time we will enable only "Hello World example".
Use the horizontal keys to exit. The last screen looks like this:
Click image to enlarge.

Press enter on "< yes >", and that will save the file properly.
Now you can run the following command:
- Code: Select all
$ make
It will take a while and output a lot of lines. At the end you may verify that you have
a file "hello.o" inside of the folder $DEVDIR/myapps/hello.
2. Connect to the board
Connect the serial cable. In my case, it is connected to a USB / serial interface, and therefore
connects to the port /dev/ttyUSB0
Run the following command:
- Code: Select all
picocom -b 115200 -r -l /dev/ttyUSB0
You should get the following output:
Click image to enlarge.

Now press on Leopard board's reset button. You will immediately get some output which
finishes with a +/- 5 second countdown. Press any key before the countdown finishes.
Click image to enlarge.

If you click in time, you should get the following prompt:
Click image to enlarge.

Now quit picocom by entering Ctrl-A, then Ctrl-X
Careful!
Picocom's manual might be somewhat confusing if you read too fast. it is talking about
"escape character", but it has nothing to do with the escape key of your keyboard.
The escape character is control is "Ctrl-a" (default), so quitting picocom is done by
Ctrl-a Ctrl-X as mentioned above, not Esc Ctrl-X or whatever else.
This time you can run make install.
It will download some code to the board, and it takes a while, probably because in my
case I have used the serial port at 115200 bps and there is apparently more than 4MBytes
to transfer.
Before trying to run, please check the board's network configuration.
Here is my config. I use a cheap hub. I tried first with a cross cable, but it failed,
and I replaced it with a hub, another advantage of a hub is that it allows the
PC to connect to. So I inserted an old hub lying in some drawer.
But I'm sure it could be done with a cross cable with the right parameters.
The connections are like this:
Click image to enlarge.

Once it is done, you can just reboot the board by pressing the reset button.
The boot process takes a while. However, if it takes too long, you may suspect that there is
something wrong. How long exactly? In my case, once it displays "starting kernel…", it
takes about 12 seconds.
Click image to enlarge.

Now do what it says: press enter, and you will be in the console.
Click image to enlarge.

Go to the examples folder, and run ./hello
You should get the following output:
Click image to enlarge.

That's it for the first application.
Next time, I will report how to run a video example.
Pascal
