Communicating
 
For basic HCS12 development under Linux, you can use the serial communications program "kermit" to talk to DBug12 on the Dragon-12 board. Using kermit under linux is much like using hyper-terminal for windows, though kermit is more powerful (and complicated) than hyperterminal.
 
To use DBug12 on a Dragon-12 board via kermit on linux, use the following procedure (tested under SuSE 9.2 but should work similarly on other systems):
 
    * Connect the serial port of the Dragon-12 board to the desired serial port on your PC (assumed Com1 = Serial port 1 = /dev/ttyS0 here) and apply power to the Dragon-12 board.
    * As root or using the sudo command, start kermit (eg, >sudo kermit).
 
      - Note: you do not need to be root to use kermit, but many systems require root privileges to access the serial port. Typically you will get a uucp lockfile error if you try to access a serial port without the proper permissions. However, you can change permissions on some systems so that ordinary users without any special privileges can access the serial port. In this case, just start kermit as normal (>kermit). Also, if your serial port is different than above, use an appropriate /dev/ttySx designator, eg, /dev/ttyS1 for serial port 2 (COM 2).
 
      - Also note that you can set sudo privileges in the /etc/sudoers file, just enter the line "username ALL=(ALL) ALL" in that file as needed for each username.
    * Once in kermit, enter the following commands in this order:
         1. >set line /dev/ttyS0
         2. >set speed 9600
         3. >set carrier-watch off
         4. >connect
         5. Note: For some cases, you may need to set hardware flow control using 'set flow xon/xoff'
    * Hit the reset button on the Dragon-12. You should now see the DBug12 header and prompt in your kermit window. You can enter DBug12 commands as desired. For instance type "rd" for register display at the DBug12 prompt to see the contents of the various registers, or type "device" to see critical HCS12 info (see screenshot below). See the DBug12 Demo page for more information about what DBug12 commands you could use.
    * To disconnect from the Dragon-12 while in kermit, type in "ctrl-\" at the same time, then type in "c".
 
 
      
 
Loading S1 Records
 
To load an S1 record into DBug12, type "load" at the DBug12 prompt in your kermit window. Then, in another terminal window, type in "cat filename.s1 > /dev/ttyS0" to actually send the s1 file to the Dragon12 board. You should see the usual load asterisks (*) in the DBug12 window as the file loads in. Then run the loaded s1 program as desired (eg, "g 1000" to start a program running at location $1000). You may need to use the kermit command "set flow xon/xoff" to correctly load in s1 files in some cases
 
More Advanced Development
 
You can do further HCS12 development under Linux using the free GNU toolchain (cross-compiler, assembler, etc) for the HC11/HC12. See the links below:
 
 
You can also purchase a commercial "Workstation for Linux" program from VMWare. This allows you to set up a "virtual" microsoft system on top of a linux system (you can run microsoft programs without booting out of linux). You can then install Code Warrior in the virtual microsoft system and run as desired. You can have full hardware access including serial ports and the BDM via a parallel port (if you have a BDM parallel port system such as from PE Micro).
 
 
 
 
 
Kermit in Linux