Using newlib in simulators
Rosière mathieu
mathieu.rosiere@lip6.fr
Tue Jun 20 17:18:00 GMT 2006
alright,
The OS contents the filesytem. With the program running in the
simulator, i want access at the filesystem.
Also, i have a bridge between the simulator and the Os.
The functionnement is :
in fonction "open", i write the parameter in the bridge and the number
of service. The bridge interpret the service and run the command with
the same parameters.
The problem is that newlib and my Operating system have not the same
signification for the flags macro.
Le vendredi 16 juin 2006 à 17:24 +0100, Dave Korn a écrit :
> On 16 June 2006 17:25, Rosière mathieu wrote:
>
> > Hi,
> >
> > I have seen a subject on how using newlib in a simulator.
> > In my platform : i have a bridge between the simulator (in which runs a
> > executable compiling with newlib) and the Os (Linux)
> > In the function "open", i have a problem using the flags :
> >
> > for linux the flags are :
> > 0x001 -> WRONLY
> > 0x040 -> O_CREAT
> > 0x200 -> O_TRUNC
> >
> > For newlib the same flags are :
> > (file newlib/libc/include/sys/fcntl.h)
> >
> > 0x001 -> WRONLY
> > 0x200 -> O_CREAT
> > 0x400 -> O_TRUNC
> >
> > Is it normal (is this model for another linux distribution than mine)?
> > Can the file ../sys/fcntl.h be modified without indesirable effects?
>
> Why does it matter if they're the same or not? They are two entirely
> different platforms, and the programs for each one should be compiled
> including the right header for that one; if you are using the Linux headers
> from your O/S to compile the binaries for your simulator, something is wrong
> in your cross-compiler setup, it should use the newlib headers.
>
> cheers,
> DaveK
More information about the Newlib
mailing list