Add Vagrantfile with environment for flashing

Only tested with BSL flashing, need USB rules for specific JTAG programmer.

This directory is mapped into the home directory of the virtual machine so just
go to ~/novatools and run make as normally.
master
Adam Engstrom 2017-01-05 22:45:13 +01:00
parent cd25b0f0ad
commit 4d55b9825a
2 changed files with 31 additions and 0 deletions

1
99-hidraw.rules 100644
View File

@ -0,0 +1 @@
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0666", OWNER="vagrant"

30
Vagrantfile vendored 100644
View File

@ -0,0 +1,30 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.synced_folder "./", "/home/vagrant/novatools"
# Enable USB and attach Novatouch in bootloader mode to the VM
config.vm.provider "virtualbox" do |vb|
vb.customize ['modifyvm', :id, '--usb', 'on']
vb.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'USB HID device', '--vendorid', '0x2047', '--productid', '0x0200']
end
config.vm.provision "shell", inline: <<-SHELL
sudo apt-get update
sudo apt-get install -y make gcc-msp430 libhidapi-hidraw0 mspdebug python-pip bzr linux-image-extra-$(uname -r)
# udev rule to be able to access /dev/hidraw0 as vagrant user
cp novatools/99-hidraw.rules /etc/udev/rules.d
udevadm control --reload-rules ; udevadm trigger
# python-msp430-tools upstream package is broken.. install directly from bzr repo
# https://bugs.launchpad.net/python-msp430-tools/+bug/936695
pip install -e bzr+lp:python-msp430-tools#egg=python-msp430-tools
# cleanup
apt-get -y autoremove
SHELL
end