But, can you write a firmware entirely in Ocaml? or in eRlang?
The "who cares" reactions to this question were fun to read, although they make a point.
Trying to get back to the topic a bit, one of C's strong points is that it's indeed a language in which you an pretty much implement anything from very low-level to very high-level. Many may not find C very good for high-level abstractions, but it's still doable.
Erlang runs on a virtual machine. While you could probably write your own virtual machine for using Erlang on any target, it's going to take a lot of work for any target/platform that is not readily supported. Probably no one is going to do this. Besides, even the most minimal VM for Erlang is likely to require a lot more memory than any typical MCU has. If that's the kind of target you have in mind.
As to Ocaml, AFAIR, you can compile it into bytecode or into native code directly. But again here, the number of supported platforms is probably going to exclude anything like MCUs. And even native code requires a significant runtime, which you would also have to write for the specific target you wanna use. But I don't even know if there's any Ocaml compiler that supports, say, ARM-Cortex MCUs, for instance. So already good luck writing your own. (Now if that thing exists, I'll be curious to have a look.)
Of course it all depends on what you call "firmware" here. Erlang can certainly be used to write "firmware". As long as the target you want to use is supported. As I said, I doubt you'll be able to use a modest MCU. But I think there are Erlang tools for PowerPC, for instance, so you could probably use it on systems hosting a PowerPC CPU and consider the software you write here "firmware".