It's quite ugly and I'm a little embarrassed to post it. But it may save someone some time. Unfortunately it's using the Fwlib v2. In my working code, I replaced a lot of the library functions with direct writes thru pointers. The library seems to do a lot of runtime calcs.. also the Gnu linker links in all functions from a file if one is used. In stripping this back for the example, I tried to use the library.. I couldn't get the serial init stuff going so I left my direct writes... sorry, I'll try to fix. I've been thinking about coming up with some sort of a howto on this. Anyways, what I've got is here: