Main Page Modules Alphabetical List Data Structures File List Data Fields Related Pages
Ethernet Boot Loader for ATmega 128
1.0.0
Introduction
This application demonstrates how to create a BOOTP/TFTP based boot loader for the ATmega 128.
An Ethernut Board with programming adapter or similar hardware is required to run the binary, which is supplied in Intel hex format. Schematics and board layouts are available at http://www.ethernut.de/
Further you need a DHCP server and a TFTP server running in your local network.
To modify and compile the included source code, you need
This document has been automatically generated by Doxygen, a great tool created by Dimitri van Heesch.
Getting Started
- Prepare your ATmega 128 application for use by the boot loader, which requires a pure binary file, not a hex file. Example:
- avr-objcopy -O binary httpd.elf httpd.bin
- Configure your DCHP server to provide the correct boot image and IP address. The precompiled binary uses MAC address 00-06-98-00-00-00.
- Start your TFTP server and configure it to provide the correct boot image, which is the binary file created above. TFTPD32 is a great TFTP server for Windows, written by Philippe Jounin. Philippe announced that he will also add DHCP in the near future.
- Connect the Ethernut Board (or similar) to your programming adapter. Connect the board also to the power supply and the Ethernet.
- Use your favorite ISP software and upload the binary file named eboot.rom to your board. Make sure, that the software will be located at address 0xF000.
- Reset the Ethernut board. If the flash doesn't contain anything but the boot loader, the CPU will run through all 0xFF opcodes and finally reach the boot loader entry.
- The boot loader will detect the local DCHP server, which supplies all required settings. Among other things, these informations contain the name of the boot image file and the IP of the host running the TFTP server. The boot loader downloads the binary file from the server and burns it into the flash, starting at address 0.
- When done, the boot loader jumps to address 0 to start the application. All this takes place within a few seconds.
- In case of problems, it's recommended to install a network sniffer and watch the traffic between the boot loader and the DCHP and TFTP servers.
Rebuilding the Source Code
- Install AVR-GCC version 3.2. Remove any previously installed version.
- Open a shell or DOS window and set the AVR-GCC environment.
- Modify the source code. Do not forget to change the Ethernet MAC address in ether.c, as the preset one is reserved for egnite's internal use. Ethernut boards manufactured by egnite do have a unique MAC address, printed on the board's sticker and the invoice. Some people use MAC addresses from scrapped Ethernet adapters, which of course is "illegal" in the view of the IEEE, because the prefer to sell them. But that's another story.
- Change to the directory, which contains the eboot Makefile and enter make.
- The eboot.rom file will contain your new boot loader, ready for uploading to the board. If your programming adapter is STK 200 compatible, you can simple enter make burn on the command line. This will create the binary and upload it in one go.
Contact Information
If you would like to contact us regarding Ethernut, please email info@egnite.de
For updated information you may regularily visit http://www.ethernut.de/
Bare Ethernut boards as well as assembled and tested Ethernuts may be ordered from http://www.egnite.de/
© 2002 by egnite Software GmbH -
visit http://www.ethernut.de/