I'd be interested in getting simple Go programs running on Cortex M-series microcontrollers. There are a number of boards on
mbed.org which have 512K-2M flash, and 256-512K RAM; the Mbed OS seems to have threads and a network stack, so it's not out of the question.
As an experiment, I installed & ran
gccgo 6.0 on an ARM Linux box, and it will compile simple
.go files to Thumb code (using the
-mthumb option, and in fact by default...) quite readily. So code generation itself isn't a big blocker. I think the issues are likely to be:
- The size of the runtime (as discussed in many places). How much stuff can we throw away (Unicode? reflection?) and still have a useful embedded system? Pretty hard to do anything without basic GC, and no goroutines or channels would make life very dull.
- Dependency of the runtime on Linux system calls. How many fancy properties of threads or memory management does it rely on?
- Floating point. Any chance of running the system without FP?
- Doing Useful Stuff without writing wrappers round the whole OS.
I might have a crack at getting the simplest Hello World going on an upscale mbed board, to see how awful it's likely to be.
Cheers
IH