Search code examples
microcontrollerrtosbare-metalsoc

What is the difference between bare metal, RTOS and SoC?


Having just recently gotten into embedded programming using PIC microcontrollers, I am trying to understand the difference between Bare metal, RTOS and SoC.

Online searches reveal contradictory definitions and meanings.

For example, Semiengineering state that "An RTOS is code written on bare metal" and arduino.cc state that "If you programming controller without using any [RT]OS it's a bare metal approach".

The implication is that some code written on bare metal can be considered to be RTOS, whilst others may not be.

Therefore, my question is when can embedded programming of microntroollers be considered programming of bare metal and/or RTOS? And where does SoC fit into all of this, if at all?

Any insight that anyone can provide will be very much appreciated!


Solution

  • (1) An RTOS is a Real Time Operating System. Implementing an operating system is not the same thing as using an operating system. It seems like you'd know whether you're programming using a Real Time Operating System or nothing. And that's the difference between using a RTOS and bare metal.

    Note that the RTOS code is bare-metal programming, because it's not using any lower-level software. And then when you write your code using the RTOS, it's not bare-metal programming, because you're using the services of the RTOS.

    (2) It seems like you'd know whether you're implementing an operating system or an embedded application And that's the other difference.

    (3) As regards an SoC - that's a hardware category. Is there one integrated circuit containing the CPU and a bunch of associated functions (interrupt controller, maybe an MMU, peripheral interfaces, network, etc.)? Then it may be a SoC. Or are there a few other ICs providing these functions? Then it's not a SoC.