Using Teensy with Atmel Studio

Hi everyone,
i don't know if anyone here uses Atmel Studio for Development, but because there is no tutorial on how to set up Atmel Studio with Teensy, i created one.

I'm new so this will be very helpful, but will it all work with Teensy3? What changes are needed?
 
I'm new so this will be very helpful, but will it all work with Teensy3? What changes are needed?

I doubt it would be possible to get it to work with the Teensy3, as it does not use an Atmel chip as it's base. Likely you'll want to look at other IDEs if you don't want to use the teensyduino one. I haven't tried to find one yet so I don't know what might be possible.
 
Visual Micro

I like the VisualMicro plug-in for Atmel Visual Studio. It is supporting the Teensy2 and 3, http://www.visualmicro.com/page/Teensy-for-Microsoft-Visual-Studio.aspx

I had difficulties to get it working with the Teensy3, although it worked fine on an Arduino UNO board. I like the possibilities to edit and debug the sketches. I'm looking for some help to get this VisualMicro plug-in Configured for a Teensy Project.

With help of Tim Leek of VisualMicro I managed to get a demo sketch up & running and can use the debug functions now: see http://forum.pjrc.com/threads/65-Teensy-3-0-IDE-Two-Suggestions?p=32246#post32246
 
Last edited:
@Cass55 So to be clear, you now know which defines to set for your board such as keyboard, cpu speed etc so all is working including debug? Thanks
 
Hallo Teensy friends :)

I use Teensy 4.0 and Teensy 4.1 boards and work with AtmelStudio 7. The compiler in AtmelStudio is very slow. That's why I compile my code with Arduino 1.8.13. This is much faster than the compiler in AtmelStudio.

That's why I only use AtmelStudio as an editor :)
Is there any way I can start the compiler in Arduino IDE from AtmelStudio7 ?

Thanks a lot for help. Greetings from Rolf
 
Hope it helps - make a github issue if anything doesn't quite work - the forum link has more details as noted in the readme.

Running TSET.cmd assembles the compile.cmd that does a complete normal IDE build - and provides a clean build option - and another 'NEW' path builds into a sketch named directory with base INO like the IDE does.

It can work without integrateing TyCommander - but then there is no SerMon integration like the IDE has to select the board and take SerMon offline - where TyComm does all that.
 
Hallo defragster

Thank you for your help. Compiling with Atmel Studio 7 works well with the Visual Micro plugin for AtmelStudio. I also get error messages on the AtmelStudio console. But when I change a variable in my program code, the second compilation takes a long time. When I compile the second time with ArduinoIDE, it goes very quickly.

Does TSET.cmd installation solve the problem?
 
...When I compile the second time with ArduinoIDE, it goes very quickly.

Does TSET.cmd installation solve the problem?

First compile and building ALL libraries and parts is typically slower, but the IDE build process reuses that work for faster builds after that.

It is typical for 2nd and later builds to be much faster as all unchanged libraries and source files use the output of the first longer compilation where possible.

TSET will have the same compile time and process as when using the IDE to build as the results of the first are stored in a TEMP location for re-use.
 
Hallo defragster

Thank you for your help. Compiling with Atmel Studio 7 works well with the Visual Micro plugin for AtmelStudio. I also get error messages on the AtmelStudio console. But when I change a variable in my program code, the second compilation takes a long time. When I compile the second time with ArduinoIDE, it goes very quickly.

Does TSET.cmd installation solve the problem?

I have not used AtmelStudio in a long time. When I use VisualMicro I typically use it with Visual Studio 2019.

Warning I don't use VisualMicro that often, but I know that it can be configured to build a couple of different ways. For example it can work very similar to the Arduino IDE in builds or I believe it can also be setup with makefile type builds. The one big difference I had with it versus the Arduino IDE is how it chooses which library to use (priority of directories) is different. For example if you have a library both installed by Teensyduino, and in your <sketches>/library folder Arduino will choose the one from your <Sketches...> and VisualMicro will choose the one installed by Teensyduino (or whichever board you are compiling for). Which is fine for many things, but not when I am working on those libraries and I have a different version...

I typically did not find the builds to be significantly different in time, but it might be... I normally only use it when trying to setup source level debug using the GDB Stub.
 
Hi, it sounds like visual micro is pointing to a different version of the Arduino IDE or that some options have been enabled/changed. Please create a log in the forum at visualmicro.com and follow the guide in yellow that appears at the top of the forum. Thanks. Forum is here http://www.visualmicro.com/forums/
 
Thanks for the hint. For this reason I am currently only using Atmel Studio 7 as comfortable editor for my arduino sketch.
 
Thanks for the hint. For this reason I am currently only using Atmel Studio 7 as comfortable editor for my arduino sketch.

Please provide the logs as requested. The location of the arduino ide is a configuration option as are other options. It sounds like you have something configured slightly wrong. With correct settings (normally default) you should see same or faster build speed in Atmel Stdudio.

It is also a good idea to make sure you are on the latest plugin release for AS7 which is not in the Gallery yet. You can find it here https://www.visualmicro.com/forums/YaBB.pl?board=VS_ARDUINO_EXT_RELEASES
 
Hello friends

I have installed the current Visual Micro plugin for AtmelStudio 7. Compiling is now very quick. Thanks for the great support :) :) :)
 
My "ArduStudio7" ;)

Ardu-Studio7.jpg


Thanks everybody
 
Back
Top