Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

Running Hello Word example from Nios II SDK Shell

Hi all...

How can I run the "Hello Nios II" example from Nios II SDK Shell ?

I tried to use these comands:

$ nios2-elf-gcc -o hello.o hello.c
$ nios2-elf-gcc -nostartfiles -g -nostdlib -Wl,--gc-sections -Wl,-static -mhw-mul -mhw-mulx -mno-hw-div -o hello hello.o
$ elf2flash --silent --input=hello --flash=U5 --boot=`$QUARTUS_ROOTDIR/sopc_builder/bin/find_sopc_component_dir altera_nios2`/boot_loader_cfi.srec --outfile=./hello.flash --sim_optimize=0 --base=0x00000000 --end=0x007fffff --reset=0x00000000
$ nios2-flash-programmer --input=./hello.flash --sof=`$QUARTUS_ROOTDIR/sopc_builder/bin/find_sopc_component_dir altera_nios_dev_board_stratix_1s10_es`/system/altera_nios_dev_board_stratix_1s10_es.sof --device=1 --base=0x00800000
20/10/2005 11:47:26 - (INFO) nios2-flash-programmer: Launching Quartus Programme
r to download:
     c:/altera/kits/nios2/components/altera_nios_dev_board_stratix_1s10_es/syste
m/altera_nios_dev_board_stratix_1s10_es.sof
Pre-Reading 35KBytes of data from U5:
    |----.----+----.----|
    ********************* (2.641 sec).
20/10/2005 11:47:47 - (INFO) nios2-flash-programmer: Success.  Zero bytes writte
n to U5-
     (because device matched contents of ./hello.flash)
20/10/2005 11:47:47 - (INFO) nios2-flash-programmer: Flash programming complete

There are no errors from these commands... But I couldn't get the "Hello from Nios II!" message in nios2-terminal.

What is wrong?

Thanks,

Maikon.

1 Reply

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    originally posted by maikon@Oct 20 2005, 09:10 AM

    hi all...

    how can i run the "hello nios ii" example from nios ii sdk shell ?

    i tried to use these comands:

    $ nios2-elf-gcc -o hello.o hello.c
    $ nios2-elf-gcc -nostartfiles -g -nostdlib -wl,--gc-sections -wl,-static -mhw-mul -mhw-mulx -mno-hw-div -o hello hello.o
    $ elf2flash --silent --input=hello --flash=u5 --boot=`$quartus_rootdir/sopc_builder/bin/find_sopc_component_dir altera_nios2`/boot_loader_cfi.srec --outfile=./hello.flash --sim_optimize=0 --base=0x00000000 --end=0x007fffff --reset=0x00000000
    $ nios2-flash-programmer --input=./hello.flash --sof=`$quartus_rootdir/sopc_builder/bin/find_sopc_component_dir altera_nios_dev_board_stratix_1s10_es`/system/altera_nios_dev_board_stratix_1s10_es.sof --device=1 --base=0x00800000
    20/10/2005 11:47:26 - (info) nios2-flash-programmer: launching quartus programme
    r to download:
         c:/altera/kits/nios2/components/altera_nios_dev_board_stratix_1s10_es/syste
    m/altera_nios_dev_board_stratix_1s10_es.sof
    pre-reading 35kbytes of data from u5:
        |----.----+----.----|
        ********************* (2.641 sec).
    20/10/2005 11:47:47 - (info) nios2-flash-programmer: success.  zero bytes writte
    n to u5-
         (because device matched contents of ./hello.flash)
    20/10/2005 11:47:47 - (info) nios2-flash-programmer: flash programming complete

    there are no errors from these commands... but i couldn't get the "hello from nios ii!" message in nios2-terminal.

    what is wrong?

    thanks,

    maikon.

    <div align='right'><{post_snapback}> (index.php?act=findpost&pid=10480)</div>

    --- Quote End ---

    I think your uart has some problem,i am sorry i can not write in english very well.