I just come across Visual Micro and it looks amazing. I mainly use teensy' as I like the form factor and price point
I'm not an AVR/Micro programmer by trade, I'm a games programmer, so being able to use Visual Studio is a huge boon.
So I downloaded the above 1308.18 and it took a bit of messing with to compile. Following the defines here (
http://visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx) threw me a little. As the underscores for F_CPU and LAYOUT_US_ENGLISH are not there and I didn't notice. I guessed that serial should be USB_SERIAL or USBSERIAL but I can't find any #ifdef etc macros that use in any source files in the hardware\teensy directories.
Starting simple I am trying to get the Blink example to compile:
/* LED Blink, Teensyduino Tutorial #1
http://www.pjrc.com/teensy/tutorial.html
This example code is in the public domain.
*/
const int ledPin = 6; // Teensy has LED on 11, Teensy++ on 6
const int ledPin2 = 6; // Teensy has LED on 11, Teensy++ on 6
// the setup() method runs once, when the sketch starts
void setup() {
// initialize the digital pin as an output.
pinMode(ledPin, OUTPUT);
}
// the loop() methor runs over and over again,
// as long as the board has power
void loop() {
digitalWrite(ledPin, HIGH); // set the LED on
digitalWrite(ledPin2, HIGH); // set the LED on
delay(1000); // wait for a second
digitalWrite(ledPin, LOW); // set the LED off
digitalWrite(ledPin2, LOW); // set the LED on
delay(1000); // wait for a second
}
But I appear to be getting the following linker error:
Compiling 'Blink' for 'Teensy++ 2.0'
core.a(pins_teensy.c.o)* : : In function `_init_Teensyduino_internal_':
pins_teensy.c : undefined reference to `usb_init'
Error creating .elf
I'm not sure as to what happens in the magical black box behind the scenes. I'm using arduino ide 1.0.5 with teensyduino installed on top. It builds just fine using the arduino ide.
The other thing I noticed, it seemed to select the arduino configuration I had, even though the Teensy configuration was selected.
Edit:
Horrid temp fix, commenting out usb_init(), and my search for any use of USB_SERIAL was accidently limited to a sub folder of the hardware directory when I didn't realise. So that's why I couldn't find any.
Edit2: Ok, for some reason now all is compiling with usb_init uncommented. Hmmph