phil's blog

VMware Tools in Kubuntu 9.04

I tried several different ways to install VMware Tools on Kubuntu 9.04 there are many different instructions out there and some worked and some did not. I was somewhat successful with these steps. Fundamentally all the information that you need is on this page, but some of it is in the comments. I've tried to make this more concise.

I am using VMware Fusion Version 2.04. I don't know if this will work on any other versions as I don't have any other versions to test it with. I also assume that it'll work on Ubuntu 9.04 but I didn't try that. This assumes that you already have Kubuntu installed and that you have root access.

I like to work at the command line so open a terminal session and go through these steps.

First we need to make sure that we have all the latest packages.

$ sudo apt-get update
$ sudo apt-get upgrade

Then from the "Virtual Machine" menu in VMWare select "Install VMWare Tools." This will connect a virtual CD Rom to the guest OS that has the VMWare Tools on it. Copy the file VMwareTools-7.9.3.-xxx to your home directory and unarchive it with...

$ tar -xzvf VMwareTools-7.9.3*

Now we need to change one file in the distribution.

$ cd vmware-tools-distrib/lib/modules/source
$ tar -xvf vmhgfs.tar
$ cd vmhgfs-only
$ sudo kate page.c

Somewhere around line 867 you'll find a line that looks like this...

page = __grab_cache_page(mapping, index);

...change it to look like this...

page = grab_cache_page_write_begin(mapping, index, flags);

Save the file and then go back to the Konsole and type this...

$ cd ..
$ rm vmhgfs.tar
$ tar -cvf vmhgfs.tar vmhgfs-only
$ cd ../../..
$ sudo ./vmware-install.pl

All of the questions can be answered by hitting the enter key except for the default resolution. At this point the mouse driver won't work right so install the Xorg virtual mouse driver with this little command.

$ sudo apt-get install xserver-xorg-input-vmmouse

Now reboot and all should work.

You can use this command to bring up the settings editor for VMware Tools.

$ sudo /usr/bin/vmware-toolbox

My New AVR Dragon

I have been using an AVRISP mkII for programming my AVR microcontrollers since I started playing with them a year or so ago. I really like the AVRISP because it's inexpensive, it works well and it's small enough to carry around. I recently made a mistake on a little test chip that I was using and programmed the RSTDISBL fuse because I wanted to use the reset pin as a port. Well that made it impossible for my AVRISP to reprogram the chip. It seemed obvious after I did it. You see the chip needs to be held in reset for the in circuit serial programming to work. Since I disabled the reset pin it couldn't do this anymore. Well I decided to bite the bullet and buy an AVR Dragon, since I kinda wanted one for its debugging capabilities anyway. Now I had an excuse, I needed the high voltage programming to fix my screw up.

This little programmer/debugger is pretty cool. It has the ability to program all the modes of most (if not all) of the AVR line of microcontrollers. It also talks to AVR Studio and can be used as an in circuit emulator. Actually it's a little bit better than an emulator because it doesn't emulate, it actually executes the code on the target microcontroller. It uses either the JTAG or DebugWire interface on the microcontroller to control the chip. It can do this on the prototype area on the Dragon board or in the target circuit.

I had a little bit of trouble with mine at first. I use a Mac and have Windows running in VMWare Fusion. This has usually worked really well for me but for some reason I was unable to update the firmware in the AVR Dragon. I had an old laptop at work with XP installed on it, so I put AVR Studio on that machine and used it to update the firmware. It works fine. I hope that Atmel gets that figured out before too long. Surely I'm not the only one having that problem. Once the firmware is updated, it works fine from VMWare but there was something about the firmware update.

The documentation for the Dragon is pretty good in some areas and not so good in others. It's great for wiring but it took a little digging and Googling for me to figure out that the Dragon doesn't really do any emulation. It simply uses the debugging interfaces on the target chip. This is actually a better deal than emulation since it runs on the actual hardware but it means that you do have to have the target chip to plug into the Dragon.

The software interface to AVR Studio is simple and easy. You just select AVR Dragon as the programming interface if you want to use it for programming. You can also select it as the debugging device instead of the simulator and use the emulation capabilities. The programming interface is pretty intuitive but it can be a little tedious. The Dragon doesn't actually connect the debug/programming interface to the prototype area on the board. The High Voltage programming port, the ISP port and the JTAG port are all put on dual row headers (one you have to install yourself) and then there is another 40 pin header that corresponds to the pins on the microcontroller socket (that you also have to install yourself). I found that it was very helpful to have some little jumper wires with female header connectors on them so that it'll be easy to wire up from one AVR to another.

AVR Studio has all the documentation for wiring in the AVR Tools Help menu. The wiring for each of the AVR line is laid our really well and in color which makes it quite easy to hook up.

I also found it helpful to install a 40 pin ZIF socket on the prototype area. This lets me put any AVR that the Dragon supports (well any that are PDIPs) in this socket very easily. Here is a picture of my Dragon with the jumper wires set up to do high voltage programming on an ATtiny84.

Oh the story on my little ATtiny that I disabled reset on ends well. I put it in the Dragon, unprogrammed the fuse, put it back in my target circuit and it works just fine. It's short one I/O pin (that I didn't really need anyway) but I can program it with my AVRISP mkII again.

BatchPCB

A while back I needed to prototype some printed circuit boards and I stumbled across BatchPCB. I've ordered from them a couple of times and they are great.

The basic idea is that they put a bunch of boards together on one panel and send the whole thing off as one design to have made. It takes a bit longer than some of the other prototype board houses out there but it's much cheaper and the minimum quantity is 1. I found other places that were actually a little bit cheaper per board but they made you buy 2 or more boards.

Another thing that I really like about them is that they save your designs. Once you find one that works and you want to order a few more it only takes a couple of clicks. They have great tutorials on their site too.

Syndicate content