Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to compile for Teensy - setting the cpu speed, keyboard etc.? (Read 3866 times)
mummyboy
Newbies
*
Offline


Posts: 2
Joined: Nov 18th, 2014
How to compile for Teensy - setting the cpu speed, keyboard etc.?
Nov 18th, 2014 at 3:09pm
Print Post  
All,

I installed the Msft Visual Studio Community 2013 IDE and Visual Micro add-in but have been unsuccessful at compiling fairly simple sketch.  The board is a Teensy 3.1 and the IDE shows that clearly selected. Even so, I am unable to compile. The exact same code compiles without error in the Arduino 1.06 env. Below are the errors I get. I guess there's an issue with the install, but where? Can anyone suggest a solution to this madness Smiley

Regards

mummyboy

//////////// compile errors follow /////////

Compiling 'rainbow' for 'Teensy 3.1'
wiring.h:In file included from
WProgram.h:from
Arduino.h:from
OctoWS2811.h:from
rainbow.ino:from
core_pins.h:In function 'void delayMicroseconds(uint32_t)'
core_pins.h:802:6: error: 'n' was not declared in this scope
core_pins.h:810:11: error: 'n' was not declared in this scope
WProgram.h:In file included from
Arduino.h:from
OctoWS2811.h:from
rainbow.ino:from
HardwareSerial.h:In member function 'virtual void HardwareSerial::begin(uint32_t)'
HardwareSerial.h:151:51: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial::begin(uint32_t, uint32_t)'
HardwareSerial.h:153:21: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial2::begin(uint32_t)'
HardwareSerial.h:181:52: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial2::begin(uint32_t, uint32_t)'
HardwareSerial.h:183:22: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial3::begin(uint32_t)'
HardwareSerial.h:211:52: error: 'F_BUS' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial3::begin(uint32_t, uint32_t)'
HardwareSerial.h:213:22: error: 'F_BUS' was not declared in this scope
usb_keyboard.h:In file included from
WProgram.h:from
Arduino.h:from
OctoWS2811.h:from
rainbow.ino:from
keylayouts.h:At global scope
keylayouts.h:5411:14: error: 'KEYCODE_TYPE' does not name a type
keylayouts.h:5412:14: error: 'KEYCODE_TYPE' does not name a type
WProgram.h:In file included from
Arduino.h:from
OctoWS2811.h:from
rainbow.ino:from
IntervalTimer.h:36:54: error: 'F_BUS' was not declared in this scope
IntervalTimer.h:In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)'
IntervalTimer.h:57:23: error: 'F_BUS' was not declared in this scope
IntervalTimer.h:In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)'
IntervalTimer.h:72:30: error: 'F_BUS' was not declared in this scope
wiring.h:In file included from
WProgram.h:from
Arduino.h:from
OctoWS2811.h:from
OctoWS2811.cpp:from
core_pins.h:In function 'void delayMicroseconds(uint32_t)'
core_pins.h:802:6: error: 'n' was not declared in this scope
core_pins.h:810:11: error: 'n' was not declared in this scope
WProgram.h:In file included from
Arduino.h:from
OctoWS2811.h:from
OctoWS2811.cpp:from
HardwareSerial.h:In member function 'virtual void HardwareSerial::begin(uint32_t)'
HardwareSerial.h:151:51: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial::begin(uint32_t, uint32_t)'
HardwareSerial.h:153:21: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial2::begin(uint32_t)'
HardwareSerial.h:181:52: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial2::begin(uint32_t, uint32_t)'
HardwareSerial.h:183:22: error: 'F_CPU' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial3::begin(uint32_t)'
HardwareSerial.h:211:52: error: 'F_BUS' was not declared in this scope
HardwareSerial.h:In member function 'virtual void HardwareSerial3::begin(uint32_t, uint32_t)'
HardwareSerial.h:213:22: error: 'F_BUS' was not declared in this scope
usb_keyboard.h:In file included from
WProgram.h:from
Arduino.h:from
OctoWS2811.h:from
OctoWS2811.cpp:from
keylayouts.h:At global scope
keylayouts.h:5411:14: error: 'KEYCODE_TYPE' does not name a type
keylayouts.h:5412:14: error: 'KEYCODE_TYPE' does not name a type
WProgram.h:In file included from
Arduino.h:from
OctoWS2811.h:from
OctoWS2811.cpp:from
IntervalTimer.h:36:54: error: 'F_BUS' was not declared in this scope
IntervalTimer.h:In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)'
IntervalTimer.h:57:23: error: 'F_BUS' was not declared in this scope
IntervalTimer.h:In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)'
IntervalTimer.h:72:30: error: 'F_BUS' was not declared in this scope
Error compiling

« Last Edit: Nov 18th, 2014 at 3:57pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Install issue with Visual Studio2013 Community
Reply #1 - Nov 18th, 2014 at 3:56pm
Print Post  
Hi,

The errors are correct because, unlike Arduino, Teensy requires you to decide which cpu speed (F_CPU) and what features you want your board to support.

These features are menu items in the teensy ide but each relates to a define that you can provide in your visual micro project.

Please see the teensy page here

http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

Tip

because some configurations for Teensy do not support Serial...

You also need to switch from Debug to Release or use the define that enables SERIAL or switch off debug globally via "tools>visual micro>automatic debugging" or set the debugger to use SoftwareSerial (see the docs)

« Last Edit: Nov 19th, 2014 at 11:18pm by Tim@Visual Micro »  
Back to top
IP Logged
 
mummyboy
Newbies
*
Offline


Posts: 2
Joined: Nov 18th, 2014
Re: How to compile for Teensy - setting the cpu speed, keyboard etc.?
Reply #2 - Nov 19th, 2014 at 11:11pm
Print Post  
Thanks for the pointer. All is good. For now Smiley  mb
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint