Electrical – Is bare-metal programming still a thing?

embeddedlibraryprogramming

I am in the learning phase of embedded systems programming. I am curious about the industry practices. Nowadays the microcontrollers are getting powerful and comes with a lot of memory, networking connectivity and own libraries and sdks.

So I would like to know that is bare-metal programming(without OS, libraries, sdks, frameworks) still a thing in industry? If yes, then till what extent abstraction is used?

Best Answer

So I would like to know that is bare-metal programming(without OS, libraries, sdks, frameworks) still a thing in industry?

Yes! A lot depends on the application but small applications often don't need much processing power and this allows the use of small processors, sub $1 US. A library or OS would force the use of a larger processor. Another factor may be custom hardware: You still need to drive IC pins with the correct signals and timing is important. Often a commercial licence does not exist for this so you have to either create your own library (using bare metal code) or put it in your main program.

If yes, then till what extent abstraction is used?

Libraries are often used for complex functions and supplied free by IC manufacturers. Building an Ethernet TCPIPv4 stack from the bottom up or implementing USB are non trivial tasks so are often supplied as libraries or example source code.

A full TCPiPv4 Ethernet stack took me a year to develop from scratch.