Attempting to use software serial anywhere in code causes freeze on startup.

SUCCESS! Here's what I did:

  • I used these instructions as a guide: Building and Installing the GNU Tool Chain

  • I found the exact versions used in the Windows version - these are binutils 2.19 (not 2.19.1), gcc 4.3.2, and avr-libc 1.6.4

  • I patched these versions with most of the patches found in the Windows version of the libraries. The patches can be found in the source directory in this Windows package (can be extracted with 7z): Download WinAVR-20081205-install.exe (WinAVR) (note that if you're extracting with 7z and also building in the same tree, you should rename the $HWNDPARENT directory as the dollar caused me a LOT of problems with gcc compilation). Note how I said "most of the patches" - some patches actually made the build fail. The ones I remember in particular that did this were binutils patches 50 and 51, but there might have been more that I've forgotten. If you don't know how to patch files, it's something along these lines:
    ** Extract the archive for the package you're patching (tar -xvf package-name-version.tar.bz2)
    ** Change into the resulting directory (cd package-name-version)
    ** Use the patch utility to patch the files - most of these patches need -p0 (patch -Np0 -i path/to/file.patch). One of the patches (31-binutils-2.19-avr-coff.patch), however, needed -p1 instead of -p0, and also needed telling where one of the files was as the filename was wrong (had .orig after it in the patch). This should be pretty self-explanatory (just type out the filename it gives you minus the .orig)

  • I first installed binutils using the guide. This didn't fix the problem.

  • I then installed gcc using the guide. This then caused lots of compilation errors about missing libraries. So:

  • I finally installed avr-libc using the guide, compiled my test project, uploaded it... IT WORKS!!!