Teency Raw USB?

I have tried to get the Arduino IDE to work with the raw USB protocol stuff. Whenever I try to build the example raw USB program it freaks out about duplicate symbols involving the USB interrupt handler.

How can I make this work on the Arduino IDE?

Sounds like the Teensy core is also using the native USB functionality…

I’d suggest heading over to the Teensy forum - that’s where most of the Teensy experts are as I understand.

Ask here

Pete

DrAzzy:
Sounds like the Teensy core is also using the native USB functionality...

I'd suggest heading over to the Teensy forum - that's where most of the Teensy experts are as I understand.

el_supremo:
Ask here

Pete

I asked over there, I got no response. Plus the issues seem to be more related to the Arduino IDE than Teensy.

I think this will work. Try renaming your sketch from .ino to .cpp and add this function:

int main()
{
  setup();
  while (1)
    loop();
}

WARNING: You will not be able to use any of the Arduino functions because they will not be initialized or declared. You will not be able to use any Arduino libraries that rely on Arduino functions.

Good luck.

johnwasser:
I think this will work. Try renaming your sketch from .ino to .cpp and add this function:

int main()

{
  setup();
  while (1)
    loop();
}




WARNING: You will not be able to use any of the Arduino functions because they will not be initialized or declared. You will not be able to use any Arduino libraries that rely on Arduino functions.

Good luck.

This project would be done by now but I am using an Arduino library that won't work outside of the Android IDE...

gudenau:
This project would be done by now but I am using an Arduino library that won't work outside of the Android IDE...

So, exactly what do the link errors say? Do they tell you which file of the Teensy core is already using the USB interrupt? Can you figure out a way to NOT use that feature of the Teensy core?

johnwasser:
So, exactly what do the link errors say? Do they tell you which file of the Teensy core is already using the USB interrupt? Can you figure out a way to NOT use that feature of the Teensy core?

It was the USB interrupt handler function.

gudenau:
It was the USB interrupt handler function.

Yes. I knew that already. You said that in your original post. That doesn't answer any of my questions. Do you not want any more help?

I think it was ISR(USB_GEN_vect) and related interrupts.

gudenau:
I think it was ISR(USB_GEN_vect) and related interrupts.

That makes sense. Still doesn't answer any of my questions.

johnwasser:
That makes sense. Still doesn't answer any of my questions.

I don't have the code handy, but all you really need to do to reproduce it is to load up the Arduino IDE, put in an interrupt handler and build for the Teensy. It is a linker error complaining about duplicate symbols.

I might just end up hacking the lib I require to not use the Arduino stuff, the IDE is not that great...

gudenau:
I don't have the code handy, but all you really need to do to reproduce it is to load up the Arduino IDE, put in an interrupt handler and build for the Teensy. It is a linker error complaining about duplicate symbols.

Unfortunately, the Teensy is NOT an Arduino and the Teensy developers have not bothered to make their Teensy core available through Boards Manager. So the first step would be to locate the Teensy core and install it. Since I don't have a Teensy, my only reason to install that core would be to try to reproduce your problem so I could look at the error messages you have not shared, in the hopes of figuring out how to help you.
Maybe if I get REALLY bored.