Getting started with Olimex LPC2478

Have you ever wanted to develop your first embedded application but always felt that the initial work assembling a complete development board would take too long time or just felt that it isn’t your cup of tea. Then you maybe should take a look at the Olimex LPC2478 development board.

The Olimex LPC2478 development board is fully packed with nice features and it even has a nice steel cover and it is quite easy to get it up and running.

You will need the following items.

  • Olimex LPC2478 development board (obviously)
  • A transformator (I use a 12V DC)
  • Null modem cable (and probably an USB to RS232 adaptor)
Olimex 2478

Since the development board does not have sufficient non-volatile memory it is necessary to transfer the uClinix kernel and file system from an external resource every time the system is started. There are quite a few ways to do that but for now we will just do it over the network to get an easy start.

We will need to setup the development environment somewhat before we do anything else, my examples will be for ubuntu but it shouldn’t be much different to do it in other linuxes.

TFTP server

We are going to use the tftpboot method on the development board so we will have to install a tftp server.

# Install necessary packages
%> sudo apt-get install xinetd tftpd tftp
# Create some directory to store the boot images in
%> sudo mkdir /home/tftp
# Copy the images from the olimex CD to the tftp directory
%> sudo cp /media/cdrom0/Images/romfs_5.img /home/tftp/
%> sudo cp /media/cdrom0/Images/vmlinux.bin /home/tftp/
%> sudo chmod -R a+rwx /home/tftp
%> sudo chown -R nobody /home/tftp
# Create the tftp xinetd file
%> cat <<EOF > /tmp/dummytftp
service tftp {
socket_type = dgram
protocol = udp
wait = yes
user = nobody
server = /usr/sbin/in.tftpd
server_args = /home/tftp
disable = no
}
EOF
%> sudo cp /tmp/dummytftp /etc/xinetd.d/tftp
%> sudo /etc/init.d/xinetd restart

Terminal

We will have to communicate with the development board through a serial terminal so let’s install picocom.

%> sudo apt-get install picocom

  1. Connect null modem cable between PC and LPC2478
  2. Connect a ethernet cable to the LPC2478
  3. Run ‘picocom -b 115200 /dev/ttyUSB0′ in a terminal
  4. Add power to LPC2478
  5. Within 3 seconds hit any key in the active picocom terminal.

If everything looks like

u booted

you are still on track and it is time to load the images. You will have to figure out if the preset network parameters that are in the olimex development board will work with your network or not. The preset network information is 192.168.0.158 / 255.255.255.0. I am using 192.168.1.X network and have quite a lot of reserved addresses so I will use the following configuration.

  • Olimex development board ip address: 192.168.1.20
  • Gateway: 192.168.1.1
  • Tftp server ip address: 192.168.1.102

Now we should just store a couple of environment variables in the flash memory on the LPC2478.

lpc-2478-stk # setenv serverip 192.168.1.102
lpc-2478-stk # setenv ipaddr 192.168.1.20
lpc-2478-stk # setenv gatewayip 192.168.1.1
lpc-2478-stk # saveenv

First we load the file system and then the kernel.

lpc-2478-stk # tftpboot 0xa0800000 192.168.1.102:romfs_5.img
lpc-2478-stk # tftpboot 0xa0008000 192.168.1.102:vmlinux.bin

The result will hopefully look like this

images loaded

Finally we hope that everything will boot.

lpc-2478-stk # go a0008000

uClinux loaded

The display will look something like

System booted

That’s it, you have got a running uClinux and you got the world at your feets…

I will post more posts about the olimex development board in the future so drop in now and then.

This entry was posted in LPC2478. Bookmark the permalink.
-->