Teensy 3.0 IDE: Two Suggestions

Avenue33

Well-known member
I like the idea of a self-contained autonomous IDE for Teensy.
I've created an icon: feel free to use it. Teensy3-2.png

I strongly recommend to define a specific Teensy variable to pass on to the gcc and g++ with the -D parameter

Code:
-DARDUINO=101 -DTEENSY=3

as both Arduino and Teensy share the same
Code:
-mmcu=atmega32u4

All other Processing-based Wiring-derived Arduino-like IDEs have their own variables:
Teensy3-1.png
 
I'm using the Visual Micro plugin for Visual Studio to write code for Teensy. http://www.visualmicro.com/ It is a work in progress, but is already very useful with Intellisense, color coding, some debug capability, more helpful error messages, quick navigation to errors, definitions, and declarations, etc... The developer is very responsive and wants his product to support Teensy boards.
 
Yes, Visual Micro is a great plug-in for Visual Studio. I'm in touch with its developer and we exchange ideas!

Visual Studio main advantage over Xcode is available documentation. I really don't understand Apple's obsession for secrecy and lack of documentation. Xcode deserves to be more widely used, even for non-Apple targets.
 
If someone wants to see what the VisualMicro-plug-in can do for Arduino/Teensy programming (yes, sofar I know it runs on windows:mad:). But it gives you possibilities beyond the standard arduino IDE and that makes programming for newbies :cool: like me so much more fun!

If you overcome the computertalk, the following youtube video give a nice impression:

1) http://www.youtube.com/watch?v=lUaQt6rMk1k
2) http://www.youtube.com/watch?v=fFM8_RhIG0U

With help of Tim Leek of VisualMicro I managed to get the Teensy3 compiling and debugging.
On their forum you can find further help, see http://www.visualmicro.com/forums/YaBB.pl?num=1370300581/0#2

Below are some screen dumps showing the results of the IDE while debugging the Blink.ino project.

I hope that this is new stimuli for others, searching for debugging facilities,
Groeten uit Rotterdam,

Casper

VisualMicro4.jpgVisualMicro5.jpgVisualMicro6.jpg
 
Thanks a lot for your description and for sharing - it works well for me.


On compile errors: Did you get AtmelStudio to mark the line that causes the compile error? Currently I do not get a line indication at all in the output-window so I will have to search by hand. Example:

Example:

Code:
C:\Users\myusername\Documents\arduino\arduino-1.0.5\hardware\tools\arm-none-eabi\bin\arm-none-eabi-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mcpu=cortex-m4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -felide-constructors -std=gnu++0x -I"C:\Users\myusername\Documents\arduino\arduino-1.0.5\hardware\teensy\cores\teensy3" -I"C:\Users\myusername\Documents\arduino\arduino-1.0.5\libraries\SoftwareSerial" -o "C:\Users\myusername\AppData\Local\VMicro\Arduino\Builds\telemetry_convert\teensy3\telemetry_convert.cpp.o"  "C:\Users\myusername\AppData\Local\VMicro\Arduino\Builds\telemetry_convert\teensy3\telemetry_convert.cpp"  -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -mthumb -nostdlib -D__MK20DX128__  -fno-rtti
telemetry_convert.ino : 'error_here' does not name a type
telemetry_convert.ino : 'error_here' does not name a type
telemetry_convert.ino : : In function 'void sendValue(uint8_t, uint16_t, uint32_t)':
telemetry_convert.ino : 'sendByte' was not declared in this scope
 
Are those missing line numbers the output from Visual Micro, or from the Arduino IDE with Teensyduino installed?

I can't do anything about Visual Micro, but if that's a bug with Arduino+Teensyduino, I'll find and fix it.... if I can reproduce it here, of course.
 
Thank you Paul, Arduin+Teensyduino works just fine.

Also if I enter the exact same compile command I get from AtmelStudio/VisualMicro into the shell I can see line numbers in the compile-error. So they seem to get cut out by VisualMicro or AtmelStudio. I will pester the VisualMicro-Guys about it ;)
 
Having only VisualStudio Express, I cannot use plugins.
UsingAtmel's Studio add on to Visual Studio is a work-around but is Atmel only, is it not? One could not target the T3's CPU? Or legally so?
 
Just in case somebody else stumbles upon this problem and my posting turns up in search:

Thanks a lot for your description and for sharing - it works well for me.


On compile errors: Did you get AtmelStudio to mark the line that causes the compile error? Currently I do not get a line indication at all in the output-window so I will have to search by hand. Example:

Example:

Code:
C:\Users\myusername\Documents\arduino\arduino-1.0.5\hardware\tools\arm-none-eabi\bin\arm-none-eabi-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mcpu=cortex-m4 -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -felide-constructors -std=gnu++0x -I"C:\Users\myusername\Documents\arduino\arduino-1.0.5\hardware\teensy\cores\teensy3" -I"C:\Users\myusername\Documents\arduino\arduino-1.0.5\libraries\SoftwareSerial" -o "C:\Users\myusername\AppData\Local\VMicro\Arduino\Builds\telemetry_convert\teensy3\telemetry_convert.cpp.o"  "C:\Users\myusername\AppData\Local\VMicro\Arduino\Builds\telemetry_convert\teensy3\telemetry_convert.cpp"  -DF_CPU=96000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH -DVISUALMICRO_COMPILER_VER=1  -mthumb -nostdlib -D__MK20DX128__  -fno-rtti
telemetry_convert.ino : 'error_here' does not name a type
telemetry_convert.ino : 'error_here' does not name a type
telemetry_convert.ino : : In function 'void sendValue(uint8_t, uint16_t, uint32_t)':
telemetry_convert.ino : 'sendByte' was not declared in this scope

This is partly expected behaviour but you can work around it by double clicking the line with the error message. Full reply from VisualMicro is here: http://www.visualmicro.com/forums/YaBB.pl?num=1370300581/0#5
 
Back
Top