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 Issue Compiling Teensy 3.0 (Read 7499 times)
Rei Vilo
Member
***
Offline


Posts: 123
Joined: Jan 10th, 2012
Issue Compiling Teensy 3.0
Sep 14th, 2013 at 2:23pm
Print Post  


Compiling this simple sketch invoking Wire.h fails:

Code
Select All
#include <Wire.h>

void setup()
{
	Wire.begin();
}

void loop()
{

} 



with the following long error message:

Quote:
Compiling 'smartControls_4D_accelerated' for 'Teensy 3.0'
wiring.h : In file included from
WProgram.h : from
Arduino.h : from
Font_library.h : from
Font_library.cpp : from
core_pins.h : : In function 'void delayMicroseconds(uint32_t)':
core_pins.h : 'n' was not declared in this scope
WProgram.h : In file included from
Arduino.h : from
Font_library.h : from
Font_library.cpp : from
HardwareSerial.h : : In member function 'void HardwareSerial::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial2::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial3::begin(uint32_t)':
HardwareSerial.h : 'F_BUS' was not declared in this scope
usb_keyboard.h : In file included from
WProgram.h : from
Arduino.h : from
Font_library.h : from
Font_library.cpp : from
keylayouts.h : : At global scope:
keylayouts.h : 'KEYCODE_TYPE' does not name a type
keylayouts.h : 'KEYCODE_TYPE' does not name a type
WProgram.h : In file included from
Arduino.h : from
Font_library.h : from
Font_library.cpp : from
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
Wire.cpp : #error "F_BUS must be 48 MHz or 24 MHz"
Wire.cpp : In file included from
core_pins.h : : In function 'void delayMicroseconds(uint32_t)':
core_pins.h : 'n' was not declared in this scope
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Wire.cpp : from
HardwareSerial.h : : In member function 'void HardwareSerial::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial2::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial3::begin(uint32_t)':
HardwareSerial.h : 'F_BUS' was not declared in this scope
  
Back to top
 
IP Logged
 
Rei Vilo
Member
***
Offline


Posts: 123
Joined: Jan 10th, 2012
Re: Issue Compiling Teensy 3.0
Reply #1 - Sep 14th, 2013 at 2:24pm
Print Post  
Part 2

Quote:
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
Wire.cpp : In file included from
Wire.h : : In member function 'TWBRemulation& TWBRemulation:Shockedperator=(int)':
Wire.h : 'F_CPU' was not declared in this scope
Error compiling
Compiling 'Teensy_test' for 'Teensy 3.0'
wiring.h : In file included from
WProgram.h : from
Arduino.h : from
Wire.h : from
Teensy_test.ino : from
core_pins.h : : In function 'void delayMicroseconds(uint32_t)':
core_pins.h : 'n' was not declared in this scope
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Teensy_test.ino : from
HardwareSerial.h : : In member function 'void HardwareSerial::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial2::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial3::begin(uint32_t)':
HardwareSerial.h : 'F_BUS' was not declared in this scope
usb_keyboard.h : In file included from
WProgram.h : from
Arduino.h : from
Wire.h : from
Teensy_test.ino : from
keylayouts.h : : At global scope:
keylayouts.h : 'KEYCODE_TYPE' does not name a type
keylayouts.h : 'KEYCODE_TYPE' does not name a type
  
Back to top
 
IP Logged
 
Rei Vilo
Member
***
Offline


Posts: 123
Joined: Jan 10th, 2012
Re: Issue Compiling Teensy 3.0
Reply #2 - Sep 14th, 2013 at 2:24pm
Print Post  
And part 3:

Quote:
usb_keyboard.h : In file included from
WProgram.h : from
Arduino.h : from
Wire.h : from
Wire.cpp : from
keylayouts.h : : At global scope:
keylayouts.h : 'KEYCODE_TYPE' does not name a type
keylayouts.h : 'KEYCODE_TYPE' does not name a type
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Wire.cpp : from
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Teensy_test.ino : from
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
Teensy_test.ino : In file included from
Wire.h : : In member function 'TWBRemulation& TWBRemulation:Shockedperator=(int)':
Wire.h : 'F_CPU' was not declared in this scope
Wire.cpp : #error "F_BUS must be 48 MHz or 24 MHz"
Wire.cpp : In file included from
core_pins.h : : In function 'void delayMicroseconds(uint32_t)':
core_pins.h : 'n' was not declared in this scope
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Wire.cpp : from
HardwareSerial.h : : In member function 'void HardwareSerial::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial2::begin(uint32_t)':
HardwareSerial.h : 'F_CPU' was not declared in this scope
HardwareSerial.h : : In member function 'void HardwareSerial3::begin(uint32_t)':
HardwareSerial.h : 'F_BUS' was not declared in this scope
usb_keyboard.h : In file included from
WProgram.h : from
Arduino.h : from
Wire.h : from
Wire.cpp : from
keylayouts.h : : At global scope:
keylayouts.h : 'KEYCODE_TYPE' does not name a type
keylayouts.h : 'KEYCODE_TYPE' does not name a type
WProgram.h : In file included from
Arduino.h : from
Wire.h : from
Wire.cpp : from
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, unsigned int)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
IntervalTimer.h : : In member function 'bool IntervalTimer::begin(IntervalTimer::ISR, float)':
IntervalTimer.h : 'F_BUS' was not declared in this scope
Wire.cpp : In file included from
Wire.h : : In member function 'TWBRemulation& TWBRemulation:Shockedperator=(int)':
Wire.h : 'F_CPU' was not declared in this scope
Error compiling
  
Back to top
 
IP Logged
 
Rei Vilo
Member
***
Offline


Posts: 123
Joined: Jan 10th, 2012
Re: Issue Compiling Teensy 3.0
Reply #3 - Sep 14th, 2013 at 2:27pm
Print Post  
The same sketch compiles successfully with Teensyduino.

I tried Project > Clean before, to no avail. 

I'm using:
  • Teensyduino 1.15
  • Visual Micro 1.1309.11 on Visual Studio 2012 Professional


Thank you for your help!
« Last Edit: Sep 14th, 2013 at 2:31pm by Rei Vilo »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Issue Compiling Teensy 3.0
Reply #4 - Sep 14th, 2013 at 2:45pm
Print Post  
Hi,

Please see the teensy page in the wiki

The article explains how to specify your Teensy mcu choices.

As you know Teensy supports choice of cpu speed, usb type and keyboard language type (gb/us/de/ru). Different users work with different configurations. 

The three Teensy defines can be specified against the Visual Micro project either on a global basis for the entire project or for the currently selected configuration. 

Specifying per configuration is for more advanced users that require a quick way to switch between Teensy mcu configurations. For example a library or core developer testing USB SERIAL US KEYBOARD 96MHZ
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint