Google Coral Demo: Flashing the Google Coral TPU Dev Board

Published By

The Coral Edge TPU dev board is an impressive system, but it requires some flashing before it can perform useful AI/ML work. For those who are well-versed in command line operations, the several page lengths of instructions on Google's website might be all you need to do a successful install.

Others (this author included) may need a little help. While this article doesn't replace Google's document, it should act as a "helpful hints" supplement. I'll outline some of the mistakes I made while flashing the Coral TPU dev board and offer suggestions on you can avoid or fix them.

Materials Needed to Flash the Coral Dev Board

Unlike boards like the Arduino Nano, which require only a single cable to get things going, you'll need a non-trivial assortment of accessories for the setup. These include:

- USB A to Micro USB cable

- USB C to USB A cable for data transfer

- A USB C power supply capable of providing 2-3A (I was able to successfully use a second USB A to USB C cable plugged into a power supply)

- Linux or Mac computer

Yes, if you're only running Windows, you're out of luck here. However, it might be possible to set up a dual boot configuration on your computer or run off a USB stick. It's also, according to this article, possible to run off of a Raspberry Pi, which could be a very convenient option.

For this experiment, I pulled my trusty T60 Ubuntu rig out of the closet, which hadn't had many updates in the last few years.

Preparing to Flash: Initial Setup

Follow these steps to begin the project:

1. Make sure the dip switches are set correctly (ON, OFF, OFF, OFF). The assembly is small enough to be hard to see, so there's of course no shame in using a magnifying glass.

2. Download SDK-Platform Tools for Linux from this page and extract in the Downloads directory before you start.

3. DON'T plug anything in yet, but you'll need to install several apps via terminal commands.

4. Input sudo apt-get install screen, mkdir -p ~/.local/bin, and sudo mv ~/Downloads/platform-tools/fastboot ~/.local/bin/.

5. Verify that everything works by typing fastboot --version, which should return some information on it.

Mine did not return any information, leading to the first important and painful lesson: Update your Linux installation before starting!

Google's instructions say to use a "Linux or Mac computer." What they don't explicitly spell out is that you need a Linux computer with a modern OS (one would assume Mac computers have the same requirement).

As it turns out, my original version of Ubuntu was 12-something, while the latest LTS version is 18.04. This is quite a gap, and required several upgrade cycles to get it up to date. If you're having issues with your install, definitely start here.

Text Input and Correcting Text Issues

Once you're up to date, follow these steps:

1. Input the following into the terminal:

sudo sh -c "echo 'SUBSYSTEM==\"usb\", ATTR{idVendor}==\"0525\", MODE=\"0664\", \

GROUP=\"plugdev\", TAG+=\"uaccess\"' >> /etc/udev/rules.d/65-edgetpu-board.rules",

2. Next, input sudo udevadm control --reload-rules && udevadm trigger.

When you enter the first command, it won't give you either an error or confirmation that you've entered it correctly, so if you'd like to check that you didn't make a typo, enter: cat /etc/udev/rules.d/65-edgetpu-board.rules. You should get a response of: SUBSYSTEM=="usb", ATTR{idVendor}=="0525", MODE="0664", GROUP="plugdev", TAG+="uaccess".

If the commands aren't exactly correct (remember, Linux is case sensitive), it will cause problems in later on. If you run the first command in this section again, it will simply append that text to the rules file. You can, however, open it with the Vi text editor:

- Enter sudo vi etc/udev/rules.d/65-edgetpu-board.rules.

- Delete the problem lines, and add new ones if needed.

- Exit and save by hitting escape then :wq. You can delete blank lines in Vi by hitting escape then :g/^$/d.

Setting Up the Connections