LINWLOAD a Linux tool for WLoader

On this page I present the very first "quick & dirty" version of my Linux tool for very nice PIC bootloader "WLoader" , written by Wouter van Ooijen.

This version of linwloader works with the version 1.03 of wloader (the previous versions had some bugs in serial routines), however you may force it to work with other wloader's versions, modifying the WLoadV() routine in wload.c source.

To get the linwload working you have to download the sources, unpack them with the
tar -xzf linwload_1.03.tar.gz
command, and then execute the
make
command in the linwload directory. After the compilation you should get the "linwload" executable file. You can copy it (or make a symlink) to the /usr/local/bin directory, or you can run it right there, with the
./linwload arguments
command
At the moment the linwload accepts the following arguments:
PORT device_name baudrate
This command requires the device name where the PIC is connected (eg. /dev/ttyS1), and the baud rate used to communicate with the WLoader. Remember, that you need to have the write access to that device. In the Debian Linux distribution, which I use, you need to add yourself to the dialout group. If you use another distribution, you may need to do something different.
Currently only two baud rates are accepted: 19200 or 9600.
PROG hexfile
This command requires the name of the hex file containing the data to be programmed into the PIC.
VERIFY hexfile
This command requires the name of the hex file containing the data to be compared with the PIC contents. Only the locations defined in the hex file are compared.
GO
This command runs the user program written into the PIC.
TERM
This command runs the simple RS232 terminal emulation. Every character entered from the keyboard is sent to PIC, and every character received from the PIC is echoed to the screen. Only `~` character has a special meaning, and closes the terminal.

Below are given the examples of proper calling syntax:

linwload PORT /dev/ttyS3 19200 PROG myprog.hex GO
Program the PIC connected to the COM4 port (using the 19200 baud rate) with the contents of myprog.hex file and run the user program

linwload PORT /dev/ttyS3 19200 VERIFY myprog.hex
Check if the PIC connected to the COM4 port (using the 19200 baud rate) is properly programmed with the contents of myprog.hex file.

linwload PORT /dev/ttyS3 19200 TERM
Run the RS232 terminal emulation using the COM4 port and 19200 baud rate. With this command you can eg. debug the WLoader protocol.

linwload PORT /dev/ttyS3 19200 GO PORT /dev/ttyS2 19200 TERM
Not tested!!!
Run the user program written into PIC with WLoader pin connected to the COM4 and UART connected to the COM3 port. Then you can communicate with the runing application using the emulated RS232 terminal.

The linwload is published under the Gnu Public License version 2.
Please note that this code was written "in hurry" and requires a lot of testing and polishing. However if you are interested in using WLoader with Linux PC, then you can experiment with it on your own risk. Please send me any bugs reports and improvements


My other PIC projects


Wojciech Zabolotny
Last modified: Sun Oct 22 13:59:58 CEST 2000