Emulating Your Hardware System with SynthOS

SynthOS enables you to entirely change the way you develop your embedded system. With current methods of development, users typically start the development with a demo board that emulates the final hardware. Another option is to wait for the actual hardware platform to be designed and manufactured before completing development and starting the testing of the software. With SynthOS, the development can start before any hardware is available, by writing the software modules that include the core algorithms and control routines and replacing the hardware-dependent functions with emulation code, which can be as simple as print routines or key inputs, to emulate low-level hardware signals and communication messages.

One of the great benefits of using SynthOS for creating your application specific operating system (“ASOS”) is the fact that you are getting a simple C source code implementation that can be used to emulate your final system on any computer. At least any computer that has a C compiler, which is just about any computer. Unlike other RTOSes, SynthOS generates an optimized ASOS that stands on its own and is not dependent on the particular hardware. You must write the hardware-specific code that interfaces between the software and the system hardware and wrap that code in C. This means it is relatively easy to run the software on a wide variety of hardware systems by substituting other C routines for the hardware-specific routines. You can even modify the system easily to run on a PC, and since the code is pure C, it is also easy to run in any of the integrated development environments (IDEs) available on the market.

A simple example of a “Hello World” multitask application using SynthOS can be found at www.github.com/ZeidmanTechnologies/SynthOS-hello-world. This example contains two basic SynthOS loop tasks with another SynthOS call task that is used to synchronize the two loop tasks. This code can be compiled with the GCC compiler and run on virtually any system. We have also run this demo code in the QT-Creator IDE, which has a graphic user interface and advanced debugging capabilities. Running the significant part of the system code as an emulation on a PC and using an IDE, will enable you to debug a significant part of the system before even selecting the final hardware.

One of the concerns developers sometimes have when using SynthOS-generated applications on a PC is the continuous operation of the ASOS. Since SynthOS is generating an ASOS for an embedded system, this code will run continuously forever. The developer does not have to create an idle loop (or task) using the while(1) or the for(;;) commands. The SynthOS ASOS will manage the idle operation and the sleep mode for the system, but when rujnning it on a PC for emulation, you may want to stop the system without having to kill the task. To terminate the ASOS at any time, you can add the following command in your code:

SynthOS_abort = 1;        // Exit SynthOS

Then simply create a task that waits for some particular input or timeout to abort the entire system and return to the PC operating system gracefully.

Jacob Harel
VP of Product Management
Zeidman Technologies

Leave a Reply

Your email address will not be published. Required fields are marked *