On both a Linux and OSX machine I was unable to program three different Teensy2.0 boards. All of the setups I attempted had no issue programming a Teensy++2.0. Only issues with the Teensy2.0. Eventually I succeeded in programming them using TYTools Tycommander.
Here are the different setups I tried with some details:
* ArchLinux Arduino 1.8.2 + Teensyduino 136
* OSX Arduino 1.8.2 + Teensyduino 136
* OSX Arduino 1.8.4 + Teensyduino 138beta
With the blinky sketch already loaded I attempted to program the device without physically pressing the program button, and with pressing the button. Neither help.
Using Tytools Tycommand worked. Not always, but often it worked. I ran it with the TYTOOLS_EXPERIMENTAL_BOARDS=1 option set and then just selected the Hex file that is passed from Arduino to the Teensy Loader. You can find this by pressing the file button in the Teensy Loader, which will show you the path of the currently selected compiled file. I would have to manually press the reset button after instructing the software to upload. When you plug the Teensy2.0 up it will show up in Tycommander in the "running" stay and will show the serial port /dev/ttyACM0 in the interfaces list. When you press program in the console where you executed Tycommander you should see it say it is attempting to trigger reboot, and then fail suggesting you press the button. When you press the reboot button on the Teensy the device list will change the state listed from "running" to "missing" and then to "bootloader" before showing the file loading progress. Sometimes I loading would stop at 5% and then fail with the error "I/O error while writing to '/dev/hidraw0': No such device". When this happened I would restart Tycommand and try again. Eventually it works.
Some information from Linux:
Here are the different setups I tried with some details:
* ArchLinux Arduino 1.8.2 + Teensyduino 136
* OSX Arduino 1.8.2 + Teensyduino 136
* OSX Arduino 1.8.4 + Teensyduino 138beta
With the blinky sketch already loaded I attempted to program the device without physically pressing the program button, and with pressing the button. Neither help.
Using Tytools Tycommand worked. Not always, but often it worked. I ran it with the TYTOOLS_EXPERIMENTAL_BOARDS=1 option set and then just selected the Hex file that is passed from Arduino to the Teensy Loader. You can find this by pressing the file button in the Teensy Loader, which will show you the path of the currently selected compiled file. I would have to manually press the reset button after instructing the software to upload. When you plug the Teensy2.0 up it will show up in Tycommander in the "running" stay and will show the serial port /dev/ttyACM0 in the interfaces list. When you press program in the console where you executed Tycommander you should see it say it is attempting to trigger reboot, and then fail suggesting you press the button. When you press the reboot button on the Teensy the device list will change the state listed from "running" to "missing" and then to "bootloader" before showing the file loading progress. Sometimes I loading would stop at 5% and then fail with the error "I/O error while writing to '/dev/hidraw0': No such device". When this happened I would restart Tycommand and try again. Eventually it works.
Some information from Linux:
Code:
Archlinux Teensy++2.0
[20792.125865] usb 3-1: new full-speed USB device number 121 using xhci_hcd
[20792.258271] cdc_acm 3-1:1.0: ttyACM0: USB ACM device
Bus 003 Device 121: ID 16c0:0483 Van Ooijen Technische Informatica Teensyduino Serial
Teensy2.0 already with blinky sketch loaded
[21005.421051] usb 3-1: new full-speed USB device number 127 using xhci_hcd
[21005.554511] hid-generic 0003:16C0:0486.003F: hiddev0,hidraw0: USB HID v1.11 Device [Teensyduino RawHID Device] on usb-0000:00:14.0-1/input0
[21005.555444] hid-generic 0003:16C0:0486.0040: hidraw1: USB HID v1.11 Device [Teensyduino RawHID Device] on usb-0000:00:14.0-1/input1
Bus 003 Device 127: ID 16c0:0486 Van Ooijen Technische Informatica Teensyduino RawHID
(results are same with or without teensy udev rules)
wget http://www.pjrc.com/teensy/49-teensy.rules
sudo cp 49-teensy.rules /etc/udev/rules.d/49-teensy.rules
sudo rm /etc/udev/rules.d/49-teensy.rules
sudo udevadm control --reload-rules && sudo udevadm trigger