Documentation/Quickstart : short guide to running an ArtLPC program on your chip
Copyright (c) 2005-2007 Garth Zeglin

This file is part of ArtLPC, distributed under the terms of
the GNU General Public License version 2 or later.

/****************************************************************/

To compile, download and run an ArtLPC program, you will need the
following:

  gcc C ARM7 cross-compiler                    (see Setting-up-gcc)
  GNU make                                     (see your system documentation)
  lpc21isp or equivalent LPC2xxx downloader    (see Setting-up-downloader)
  a LPC2xxx microcontroller board              (e.g. Olimex LPC-P2103 from Spark Fun)
  power supply for LPC2xxx
  serial port or USB->serial adapter
  serial cable
  minicom or other serial port terminal program

1. Compile the ArtLPC testing code from the command line:
   cd ArtLPC/testing   (or wherever you put it)
   make                (this will build a variety of sample and test programs)

2. Download one of the resulting .hex program files to your board.
   The LPC2xxx chips contain a bootloader which wakes up when the chip
   is reset and the P0.14/BSL signal is held low.  This bootloader can
   accept a program across the UART0 serial port and burn it to
   internal FLASH.

   The procedure for holding BSL low depends upon your particular
   board.  The following example assumes you are using an Olimex LPC-P2103 
   prototyping board and the lpc21isp downloader.

   1. connect the board to your computer: plug the serial cable into
      the board and your computer serial port, plug the power supply
      into the board
   2. move the BSL jumper to the closed position
   3. reset the board by pressing the reset switch
   4. run lpc21isp.  It will need options indicating the serial port, e.g.:

      lpc21isp-1.37 -control OP03/hello.hex /dev/cu.USA19QWb13P1.1 115200 14746

      In this example:
       OP03/hello.hex        is the program to download
       /dev/cu.USA19QWb13P1  is the name of the serial port device
       115200                is the download baud rate
       14746                 specifies the crystal frequency of the board

   5. restore the BSL jumper to the open position


3. See it run.

   start your serial port terminal program (e.g. minicom), using the
   same serial port at 57600 baud and port settings 8-N-1

   reset the board by pressing the reset switch

At this point, the code should run at every reset and print a message
visible in the terminal program.


