Parallel port issues with Linux

If you are running a version of Linux based on a 2.0.x or 2.2.x kernel you will not be able to use the JTAG debug tools. The other parts of mspgcc - C compiler, assembler, linker, etc. - can be used with any version of Linux. However Linux kernels prior to 2.4 did not support the ppdev raw parallel port access device driver needed by msp430-gdbproxy.

If a printer daemon is configured to use the parallel port you wish to use for mspgcc you will need to stop that printer daemon before msp430-gdbproxy can access the port.

Check that your Linux kernel actually has raw parallel-port support. If you are running a vanilla Red Hat or Debian distribution, this should be the case already. Type

$ cat /proc/devices
and look for an entry referring to "ppdev". If there isn't one you will need to recompile your kernel. This is only likely of you have a custom kernel.

If a printer daemon is using the parallel port, stop it. A command like:

$ /etc/rc.d/init.d/lpd stop
will do this on any Red Hat Linux machine, and many other distributions.

Check that permissions of the raw parallel-port device(/dev/parport0). It should be readable and writable by whichever user will run 'msp430-gdbproxy'. Don't run 'msp430-gdbproxy' as root just to get around this. Set the permissions properly, and maximise the security of your machine!

For use on your own desktop machine, it is OK to set the permissions for "/dev/parport0" to 666 (read and write allowed for everybody) and then run 'msp430-gdbproxy' from your own shell.

For shared machines, set the permissions for "/dev/parport0" to 660, and make it a member of a suitable group. 'lp' will probably do, but it might be tidier to generate a new group for this purpose (say, mspgcc or jtag) and use that. Make 'msp430-gdbproxy' a member of that group, and set its SGID bit.

You should now be able to run msp430-gdbproxy. Whilst gaining confidence in the tools, it might be a good idea to run msp430-gdbproxy with debugging on in a window of its own, so it can be monitored for any signs of trouble. The following command


$ msp430-gdbproxy --debug msp430
should do this. The --help argument will make it list its options.