Using Ada for partitions

Both C and Ada can be used for partitions. Ada will nevertheless require some tuning to run into POK, only a GCC toolchain that handles Ada is needed.

Since POK partitions are loaded by executing their main function, one of the Ada packages must export a function as main. Moreover, the runtime should be disabled using pragma No_Run_Time.

The following piece of code is an example of how to proceed:


\begin{lstlisting}[language=Ada]
-- main.ads
pragma No_Run_Time;
with Interfaces...
...ain is
begin
Printf (''Hello world!'');
end Main;
end Main;
\end{lstlisting}

An ARINC653 layer is also available in libpok/ada/arinc653 and should be used the same way as described above.



Copyright 2009 POK Team