Zen API
|
Why is Zen written in primarily in C? And why are some portions now written in C++?
The Zen library began in 2005 as an initiative to create a portable middleware layer that would enable applications to run on both embedded and host platforms. At the time, C was the obvious choice due to the wide availability of high quality C compilers and standard library implementations for embedded platforms. Today, C++ support in the embedded community has improved, mostly due to the increasing use of GCC and clang. Accordingly, we have started the process of porting Zen to C++, but it will be some time before this process is complete.
What language features does my compiler need to support in order to build Zen?
Support for C99 and C++ 2011 are now required. Future versions of the Zen library will make increasing use of C++, and eventually modern C++ support will be the only requirement.
What platforms are supported?
Windows | Zen is tested and supported on Windows 7/8/10. We no longer test Zen with Windows XP or Vista, but we don't know of any reason why it would not be compatible. Project files are provided to build Zen using recent versions of Visual Studio. MinGW is not officially supported, but Zen has been reported to work with this environment. On MinGW the following command-line arguments must be passed to GCC: -DUNICODE -DWINVER=0x5001 |
Linux | Zen is tested and supported on the most recent version of Ubuntu Linux. We expect that Zen is compatible with other Linux distributions, but Ubuntu is the only distribution that we use for testing. A GNU makefile is provided to build Zen. |
Mac OS X | Some portions of Zen are ported to Mac OS X, but this port is not routinely tested and is not supported. The makefile provided for Linux may be of use in getting Zen to compile for OS X, or the Zen sources can be imported into a new Xcode library project. If you make improvements to the OS X port, we will gladly accept a patch. |
VxWorks | Zen can be used to build VxWorks kernel applications and is routinely tested on VxWorks 6.9. To use Zen with VxWorks, create a new kernel library project and import the Zen sources. |
QNX Neutrino | Some portions of Zen are ported to QNX Neutrino, but this port is not routinely tested and is not supported. The makefile provided for Linux may be of use in getting Zen to compile for Neutrino. If you make improvements to the Neutrino port, we will gladly accept a patch. |
SYS/BIOS | Zen is routinely tested on TI SYS/BIOS 6.42 (NDK 2.x). To use Zen with SYS/BIOS, create a new static library project and import the Zen sources. |
Are 64-bit platforms supported?
Yes. If you received 32-bit binaries, 64-bit versions can be created by recompiling the Zen library (use the 'x64' build configuration for Windows).
Where is the 'include' folder?
Zen does not segregate source files and include files into separate folders. Add [install-location]/Platform/kApi to your include path to access Zen header files.
What is the difference between '.h' header files and 'x.h' header files?
Zen classes are usually implemented using two header files and one source file. The '.h' file is the public header. This file contains declarations that are intended to be used from within other libraries or applications. The '.x.h' header file is the internal header file. This file contains declarations that should only be used from within the Zen library.