===== The Java Bootloader ===== The Java-based Atmal bootloader software is [[http://sourceforge.net/projects/javrprog/|JAvrProg]], written by LadyAda. Once set up, it's very slick. Unfortunately, Java doesn't know how to work with serial ports out of the box, so you'll need to set it up first... ===== Making the Bootloader Work ===== This isn't the easiest process in the world to do, but if you are careful, you can make it go * Download the VCP driver from [[http://www.ftdichip.com/Drivers/FT232-FT245Drivers.htm#VCP]]. If that driver isn't there, you can download a version from the wiki: {{x0x:vcp_usb_driver_r9052154.zip}}. The Linux kernel (2.4?, 2.6) already contains the needed drivers, usbserial and ftdi_sio * If you do not have a java runtime installed, download and install one from Sun: http://java.sun.com/getjava/ - You must get Java 5.0 (also known as 1.5) * Get a Comm API library for your OS: * Solaris: Download the CommAPI from Sun and install [[http://java.sun.com/products/javacomm/]] * Linux: Download and build the [[http://www.rxtx.org/|RXTX Library]] for your OS, and make sure it is CommAPI compatable * Download the [[http://www.google.com/search?q=javacomm20-x86.tar.Z|Solaris x86 CommAPI 2.0]] from Sun (even if you're on AMD64) * Good instructions here: http://wass.homelinux.net/howtos/Comm_How-To.shtml * I couldn't get javacomm to see any serial port but ttyS0, so I moved it temporarily and symlinked /dev/ttyUSB0 to /dev/ttyS0 - this will cause the //Verify// button on JAvrProg to fail, don't worry. * Win32: Download Version 2.0 of the CommAPI. Version 3.0 doesn't have a windows port yet. You can download version 2.0 wiki here: {{x0x:javacomm20-win32.zip}} (**WorkOnMe:** need to finish off these instructions) ==== Notes on setup ==== Many years later, I decided to upgrade to the Sokos OS. Thank god for this page, which seems to be the only place to find the required windows java libraries. When I was setting it up, I had to make sure the files were in (jre)\lib\ext and then everything worked. ===== Finally Running It ===== Assuming you've finally got Java IO working with your serial ports, you can finally run the bootloader. - Double click the file //JAvrProg.jar//, or from the commandline run ''java -jar JAvrProg.jar'' - Select the //ATmega162// for Device type. - Browse to the location of your new firmware image, eg. //x0xb0x-1_03.hex// - Hit //Program// and hold your breath while the progress bar runs. ===== Alternately... ===== If you're lucky enough to have firmware 1.03 installed already (Runs 2 and up), you can use c0ntr0l as a bootloader instead of JAvrProg. (FixMe is this still buggy and dangerous?)