Ubuntu
Ubuntu is used on the servers, laptops, base station Gumstix and amazon cloud - which means we have a common maintenance, filesystem layout etc! incredible! Specific notes on 12.04 12.10
Contents
fresh setup for Ubuntu 14
compiler and packages:
apt-get install build-essential libncurses5-dev automake git libusb-dev:i386 zlib1g:i386
access to the usb ports:
sudo usermod -a -G dialout yourusername
(you then need to logout/login!)
Copy our compiler:
wget -O /tmp/mspgccx.tgz http://media.glacsweb.info/software/mspgccx.tgz cd /opt ; sudo tar xfz /tmp/mspgccx.tgz ; rm /tmp/mspgccx.tgz
and add /opt/mspgccx/bin to your PATH in .bashrc
echo "PATH=\$PATH:/opt/mspgccx/bin" >> ~/.bashrc
MSPGCC
is a bit of a pain to install from scratch.. follow the mspgcc4 instructions or download our copy of 4.7.0 as shown above
eclipse
Install sun java - this varies depending on version I think as it is in the partner repo
apt-get install eclipse-platform eclipse-pde
Start eclipse Help -> Install Software
Goto [1] and find the relavent link for your version of eclipse. Add it as a new software source. Then install everything from that source.
Create a new C project and manually choose the folder which already contains the source for the location, and click finish.
Click Project->Properties
To the following for both debug and build
Then C/C++ Build ->Settings
Set GCC C compiler to
/opt/msp430-gcc-4.4.5/bin/msp430-gcc
and in Misc add
--mmcu=<MSP VERSION>
Consistent serial ports
Reproduced from [2] Add a file to /etc/udev/rules.d/foo.rules
and put the following in adapted for your devices (details can be found in dmesg easily enough) or by using usb-devices
BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="FTEHCFNM", NAME="probe-1-serial" BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="FTEHCFNC", NAME="probe-2-serial" BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="FTEHCFN2", NAME="gprs-serial" BUS=="usb", SYSFS{idProduct}=="6001", SYSFS{idVendor}=="0403", SYSFS{serial}=="FTEHCFMR", NAME="gps-serial"
above serial numbers are for the base 4 way ftdi
FTEL8SCD FTEL8SCL FTEL8SCQ FTEL8SCW
These are the ref serial device
The spare one seems to have corrupted firmware and so doesn't have serial nos
restart udev and plug the devices in and they will appear on /dev/probe-1-serial for instance.
Prolific usb-serial devices do NOT appear to have a serial number
Commandline WiFi
In order to be secure our networks use WPA2 to set up a device to access them using the commandline do the following (as root/sudo)
apt-get install wpa_supplicant resolvconf wpa_passphrase <essid> <passpharse>
edit /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant #ap_scan=2 network= { ssid="<essid>" scan_ssid=1 proto=WPA RSN key_mgmt=WPA-PSK pairwise=CCMP TKIP group=CCMP TKIP psk=<output of wpa_passphrase> }
edit /etc/netowrk/interfaces
auto iface <iface-name> iface <iface-name> inet static address <ip address> netmask <mask> gateway <gateway> dns-nameservers <name servers> <...> pre-up /bin/iwconfig <iface-name> essid <essid> pre-up wpa_supplicant -B -Dwext -i<iface-name> -c/etc/wpa_supplicant/wpa_supplicant.conf
Having done this ifup <iface-name> should work ;)
If using DHCP replace static with DHCP and ignore the lines where addresses are specified
Time zones
dpkg-reconfigure tzdata
make sure it's set to UTC to save much confusions