So I'm still banging my head against the difficulty of making a simple serial connection between my Raspberry Pi and an ATMega chip on a daughter board. And I still have not got it working properly.
Overnight it occurred to me that I ought to have turned off the serial port login on the Raspberry Pi. I'm sure this was getting in the way and confusing things, so I followed some steps I found from a quick Google search.
With the Pi and Duino connected, at least enough to report a success in programming, I attached the LED and saw it happily flashing away. Good!
Now time to try the terminal. I started Microcom on the Raspberry Pi using sudo microcom -p /dev/ttyAMA0 -s 9600
and at last saw something. Not useful characters, mind, but something. It seems there is a problem with the baud rate of the text.
I tried a few other baud rate settings, but with no extra clarity. I then plugged in my Saleae Logic, and set it to "auto baud rate". It had a think, then showed that it had found valid characters at a baud rate of 13157 baud. This is a very weird speed, and nothing like the 9600 baud the code claims it is using. This made me think, so I also measured the supposedly 500ms wait between characters and saw that it measures as roughly 350ms, a long way off from what I would expect.
This hints to me that there is something wrong either with the crystal clock or with the way the AVR has been set up to expect a different clock frequency. While writing this it suddenly occurred to me that maybe my "boards.txt" setting was wrong. I guess the Gertboard uses a 12MHz crystal or something, because when I looked back at my settings, there it was:
gert328.build.f_cpu=12000000L
The MCU is set to think it has only a 12MHz clock, when it actually has a 16MHz crystal. That'll teach me for blindly copying someone else's config file :(
Now I just need to put everything on my proto-board back where it should be, and see if I can finally get serial communication to work.