Software
Hello world
This is a simple example that shows how to get started writing an hello world on Miosix using the Netbeans IDE.You can find it here.
Benchmarks and testing
The correctness and performance of the Miosix kernel has been tested by means of:- A testsuite distributed along with the kernel. It provides a mix of black box and glass box tests for the Miosix and pthread API, as well as basic performance metrics such as synchronization primitives and filesystem performance.
- The MiBench
benchmark suite, of which most benchmarks have been ported to Miosix.
This suite contains a set of "real world" applications divided in six
categories: Automotive, Consumer, Network, Office, Security and
Telecomm. Examples include jpeg compression, PGP signing, GSM audio
encoding etc. Those application mainly stress the system's
implementation of the C standard library and filesystem.
In addition, to test the thread implementation an extended test was
done running one application per category simultaneously.
A report of those tests is available here, containing both test results and full source code. - The Periodic Harmonic (PH) test series of the Hartstone benchmark have been implemented in Miosix as a way to compare the performace of the three schedulers currently implemented in the kernel in a real time situation. In addition, a modified version of the Hartstone benchmark has been implemented to test what happens to the schedulers in the precence of an unschedulable task pool requiring a CPU utilization greater than 100%. The results, presented here including full source code to reproduce the experiment, are part of a research project trying to redefine the design process of a scheduler starting from control theoretical principles
Code examples
Coming soon.Configuring the kernel
The kernel is configured by means of two files in the miosix/config directory:Makefile.inc that contains the following options:
- OPT_BOARD that given a supproted board selects the appropriate board support package that will be compiled and linked. CPU architecture is autodetected starting from this option
- OPT_OPTIMIZATION that selects compiler optimization level
- OPT_EXCEPT, a binary flag that selects whether C++ exception handling is to be enabled or not. Disabling exception support reduces code size.
miosix_settings.h that contains the following options:
- SCHED_TYPE_* To select one of the available schedulers.
- WITH_FILESYSTEM To enable/disable filesystem support
As with the other configuration file, there are many other options not described here, but well commented in the file itself.
After modifying configuration files it is recomended to do a make clean; make (or in the Netbeans IDE, to click on the "Clean and build project" button) to be sure that changes are applied.
Configuring libraries
Each Miosix library has its own configuration file:- The mxusb library autoconfigures itself starting from the USB descriptors passed to the USBDevice::enable() member function. In addition, there are some debugging options that can be enabled in the mxusb/usb_config.h configuration file. Detailed information is available in the Doxygen documentation
- The mxgui
library is configured by means of the
mxgui/mxgui_settings.h
configuration file. In addition, display drivers are selected on a
per board basis by conditionally providing an implementation of the
DisplayImpl class depending on a macro which the Miosix build system
defines to identify the board.
Display drivers are in the mxgui/drivers directory. Detailed information is available in the Doxygen documentation