raw L4Task: Flash Access & Variable
Adam Lackorzynski
adam at os.inf.tu-dresden.de
Thu Sep 25 23:55:06 CEST 2014
Hi,
On Wed Sep 24, 2014 at 21:01:06 +0200, ba_f wrote:
> i'm quite new to embedded, so i need some fundamental help.
>
> I have an App, that naturally runs on Linux.
> Now, i want to run it as a raw L4-Task (BareMetal), and no L4Linux.
>
> The problem is, the App requires non-volatile storage.
> Naturally, it would be started in a terminal; before starting, one has to
> set the Variable where to store data.
>
> Example:
> >export STORE_PATH=/home/appData/
> >./startApp
>
> (The app then gets the path like this:
> char *path = getenv("STORE_PATH");
> Anyway...)
>
> So, there are two questions for me:
>
> 1.) How do i allocate a filesystem to the flash?
> 2.) How do i set the variable STORE_PATH ?
>
> Is such an App possible without L4Linux?
It is possible. But of course there needs to be a driver for your flash
and a filesystem (if needed). And there's none.
There's a tmpfs, i.e. a filesystem that can store files, however, not
across reboots. Maybe that helps you already?
Setting environment variables is as easy as putting them as a third
parameter to the start function:
...start({ ... }, "rom/startApp", { STORE_PATH="/home/appData/" })
Adam
--
Adam adam at os.inf.tu-dresden.de
Lackorzynski http://os.inf.tu-dresden.de/~adam/
More information about the l4-hackers
mailing list