Forum Discussion

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

Why do I need to use the Nios II Command Shell to run bin2flash

Hi all,

I am trying to automate a download process over jtag and need to run bin2flash and nios2-flash-programmer.

I would like to be able to call these directly but cant seem to figure out how to run these without using the Nios II command shell. Can anyone tell me how I can either call these directly or via python? or at least give me a reason why they MUST be run in this way i.e. whats the difference between the Nios command shell and a classic bash or cmd?

thanks,

Grafne

6 Replies

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

    hi.....

    the nios command shell set the paths to quartus/bin nios2/bin and pearl

    ... you need set pearl i guess.....

    cheers

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

    Thanks _franz,

    SO If I take a 'normal' cmd shell and add these paths to my PATH env var then there is no reason to use the Nios II command shell?

    Do you know of any documentation on what paths are defined in the shell that I may have to add to my PATH?

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

    hi!!

    ...i dont know about windows cmd .....but at linux machine is the same bash........ i only run a shell script to set paths .....

    look like this

    #!/bin/bash#  Run this for a Nios II SDK bash shell
    export LM_LICENSE_FILE=1800@localhost
    SOPC_KIT_NIOS2=/opt/altera9.1/nios2eds
    export SOPC_KIT_NIOS2
    SOPC_BUILDER_PATH_91=/opt/altera9.1/nios2eds
    export SOPC_BUILDER_PATH_91
    unset GCC_EXEC_PREFIX
    QUARTUS_ROOTDIR=/opt/altera9.1/quartus
    export QUARTUS_ROOTDIR
    export PERL5LIB=/usr/lib/perl/5.10.0
    bash --rcfile 
    $QUARTUS_ROOTDIR/sopc_builder/bin/nios_bash
    

    hope i can helped...... sorry but im not familiar with this language.......

    cheers

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

    Schönen Dank Franz!! :)

    A very well answered question!! I have managed to get everything I need to work so far! I was a little nervous as I had been told by a FPGA 'expert' that you MUST use the Altera shell but seems not to be the case.

    I now have a python script that completely automates the building of flash files (bin2flash) and downloads to a cyclone IV. One small issue but I will start another thread for it.

    Again, thanks for your help!

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

    I am trying to use Nios2 command shell, getting an error like No cfi table found. How do i override cfit table?