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”.