2 ms·
One big reason why compilers don't target architectures is because you have to write codegen and an assembler for it - the first is hard and requires intimate k
by duped 5y ago
One big reason why compilers don't target architectures is because you have to write codegen and an assembler for it - the first is hard and requires intimate knowledge of the ISA and the second is tedious since there are few assembler libraries at all. So you use an existing compiler infrastructure like gcc or llvm that does it for you.
For C++ specifically it's a great language for low resource embedded systems and widely used. There is nothing stopping you from using it today (responsibly).
A much more interesting road is languages like Java that have more intense runtime requirements like garbage collection. But Java has run in similar environments for decades - it just takes the right VM and some restrictions (usually, no reflection).
A very interesting project right now is Toit, which is pushing the boundary on JIT compilation on small devices.