Bare metal embedded software development with & without an RTOS

Joseph Coombs, Texas Instruments

March 6, 2012

Joseph Coombs, Texas Instruments

Using StarterWare for RTOS Development
The second example application that we will consider is also an OMAP-L138 DSP+ARM processor-based application using StarterWare. This is a more focused application; instead of lightly using a variety of peripherals and software components, it uses just a few peripherals and intensive analytic algorithms to perform face detection on an incoming video signal. The output image—the input image with an overlay surrounding the detected face—is then displayed on an LCD screen.

These are significant differences from the previous example, but the most important change is that now StarterWare is just one component of the overall application. The new application is built around the SYS/BIOS RTOS kernel, which handles CPU features such as cache and interrupt support and also provides scheduling services to enable multi-threaded application design.

Using an RTOS has a significant impact on the overall application and how StarterWare can be used. A great deal of the application logic and initialization is hidden away by the RTOS; it's not as easy to follow the application flow just by examining its source code.

The application makes use of RTOS functionality to split its processing into multiple independent threads and ISRs, all of which are managed by the SYS/BIOS scheduler. This is an important change for the overall application and the primary benefit that our previous bare metal application didn't enjoy. The RTOS application flow is illustrated in Figure 4 below.


Figure 4: Software flow diagram for RTOS application with StarterWare

Since responsibility for interrupt support is assumed by the RTOS, StarterWare is only responsible for handling peripheral access. The various StarterWare stack libraries could also be used, but our face detect application uses only the low-level DAL components. In essence, StarterWare serves as driver code for this application.

This comparison could easily be taken a step farther: StarterWare could serve as the basis for OS-specific driver libraries for use with multiple applications. This more indirect approach would be preferred in an application running under a full OS, such as embedded Linux, which disallows bare metal code in "user" applications.


Click on image to enlarge.

Figure 5: System diagrams for various StarterWare use cases. Left to right: standalone application; application using RTOS; application under full OS.

Using StarterWare to develop device drivers for full OS development is beyond the scope of this article, but Figure 5 above shows some of the differences in system partitioning between full OS applications and our example cases of bare metal and RTOS systems.

Conclusion
StarterWare provides a rich set of libraries and utilities to enable bare metal development on specific SOC embedded devices from TI. These tools can be useful either as the basis for developing complete OS-free applications or as smaller parts of OS-based applications. In this article, we explored how StarterWare is used in two separate example applications showcasing bare metal and RTOS application development.

StarterWare is currently available as a stand-alone package targeting OS-free development, but efforts are already underway to include it in software development kits (SDKs) targeting the SYS/BIOS RTOS kernel.

Additionally, while StarterWare already supports current TI devices such as the OMAP-L138 DSP+ARM processor and the Sitara AM3359 ARM microprocessor, development is ongoing to improve those releases and extend support to future TI SOCs. The embedded space is home to an incredibly diverse set of applications with widely varying features and demands, but StarterWare is a powerful tool that has a place in every embedded developer's toolbox.

Joseph Coombs is an applications engineer at Texas Instruments  for the TMS320C6000 Digital Signal Processor (DSP) business, responsible for development, documentation and technical support for StarterWare for DSPs and the C6EZFlo graphical software development tool. Coombs also contributes to other DSP software projects, including the ongoing effort to port the OpenCV library to C6000 DSPs. He received a Bachelor of Science in electrical engineering from the University of Tulsa and a Master of Science in electrical and computer engineering from the University of Illinois at Urbana-Champaign.

< Previous
Page 3 of 3
Next >

Loading comments...

Most Commented

Parts Search Datasheets.com

KNOWLEDGE CENTER