LOGIN   :::   RECOVER PASS   :::   GET ACCOUNT    
Browse
  • Projects
  • Code (CVS)
  • Forums
  • News
  • Articles
  • Polls
  •  
    OpenCores
  • FAQ
  • CVS HowTo
  • Mission
  • Media
  • Tools
  • Advertise
  • Mirrors
  • Logos
  • Contact us
  • Find Resources
  • Job Opportunity
  •  
    Tools
  • Search
      
  • Download Cores (CVSGet)
  •  
    More
  • Wishbone
  • Perlilog
  • EDA tools
  • OpenTech CD
  •  
    Navigation: All forums > Openrisc > Message List > Message Post

    Message

    Reply | Reply all
    Date Prev | Date Next | Thread Prev | Thread Next Date Index | Thread Index

    From: Mark<jarvin@e...>
    Date: Fri Dec 14 15:21:25 CET 2007
    Subject: [openrisc] or32-elf and the fprintf
    Top
    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?

    ReferenceAuthor
    [openrisc] or32-elf and the fprintfDimitrios Orfanos

    Follow upAuthor
    [openrisc] or32-elf and the fprintfDimitrios Orfanos

     
    Copyright (c) 1999 OPENCORES.ORG. All rights reserved.