What is bare metal programming?
Bare metal programming is a way to program a computer with a minimalistic set of [software] tools, the name comes from a reverse sentence: programming on the bare metal [of the processor].
This mainly means that you avoid the use of an operating system and have to handle the discussion with the underlying hardware directly from the [bare metal] user application. This usually implies that bare metal programming is done using a mix low-level programming language like assembler and C language (and the pile of hardware specification documents).
Why programming on the bare metal?
The main arguments for programming on the bare metal are usually:
All arguments could be discussed, we (at ONERA) are trying bare metal for a goal which can be considered of the third case: deterministic execution. When programming embedded time critical software like control command software of an airplane or any other vehicle you have to ensure that the WCET (Worst Case Execution Time) of each task can be computed. The computation of WCET is a difficult task even for simple softwares, thus the less you have to analyze the better the result. If we can avoid operating system then may be we will. That's one of the main characteristic of real-time systems the time instant when you obtain the resulat is as important as the validity of the result itself. More details here or in the video.
How to program on the bare metal?
The way to program on the bare metal depends on the metal you are on. There is no general answer to that besides the fact that it usually leads you to some combination of assembler and C code. Several examples are given in the reference below. We are mostly interested in SCC bare metal programming.
Here are some references about bare metal programming in various context
- Baremetal Applications and RCCE: http://communities.intel.com/thread/17506
- Is there any documentation for running applications on Baremetal? http://communities.intel.com/thread/23765
- The baremichael framework: http://communities.intel.com/message/151910
- ETI bare metal framework for SCC: http://communities.intel.com/message/108074 with more explanations here http://communities.intel.com/message/137142 even more questions (and answers) on ETI Framework: http://communities.intel.com/thread/24382
- Booting custom Kernel on SCC: http://communities.intel.com/message/129429