Short: tinybld PIC uploader (e.g. Minimig) Author: Frank Wille Uploader: mmartinka volny cz (Miloslav Martinka) Type: comm/misc Version: 1.1 Requires: aros-i386; aros-ppc Architecture: i386-aros; ppc-aros AROS For AROS-i386 and AROS-ppc compiled by Miloslav Martinka. I thank Frank Wille for providing the source files to editing and compile. TinyulmUI for AROS-i386 is tested but the AROS-ppc version is not tested. So if will with the PPC version any a problem, please contact me. mmartinka --------------------------------README--------------------------------- After I got tired asking friends for flashing my Minimig with the closed source Windows tool "Tinybld" I found an open source project for Linux called "tinyul". It's just the uploader, reengineered from Tinybld, but what more do we need? I ported the Linux source to NetBSD and soon realized that an Amiga port wouldn't be much more difficult. About Tinybld: The "Tiny PIC Bootloader" by Claudio Chiculito is a small boot loader program for dsPIC, 16F- and 18F-series PICs which resides in the last 200 bytes of a PIC's flash memory. It allows flashing itself via RS-232 (serial interface). The program used for communicating with the tiny boot loader is called Tinybld and only available for Windows. The Minimig is just one of many devices using the tiny boot loader. http://www.etc.ugal.ro/cchiculita/software/picbootloader.htm About Tinyul: The "Tiny Uploader". A command line based replacement for Tinybld written by Thomas Themel for Linux. http://wiki.themel.com/tinyul INSTALLATION Copy the program (and icon) for your prefered architecture anywhere you want. Look into the directory AmigaOS3, AmigaOS4 or MorphOS. USAGE You need the Magic User Interface from Stefan Stuntz. Plain old V19 (MUI 3.8) is sufficient: http://aminet.net/util/libs/mui38usr.lha. MorphOS and AmigaOS4.x already have a recent MUI version installed. You may start TinyulMUI either by clicking its icon on the Workbench or from command line. The latter also allows you to pass the name of the file to upload as an optional parameter. Before you can flash any PIC you need to enter: 1. The configuration for your serial interface. The serial.device unit 0 with 115200 bps is preconfigured by default, which usually works fine for AmigaOS3 and MorphOS. For AmigaOS4 you will have to change the device name to a1serial.device or pegserial.device (or whatever your hardware supports). Also you might want to change the device settings when you have a 3rd-party serial board (like MFC, etc.) in the 68k-Amiga. 115200 bps are required by Minimig. When the serial interface was successfully opened the "Check PIC" button becomes available. 2. The path to the file to upload. Tinyul accepts Intel-Hex (ihex) files, which are common for PICs. Upon entering its name the file will be parsed and checked for errors. When everything is ok (checksums are correct) the "Upload file" button becomes available. Now TinyulMUI offers you two possible actions: Check PIC: The ATTN byte (0xc1) is sent, which the PIC has to reply with its identification byte and a handshake. When the identification represents a supported PIC type its name will be printed. The progress bar shows when the maximum number of retries is reached. Upload file: This will flash the PIC with the selected ihex file. It includes a "Check PIC", before flashing can start. The current state of the flashing process is shown by a progress bar. It can take a few seconds. Other settings: The timeout defaults to 500ms, which is the time Tinyul will wait for an acknowledge from the PIC. An acknowledge takes place after sending the identification byte and after every 64-byte block being transfered. The number of retries (10 by default) and "Ignore garbage chars" has only a meaning during "Check PIC". I tested the program on all the three supported architectures with success. MorphOS with serial.device and AmigaOS4 with pegserial.device on a Pegasos2/G3, and the AmigaOS3 version on an A3000 with 68060/50. Flashing the Minimig's PIC (18F252) works very reliable for me. No other PICs were tested! Theoretically Tinyul supports the following PIC types: 16F876A/16F877A 16F873A/16F874A 16F87/16F88 18F252/18F452/18F2520/18F4520 18F242/18F442/18F2420/18F4420 18F258/18F458 18F248/18F448 18F1320/18F2320 18F1220/18F2220 18F4320 18F4220 18F6720/18F8720 18F6620/18F8620 18F6520/18F8520 18F8680 18F2525/18F4525 18F2620/18F4620 18F2550/18F4550 18F2455/18F4455 WARNING A 68060 CPU had no problem to keep up with 115200 bps transfer rates, but you have to be careful with slower CPUs. The transfer might fail in the middle because of lost characters and wrong checksums. In the case of the Minimig a half-finished upload should be no problem, as I was told that the boot loader usually stays operational. But, nevertheless, I take no responsibility when you brick your device with TinyulMUI! HISTORY V1.0 (31-Dec-09): After two days of hard work. Just in time before New Year and for the latest Minimig updates from Christmas. V1.1 (02-Jan-10): Improved the MUI code with some help from Gianfranco Gignina (ShInKurO). Fixed a listview problem which made all output disappear after resizing the window. Make sure the scrollbar is always moved to the last entry. For bug reports, suggestions, etc. contact Frank Wille (frank()phoenix.owl.de). For bug reports from AROS, contact (mmartinka()volny.cz) Uploaded using: archives.aros-exec.org