Jump to content

Baremetal vs. OS


ronan_rt

Recommended Posts

We definitely recommend using an embedded os particularly for starter users. There are several reasons...

1. RAW32 is complex to get working in some cases due to its C compiler and/or CPU dependancies. 

2. RAW32 is a co-operative scheduler. Most embedded os's will provide a proper preemptive scedular.

3. Most embedded os's also provide some sort of HAL layer for talking to standard peripherals such as SPI. This vastly simplifies talking to your hardware.

4. Most embedded os's provide a suitable c library and runtime startup code. With RAW32 you are responsible for all the startup initialisation yourself.

Of course the advantage of RAW32 is that it can be slightly lighter than a full operating system. Don't be decieved however that is not always the case. For example, STM provide a HAL library that vastly simplifies using RAW32 on STM processors. That HAL library however is not light nor efficiently written. In many cases solutions using that HAL will be every bit as large as the same application using an embedded os.

When selecting an embedded os the selection of available features can be very important. For example, some os's don't provide a HAL (eg FreeRTOS), some are not real time os's (RAW32 itself definitely isn't), some are only available on a narrow range of platforms, some are not well supported, some are expensive, some have restrictive licensing terms (eg GPL) etc.

I think people like to write "bare metal" because they think they will end up with a simpler, more efficient solution. That is definitely not always the case and going "bare metal" can add a lot of complexity to the development process itself.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...