I don't know if this is actually what you meant, or if you meant if the device can't hold a compiled C program. As already pointed out, you wouldn't run the compiler on the microprocessor -- you'd compile the code on a full-up computer and then download it to the processor.I dont think so.C is low level enough to deal with memory mappings.However if your device for some reason cant hold a C compiler(it is a bare microprocessor) then sure assembly is used
But there is the issue of a micro being so limited that it can't hold the compiled program. Some micros only have 24 total bytes of RAM (for instance, the PIC16C55, though I don't know if there are any others). While there are C compilers that will target these parts, it is challenging. But since these parts also have very limited instruction ROMs, it is common practice to handcode programs in assembly for parts like this and the limited ROM size keeps the program complexity manageable. That same limited code size also makes it so that the programmer often has to come up with very clever tricks to get the desired functionality to fit within the available space, and these are things that compilers can struggle with.


