An introduction to cross compilation with Go
dave.cheney.net
dave.cheney.net
I've been doing Go development for chumby (ARMv5-based) devices for months, and do all of my editing and compilation on Windows and then just rsync the binary over as part of my Sublime Text 2 build script.
Go is the greatest embedded-device-style development environment I've ever used, by far, without all the hassles of having to build a full cross-compile toolchain or use some hopelessly out of date vendor-made BSP cross-compile toolchain.
(FWIW, building a Go compiler right on the device is easy as well, but even with Go's focus on fast compile times, cross-compiling is still a much better experience when targeting these low CPU/low RAM devices).
Of course, there can be substantial costs from slowing down builds and spending development time waiting for compilation on the actual (target) hardware. On the other hand, the advantages of finding target-specific bugs and adequately stressing the system can make the expense worthwhile. Bad hardware happens far more often than vendors like to admit, and stressing the system is a good way to test it.
As always, it's a trade-off.
The good example of taking the expensive but thorough approach is the OpenBSD project. After getting past bootstrapping an new platform, all builds are done on the actual (target) hardware. Since the code base is cross platform, the new platform could give them the benefit of finding bugs that don't manifest or are unnoticeable on all of the other supported platforms. Also, the OpenBSD project does pretty much continuous build of their tree on actual hardware, so they're always stressing the hardware to make sure it's working properly, as well as finding errant bugs that are tough to find on a single platform.
I've been toying with the idea of trying to bring a Go program up on the following (as I have a couple lying around):
https://www.olimex.com/dev/lpc-e2468.html
The only problem is that it doesn't support "normal" linux - uCLinux only.
edit: the CPU is ARMv4T, the gc Go compilers generate code only for ARMv5 and higher, so it will not work.
I don't mind writing a new backend as the compilers are quite easy to work with by the looks. Plus it'll exercise my brain more than typical CRUD apps.
The compiler suite is a pleasure to work on, really clear code, just like all the other code Ken Thompson wrote. Good luck.
I'll submit results if I get anywhere - might take a month or two :-)
Currently trying to a (any) toolchain online first to test the board and get a ucLinux kernel up (gcc cross-compiler + OpenOCD + Olimex ARM-JTAG + ThinkPad Ultrabay parallel port stack should be 'fun').
Now for the go toolchain...