|
Message
From: Mark<jarvin@e...>
Date: Fri Dec 14 15:21:25 CET 2007
Subject: [openrisc] or32-elf and the fprintf
Dimitrios Orfanos wrote: > Hi to everyone, > > I use the drp-0.6 toolchain with this configuration : > http://www.geocities.com/dimitrisorfanos/sim.cfg.gz > > Where the fprintf is directed when I try to read or write a file? I've tried > to create a file in my home folder and the created file didn't appear. > There's two problems here: 1. You're running the code in a simulator -- the simulated or32 code has no clue about the x86 OS/filesystem that the simulator operates in. 2. The or32-elf toolchain in the drp-0.6 tarball only implements a stub for open() that returns ENOSYS (no filesystem!). read() and write() route stdin/stdout/stderr to the UART and return an error if any other descriptor is passed in. See drp-0.6/toolchain/src/newlib-1.15.0/libgloss/or32/io.c.
Writing to a file is out of the question. Why not dump your data to stdout?
|
 |