(work in progress...please revisit this site frequently for the latest updates)

Welcome to the Medusa MK-2 programming resource page. The goal of this website is to help MK-2 users get started with the programming environment. It provides the details on the tools used and the software supported. Although our software infrastructure is still in development, this page provides information on how to setup the GNU programming environment for the 2 microcontrollers used on the MK-2 node. We also provide snapshots of the 2 operating systems we run on our nodes PALOS and uCos-II.

MK-2 Tutorial Slides
MK-2 Schematics and Hardware Information
If you are setting a development environment under Windows, you first need to install cygwin. After cygwin is installed, the following tools need to be installed.
Uncompress the appropriate archive file in the directory of your choice:
gunzip gnutools_windows.tar.gz; tar -xvf gnutools_windows.tar
This will create a gnutools directory. Edit your makefiles point to this directory.
If you are using one of the Macraigor JTAG you need to install the LibRemote Software provided by Macraigor from www.ocdemon.com (we are currently using the RAVEN JTAG for our development).
Download and compile the operating systems PALOS for the ATMega128L and uCos-ii for the AT91FR4081.
The goal of this processor is to perform the baseband processing for the radio and to manage the sensors. Our current implementation uses the PALOS embedded operating system.
Compiler: avr-gcc
Existing code: PALOS (Power Aware Lightweight Operating System). To compile PALOS for MK-2 run
make -f Makefile_MK-2
PALOS Tutorial - Slides contributed by Dr. Sung Park, the author of PALOS
Compiler: arm-elf-gcc
Precompiled toolchain for ARM/THUMB for Windows & Linux
Operating System: uCos-II
There are several methods for running your code on the ARM/THUMB processor. You can either run your code in SRAM or you can burn your code in flash. We are currently working on a monitor/bootloader program that will allow users to connect to the processors using gdb via the serial port. Another alternative for writing code into flash is to use a JTAG interface. We have been using the Raven and Wiggler JTAG interfaces from Macraigor. Macraigor provides pre-build toolchains for the arm and thumb together with gdb and the required hooks for on-chip debugging. These tool chains can be found here.
To download and run your code on the MK-2 use the following sequence:
Note that the uCOS-ii zip file contains the gdb.ini file required to initialize your debugger
GHS Flash Programmer - Internal use only (ask Andreas for details asavvide@ee.ucla.edu). More on flash programming soon....
An alternative method for programming the flash is to use the Atmel Flash Loader Program. This program allows writing to flash using a serial program connection. The problem with this way of programming is that the new program will overwrite the on-chip uploader. This means that the device can only be programmed once.
AT91 Peripheral Libraries ported to GNU environment - (Provided by Atmel) - this includes sample code and projects and the drivers for the AT91 series peripherals. Makefiles and Software - Note: These libraries have not yet been tested!
The NESL members currently involved with development on the MK-2 node
Yen Cheng Kuan - Ultrasonic accessory boards, localization
David Jea - ARM/THUMB Operating System (ucos-ii) and SensorWare
Simon Han - SensorWare, Palos
Norman Su - Palos, Ceiling testbed setup
Andreas Savvides - MK-2 design, ultrasonic distance measurement, ad-hoc localization
Last updated by Andreas Savvides on 05/18/2003 11:33:12 PM