Altera USB Blaster Driver Installation Instructions. To install the driver for your USB Blaster cable, follow the instruction for your particular operating. When The software for this device has been successfully installed appears, click Close. From Terasic Wiki. Jump to: navigation, search. To install the driver for your USB Blaster cable, follow the instruction for your particular operating system. If you are running Windows in 64-bit mode, you MUST boot your computer as following both when installing the USB-Blaster driver AND when using Quartus to program your PLD.
![]() 1. Initial Setup
My host computer is an iMac running macOS, and I used this to get my DE10-Nanoup and running. Because the DE10-Nano and the Altera software stack aren'treally meant to work with macOS, I make heavy use of Virtualbox (for macOS) anda CentOS 7 virtual machine to do some of the Linux-specific stuff. I'll notewhich parts of the following instructions require Linux specifically.
1.1. Downloading the OS image![]()
The DE10-nano kit comes with a micro-SD card that is supposed to comepre-flashed with Angstrom Linux and the appropriate Altera drivers, but minecame empty. So, I went to the Terasic DE10-Nano Kit download page at Intel and downloaded
which contains only one file (
de10-nano-image-Angstrom-v2016.12.socfpga-sdimg )which is the image.
I plugged the blank micro-SD card into my iMac and usedEtcher to burn it. Etcher only lets you write imagefiles that end with
.img and not .sdimg , so I had to add the .img extension on to the uncompressed de10-nano-image-Angstrom-v2016.12.socfpga-sdimg file.
Confusingly, Intel also maintains a version of Ubuntu 12.04 specifically for the DE10-Nano.Sadly, Ubuntu 12.04 is beyond EOL, so while Intel is patching their examplecode for this image, the rest of the user environment is very old and nolonger updated.
The SD card that shipped with my DE10-nano tends to lose its contents if leftunpowered for a few months. This is likely why mine came empty. I recommendreplacing it with an SD card from a more reputable manufacturer if you don'twant to lose data on it over time.
1.2. Resize the file system
The SD card shipped by Terasic is 8 GB but the Angstrom Linux image is only~2.5 GB, so there's a lot of free space on the card that Linux doesn't use bydefault. I opted to expand the partition and file system after flashing theimage so I could make use of the full 8 GB.
Expanding the file system cannot be done live, so you need a second Linux systemon which you can perform the following expansion process for the newly flashedSD card. I used a Virtualbox VM with my USB SD card reader passed through.
My SD card showed up as
/dev/sdb when I plugged it in. It contains avfat -based boot file system (called de10-nano ) and an ext3 -based rootfile system (with no name). Unmount them:
Then we mess around with the partition table using
parted . Note that you'llbe deleting partitions in the partition table, then defining new largerpartitions atop the data that remained unchanged. This sounds a little scary,but it works:
Partition 2 (ext3) is the root partition that we want to expand. So, we firstdelete that partition definition:
Then recreate it with the same starting offset (
210994 ) but using 100% of theremaining space:
Now we've resized the physical partition. Run
e2fsck on the file system thatwas affected by this partition change:
Then expand the ext3 file system to use the remaining space on the newlyenlarged partition:
2. Connecting
Once your micro-SD card is flashed and the DE10-nano is successfully booted, oneof the user LEDs should pulse like a heartbeat once Linux is booted.
Once Linux is booted, the DE10-nano is very easy to get into; the only accountis
root , and it has no password. You can get in via
2.1. Serial connection
The default
root account has no password, so just hit return.
2.2. Ethernet over USB
The DE10-SOC comes configured to use RNDIS to tunnel Ethernet over USB; thisprotocol is only supported on Windows and Linux though, so Ethernet over USBwill not work on modern macOS versions. Plugging the USB-OTG into my Mac doesliterally nothing other than enumerate the board as Linux 'MultifunctionComposite Gadget.' The USB mass storage device won't even show up on Mac, soyou can't read the Ethernet over USB documentation that should come up per theIntel documentation.
I opted to just pass through the device from macOS into a CentOS 7 VM, where thedevice seems to work exactly as intended. Once the appropriate device waspassed through, unplugging and replugging the USB cable causes the Linux VM toshow:
We see that
enp0s12u1 is the new Ethernet-over-USB device. This has to beconfigured to use the same subnet as the DE10; the appropriate settings are
Use either the GUI or
ifconfig to set these. Then you should be able toping 192.168.7.1 to talk to the DE10.
2.3. SSH
Get the IP of the system from either your home router or (if you've logged invia serial)
ifconfig . Then SSH to this IP address:
The default ECSDA encryption is a bit slow, so ssh may hang for longer thanusual before prompting to accept the host key:
2.4. VNC
The default VNC client that ships with macOS doesn't seem to work with theDE10-nano's VNC server, so I followed Terasic's instructions and downloaded thefree RealVNC client. Connecting to the IP address (192.168.1.182 in my case)just worked and dropped me in an XFCE desktop, logged in as root.
3. Basic Configuration3.1. Adding a non-root user
First thing to do after logging in is set a root password:
Then add an unprivileged user and set its password:
Make sure the user account works:
Not sure why the
mesg: Operation not permitted error comes up, but it'sharmless.
3.2. Installing Software
Then
![]()
and ensure that
wheel group members are allowed to sudo by uncommenting thefollowing line:
Other useful software packages to install include
It's also helpful to
opkg list > opkg_list.txt so that you can just grep alocal copy of the software repository when searching for packages.
3.3. Basic Security
Edit
/etc/ssh/sshd_config and change PermitRootLogin to no .
Disable the VNC service (if you aren't using it):
You can also go ahead and disable
de10-nano-xfce-init.service as well if youdon't plan on using the desktop UI at all.
3.4. Enabling non-root i2c, spi, and GPIO access
First create new groups called
i2c , spi , and gpio (the GIDs don't matter). Then create a file called /etc/udev/rules.d/99-com.rules which contains:
Incidentally, this file is taken (in part) from Raspbian and is exactly how Raspberry Pi allows non-root users to manipulate the I2C, SPI, and GPIO devices on that SoC. There are some caveats surrounding the GPIO case since there is latency associated with all the
chown s that must happen when GPIO pins are initialized by an application. See GPIO/I2C/SPI-access without root-permissions for the specific caveats on how to work around this.
4. Advanced Configuration4.1. Getting wifi working
I have an rt8192-based USB wifi dongle that I wanted to plug into the DE10-nano.After buying a USB OTG adapter to add some standard USB type B ports intowhich I could plug my Edimax wifi dongle. On the first plug-in, everythingseemed to work well and I configured the adapter per Adafruit's BeagleBone wifi guide and it worked, but after rebooting, the wifiadapter no longer worked and I started getting these suspicious USB bus errors:
After a few minutes, I got some nasty deadlock warnings from the kernel:
After scouring the output of
dmesg and journalctl -b , I noticed that onboot, the USB OTG adapter and the wifi actually did configure and come upmomentarily, but they went offline at around the time that these messagesappeared:
It turns out that the DE10-Nano has a service that enables Ethernet-over-USB onbootup and effectively hijacks the USB OTG port on boot. Disabling thisservice:
appears to be absolutely required to use the DE10-Nano as a USB host, or elsethe USB OTG port gets configured as a host, then switches to a device, thenleaves different parts of Linux confused about its ultimate state.
I later found that the USB would still drop with this error, suggesting thatthe device was reverting from host mode:
Disabling the
de10-nano-synergy-init service seems to work around this:
The configuration for this service tries to bind the synergy client to the USBOTG Ethernet gadget, so this may have been causing the regression.
![]() Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |