What is Bare-metal?
- Bare metal represents the actual register interfaces and hardware features of the processor system.
- Bare-metal development uses a software runtime environment that does not use an OS or an RTOS.
- In bare-metal configurations, the HPS of SoC FPGAs can be used. Intel offers HWLIBs that consist of high-level APIs and low-level macros that enable you to exercise most of the HPS peripherals.
- The advantages of using a bare-metal approach are:
- Absolute control of hardware
- Increased efficiency
- Minimal size (both flash and memory footprint)
- No dependency on other source codes or libraries
- Easier to formally prove correctness and perform code coverage analysis
- Other reasons for selecting bare-metal development are:
- Need to perform board bring-up and focus on one peripheral at a time
- Need to re-use existing legacy code that is already developed as bare-metal
- Lack of experience with an OS or RTOS
To develop a bare-metal application for the HPS, you must be familiar with developing runtime capabilities to ensure that your application makes efficient use of the resources available in your CPU subsystem. Examples of what may be required are as follows:
- In-depth knowledge of the hardware platform
- Developing runtime capabilities to manage the process between the core and the cache subsystem if you want to fully utilize the CPU subsystem, as a typical bare-metal application uses only a single core
- Developing capabilities to manage and schedule processes, handle inter-process communications, and synchronize events within your application
If your scheduled project does not allow for effort it may take to become familiar with the above points, then it is recommended that you consider using a commercial Linux* or RTOS solution.