Mark-III programming using Gnu-Linux and JAL

January 7, 2007 update:
Just grab the  markiii_jal_0_4_62.tar.bz2 tarball, and follow the directions in the read me for the patching building and installation of JAL for the Mark III.  The patch installs the markiii.jal file into the build so that you don't need to hand place it as with the instructions above.  Just patch, configure, make and make install to get going on using jal for your mark iii.

There are all the sample programs along with pre-compiled and partialy tested hex files for you to us.



This is a quick and dirty HowTo on the things you need if you want to develop PIC 16F877 software for the Mark-III mini sumo robot under a Gnu-Linux desktop.


(Most of this how to applies without change to the Cygwin environment under windows.  The primary difference is you don’t use minicom under Cygwin)


First I’ll list out the tools you’ll need to get and install on you box.

Next, you need to get, patch, build and install JAL.

cvs login

Note: When prompted for a pass word just hit enter


cvs -z3 co jal


Apply my markIII_jal.patch to the code and ./configure, make and then, as root, make install.  At this point you “should” be able to run “my_jal” from the command line 


To apply this markIII_jal.patch to the jal source code simply cd to the upper most jal directory created by the “cvs co” command executed above, and execute the following command “patch –p1 < jal_4_59_MIII.patch”.  Note: you may need to use that full path name to wherever you placed the markIII_jal.patch file.


Now you run the ./configure script within this same directory.  If it succeeds then you run make and, if that succeeds you need to su to root and do a make install.


The next thing you likely should do is to copy those two JAL library files into the library directory just created by the “make install” operation (/usr/local/share/jal/lib). My sample programs use these two libraries.


You can use my existing sample programs to get started.


The rest of this HowTo is on the setup and use of minicom with the markIII robot / boot loader.


Minicom isn’t too easy to use. You’re basically on your own, except for the following two bits;

  1. You need to setup the ASCII transfer such that a 100ms delay is done after each line sent to the Mark-III.  To get this you set up the following parameters under the “File transfer protocols” under the “cOnfigure Minicom” menu accessible from entering control-a followed by “o”.  Under the ascii protocol make sure the following parameters are passed to ascii-xfr, “-dsvl 100”  This makes a 100ms delay after each line, and its what I have working on my Linux box.
  2. Second setting the default down load directory, and having the make files copy your hex files into it will help you keep whatever hair you have left. See the make files in the samples for how to do this, and go to the minicom configuration (“control-a followed with “o”) and select the “Filenames and Paths” item, and change item “B”, the Upload directory, to point to your download directory. Do the same with item "A", the Download directory too, at least you'll know where it'll stick stuff if you start to capture text.  The user interface within minicom sucks so much that its easier to set a default within minicom and hack your make files to copy your hex files to it as part of the make.


Good luck and if you have a pointer to a program or tool that’s better than minicom, please let me know about it.