PDA

View Full Version : Teensy 3.0 IDE: Two Suggestions



Avenue33
11-04-2012, 02:56 PM
I like the idea of a self-contained autonomous IDE for Teensy.
I've created an icon: feel free to use it.16

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


-DARDUINO=101 -DTEENSY=3

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

All other Processing-based Wiring-derived Arduino-like IDEs have their own variables:
15

slomobile
11-08-2012, 12:55 AM
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.

Avenue33
11-08-2012, 01:04 PM
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.

Cas55
06-05-2013, 10:31 AM
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

543544545

afterburner
11-17-2013, 02:31 PM
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:



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\B uilds\telemetry_convert\teensy3\telemetry_convert. cpp.o" "C:\Users\myusername\AppData\Local\VMicro\Arduino\B uilds\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

PaulStoffregen
11-17-2013, 03:14 PM
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.

afterburner
11-17-2013, 03:33 PM
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 ;)

stevech
11-18-2013, 06:40 AM
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?

afterburner
11-18-2013, 11:14 AM
You can use VisualMicro as Plugin for Atmel Studio. This will work with Teensy 3.0 as target.

Step 1) http://www.visualmicro.com/page/Arduino-for-Atmel-Studio.aspx

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

afterburner
11-25-2013, 03:04 PM
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:



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\B uilds\telemetry_convert\teensy3\telemetry_convert. cpp.o" "C:\Users\myusername\AppData\Local\VMicro\Arduino\B uilds\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