On 11.06.2013 10:57, Rahul Singhal wrote:
I have recently ported l4 fiasco + l4Re on raspberry pi. I tested the port with the sample hello world program and it works fine.Now I want to write some of my own programs (C++, C and python) and run it on this environment. All I have done as of now is modify the sample hello world code a bit and test it. How do I go about doing this and where to start from?
If you want to start your own program, it's best to create a new package in l4/pkg and implement everything there. To start off with an empty application, there is a script that sets up a build-system-compatible directory for you:
$> cd l4/pkg $l4/pkg> mkdir my_pkg $l4/pkg> cd my_pkg $l4/pkg/my_pkg> ../../mk/tmp/inst
-> At this point an empty server can be found in l4/pkg/my_pkg/server/src. Running "make O=<build dir>" in the package will compile everything. And you can adapt the Makefiles to suit your needs.
That's it for C/C++ code. For Python you build the Python package and then load it along with your Python programs. To use L4 services from Python, you will need to have Python C extensions, which can for instance be generated using SWIG (http://www.swig.org).
Bjoern