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: beking<seaman_516@1...>
    Date: Tue Dec 11 13:04:39 CET 2007
    Subject: [openrisc] Local Variable vs Global Variable
    Top

    hi,华文:
    now i want to run "hello world " on my dev_board(cycloneII),but when
    compiling all .v files,some errors coming,did you come into contact with
    this error in your experiment,.....

    华文 wrote:
    >
    > hi ! I have run the simple Hello world program on the or1200 processor
    > following the Basic custom openrisc system HW/SW tutorial.
    > The hardware only contains the processor, debug unit,ram and the uart
    > unit.
    > And I find a very strange phenomenon I do not konw why.
    > That is if I modify the hello.c code by making the 'char *str = "Hello
    > world!!!\n" ' inside the main funciton, the hello world program can not
    > run
    > on the or1200 processor.
    > By modification,there is not a .data section. Thank you for your
    > attention,
    > looking forward the answer.
    >
    > the original codes:
    > *char *str = "Hello world!!!\n";*
    > int main (void)
    > {
    > char *s;
    >
    > uart_init ();
    > for (s = str; *s; s++)
    > uart_putc (*s);
    >
    > while (1)
    > uart_putc (uart_getc () + 1);
    >
    > return 0;
    > }
    >
    > ---->by modification:
    > int main (void)
    > {
    > char *s;
    > *char *str = "Hello world!!!\n";*
    > uart_init ();
    > for (s = str; *s; s++)
    > uart_putc (*s);
    >
    > while (1)
    > uart_putc (uart_getc () + 1);
    >
    > return 0;
    >
    > }
    >
    > _______________________________________________
    > http://www.opencores.org/mailman/listinfo/openrisc
    >

    --
    View this message in context: http://www.nabble.com/Local-Variable-vs-Global-Variable-tp13385699p14268642.html
    Sent from the OpenCores - RISC mailing list archive at Nabble.com.

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