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: Aitor Garay-Romero<terminaaitor@g...>
    Date: Fri May 20 18:05:52 CEST 2005
    Subject: [openrisc] using stdio.h functions with or1ksim
    Top
    Hi there!,

    I'm trying to profile a simple program under or1ksim. The program
    makes use of fopen/fread/fclose to get data from a file.

    I'm linking the application with newlib. The fopen/fread/fclose
    symbols get resolved by the linker, but a lot of other external symbols
    from newlib remain unresolved. The unresolved symbols look like
    _lseek_r, _read_r, _sbrk_r, _fstat_r, ... I assume that those functions
    must be provided by some OS, for example uclinux. But, is there a
    library that with the support of or1ksim can provide that functionality?

    I have tried to implement those symbols with 'l.sys' instructions
    (using the syscall numbers from uclib/uclinux), but the or1ksim simply
    jumps to the SYSCALL vector address, and there is nothing there... ;-)
    I also have looked to the or1ksim source to see if it emulates the
    syscalls but found nothing (there seems to be an obsolete #define
    ONLY_VIRTUAL_MACHINE).

    So, in summary: is there an easy way to use
    fopen/fread/fclose/printf/... under or1ksim? One way i see is to
    somehow communicate with the outside world via the emulated serial port
    of or1ksim, but that's not trivial...

    Thanks!,

    /AITOR



    Follow upAuthor
    [openrisc] using stdio.h functions with or1ksimGy?rgy 'nog' Jeney

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