Wednesday, January 23, 2008

Hello World under uClinux

Let's test Hello World application compiled in previous post under uClinux. There are many ways how to copy application file into BF537 board and one of them with help of wget command by downloading file over HTTP protocol.

This command will communicate with web server installed on development platform. Ethernet connection between board and computer is necessary.

YaST allow an easy way to verify that HTTP server is enabled and take a look on my previous post on how to configure Linux SUSE to be development platform for BF537.

Then application file has to be placed into web server working folder. That could be done from command line as well by using Cut and Paste file operation.

cp ./hello /srv/www/htdocs/hello

The natural way of running BF537 under Windows XP is with use of HyperTerminal application and serial cable. Connection setting could be found on support site. After powering up board next text will be shown in terminal window:

With DHCP server available board's network settings could be configured by:

root> dhcpcd &

Next commands will do switch to tmp folder as preferable place for this application, download file from web site, permission modification that allows program to be executed and finally now is possible to execute Hello World application

root:~> cd /tmp
root:/tmp> wget http://yourwebserver/hello
root:/tmp> chmod 777 hello
root:/tmp> ./hello

No comments: