Chapter 2 Set environment variable and USB Blaster

From Terasic Wiki

Jump to: navigation, search

In this chapter we will guide users to set environment variable for using Shell Script. Also we will guide users to set the USB Blaster, general users can use USB Blaster without root authority.

2.1 Set Quartus tool environment variable

  1. Run command "su" in Terminal,switch to root user model.
    图21.jpg

  2. Run command “vi /etc/profile” to open the profile.
    图22.jpg

  3. Add below command at the end of profile, save it and reboot the computer.
    export QUARTUS_ROOTDIR="/home/user/altera/16.0/qprogrammer"
    "/home/user/altera/16.0/qprogrammer" is the installation path of Quartus Programmer. User can modify it according to actual installation location.
    Note: Remember to reboot computer after modify and save the file.
    图23.jpg

  4. After reboot the computer, run command “export” in terminal to check environment variable setting.
    图24.jpg

  5. The new environment variable is added successfully.
    图25.jpg

2.2 Set USB Blaster

In this chapter we will guide the rooted users to use USB blaster or USB Blaster II normally.
  1. Under /etc/udev/rules.d/, create a file named 51-usbblaster.rules with root authority.
    图26.jpg

  2. Add below command to file 51-usbblaster.rules and save it.
    # USB-Blaster
    ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="09fb", ENV{ID_MODEL_ID}=="6001", MODE="0666"
    ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="09fb", ENV{ID_MODEL_ID}=="6002", MODE="0666"
    ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="09fb", ENV{ID_MODEL_ID}=="6003", MODE="0666"
    # USB-Blaster II
    ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="09fb", ENV{ID_MODEL_ID}=="6010", MODE="0666"
    ENV{ID_BUS}=="usb" ENV{ID_VENDOR_ID}=="09fb", ENV{ID_MODEL_ID}=="6810", MODE="0666"

    图27.jpg

  3. Connect USB Blaster Port of DE5-NET to computer via Mini USB Cable, then power on the board.
    图28.jpg

  4. Run command “$QUARTUS_ROOTDIR/bin/jtagconfig” in Terminal, the USB blaster can detect the device status on FPGA board.
    图29.jpg
Personal tools