Chapter 2 Set environment variable and USB Blaster
From Terasic Wiki
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
- Run command "su" in Terminal,switch to root user model.
- Run command “vi /etc/profile” to open the profile.
- 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.
- After reboot the computer, run command “export” in terminal to check environment variable setting.
- The new environment variable is added successfully.
2.2 Set USB Blaster
- In this chapter we will guide the rooted users to use USB blaster or USB Blaster II normally.
- Under /etc/udev/rules.d/, create a file named 51-usbblaster.rules with root authority.
- 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"
- Connect USB Blaster Port of DE5-NET to computer via Mini USB Cable, then power on the board.
- Run command “$QUARTUS_ROOTDIR/bin/jtagconfi” in Terminal, the USB blaster can detect the device status on FPGA board.