Thought Leadership

Testing RTOS API code

A while ago, I concluded that it might be useful to highlight the publication of online articles, that I had written, here. So, I made a series of postings to catch up, listing articles that have appeared regularly on embedded.com over the past couple of years. That catch-up process is now complete and I can now provide a notification as and when publications occur …

I recently started thinking about how programmers using an RTOS, like our own Nucleus RTOS, go about their initial debugging, before building a complete system is feasible. The result was this article:

Testing code that uses an RTOS API

Embedded application software, which is designed to work under the control of a real time operating system presents an interesting testing challenge. The code is most likely littered with RTOS system (API) calls, which need to be verified along with the logic applied to any response received. Ideally, the testing process would involve linking the application to the RTOS and debugging. However, this introduces a number of other unknowns and necessitates a target execution environment (which may or may not be the final hardware). It would be useful if this testing could simply be done on a host computer, as PCs are readily available. This article explores an approach to making progress in testing such code by running it natively and using a “test harness”.

Colin Walls

I have over thirty years experience in the electronics industry, largely dedicated to embedded software. A frequent presenter at conferences and seminars and author of numerous technical articles and two books on embedded software, I am a member of the marketing team of the Mentor Graphics Embedded Systems Division, and am based in the UK. Away from work, I have a wide range of interests including photography and trying to point my two daughters in the right direction in life. Learn more about Colin, including his go-to karaoke song and the best parts of being British: http://go.mentor.com/3_acv

More from this author

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/embedded-software/2015/05/04/testing-rtos-api-code/