Firstly, I'll talk about Arduino, then programming MCUs, then 68HC11 tools.
Arduino
Actually, programming MCUs is a little bit of a pet project of mine, but it would be useful to take things a step at a time.
Arduino is basically a C++ compiler with an editor; an SDK (a set of libraries); a downloader and a serial monitor (+plotter). It does a little bit of syntactic sugar on .ino files, but really it's all C++ underneath. So, if one grabs a C++ compiler, a downloader, an editor, a terminal emulator, the Arduino SDKs then you can do what you'd do with Arduino, on much older tech.
Programming Modern MCUs
My immediate goal would be to program an ARM Cortex MCU over serial (because they can all boot over serial) using a 'C'/'C++' compiler on my PowerBook 1400c/117MHz/32MB RAM. I'm not sure what GCC's resource requirements are, but I do know that it's pretty slow by today's standards and I wouldn't be surprised if it happily ate all the RAM on my PowerBook before generating a .elf for Blinky.
So, this leaves a few other compilers to try:
- LCC. LCC doesn't do C++. It's relatively easy to port and the requirements for LCC 4 for ARM Cortex (16-bit opcodes) can be easily met. The downloads provide examples for x86, Spark, MIPs, VAX and it's easy to find out how it was ported to the pdp-11 and the DIY Magic-1 computer. I'm part of the way through generating a port (a .md file) for LCC 4 for ARM Cortex M0(+).
- C68. C68 was a compiler for the ancient 68008 based Sinclair QL and could run in as little as 128kB. Incidentally this was Linus Torvold's first proper computer! But C68 has ports for the 8086, x86 and ARM (don't think for ARM Cortex M0 though). I've tried to build it for ARM, but there's some kind of configuration error that causes a compiler error (you can choose things like the assembler format gas/masm etc and I think I'm mucking that up). It's a small ANSI C compiler.
- TCC, but I don't know how easy that is to port.
- PCC, which also has an ARM port. PCC looks more challenging to port than LCC and I'm not sure if it has the same code quality.
I think my favourite would be LCC. The important thing for me is that the code quality is no more than 20% worse than gcc, so that practical applications for an MCU would work on it. It's always going to be a trade-off between compiler performance, compiler resources and compiled code performance. Perhaps it's possible to add a C++ front-end to LCC and then get Arduino libraries to work with that.
68HC11
I remember a friend at Manchester Uni (actually UMIST) who was doing Robotics with a Mac based on the Handy Board, which was built around the 68HC11. The environment used something called "Interactive C", which was a lot like the Arduino concept, where you wrote C code in an IDE and then compiled / downloaded it onto the target. Interactive C, however, was a byte code interpreter. I managed to get an update to the run-time library to support a full 100 PWM levels using a Pulse Code Distribution algorithm (SmoothPWM). But this was old, OLD stuff: Interactive C ran on System 7 and she was using a pre-PowerPC PowerBook (or perhaps even an LC III or 475).