My Stellaris Launchpad finally arrived. I’ve been following this tutorial for programming it on Linux successfully.

However, I was annoyed at having to run the flashing utility as root. So I created a udev rule that gives the board’s device file the proper permissions. First, create a group called stellaris and add yourself to that group:
sudo addgroup stellaris
sudo adduser $USER stellaris

Then create the udev rule. Create the file /etc/udev/rules.d/45-stellaris.rules with the following contents:
ATTRS{idVendor}=="1cbe", ATTRS{idProduct}=="00fd", MODE="0664", GROUP="stellaris"
What does this mean? This line consists of key-value pairs separated by commas.

  1. The first two are match keys: when something is plugged in, udev checks if its vendor and product IDs match the ones here.
  2. The last two are assignment keys: if there’s a match, the device file is created with the specified permissions and group. These permissions mean that the owner (root) and members of the the group stellaris can read from and write to the file, while others can only read.

You might have to restart your terminal in order for it to recognize you’re now in the stellaris group. You can also run
exec su -l $USER

Anuncios

Etiquetas: , , , , , , , , ,

Responder

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión / Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión / Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión / Cambiar )

Google+ photo

Estás comentando usando tu cuenta de Google+. Cerrar sesión / Cambiar )

Conectando a %s


A %d blogueros les gusta esto: