luni
Well-known member
Inspired by this thread, I did a quick and pragmatic experiment compiling a blink sketch for Teensy 3.2 with Visual Code (Win10).
First of all: it works perfectly including Intellisense and all the convenience functions from a modern build environment. Build time is about 30s for a complete rebuild and below 1s if you only touch the sketch. Uploading with the teensy uploader as well as with TyCommander is included.
The place to start :: VisualCode projects for PJRC Teensy boards >> github::luni64/VisualTeensy
Here a screenshot of the environment:
^
Getting it going is quite simple and needs to be done only once.
You can compile / upload with CTRL + SHIFT + B (or via Tasks|Run Build Tasks) which gives you the following options:
Tested this with Arduino 1.8.5
Hope somebody can use this as a starter
View attachment test.zip
First of all: it works perfectly including Intellisense and all the convenience functions from a modern build environment. Build time is about 30s for a complete rebuild and below 1s if you only touch the sketch. Uploading with the teensy uploader as well as with TyCommander is included.
The place to start :: VisualCode projects for PJRC Teensy boards >> github::luni64/VisualTeensy
VisualTeensy
VisualCode is a modern, open source code editor which can easily be used to compile and upload sketches for the PJRC Teensy Boards using VisualTeensy. VisualTeensy is a small Windows utility which fully automates the generation of Teensy projects for VisualCode. Precompiled binaries can be downloaded here.
Here a screenshot of the environment:

Getting it going is quite simple and needs to be done only once.
- Download make.exe and copy it to some convenient place. You can download it from e.g. http://www.equation.com/servlet/equation.cmd?fa=make
- Download and install VSCode
- The first time you open a c++ file it ask you to install supporting extensions. Install the extension "c/c++ Intellisense, debugging, and code browsing".
- I attached the "blink workspace" to this post, extract it to some convenient place and open the file "test.code-workspace" using "File | Open Workspace.
- Open the file c_cpp_properties.json in .vscode and adjust the path to match your Arduino installation.
- Open the file tasks.json in .vscode and adjust the path to your make.exe. Note: this has to be done for all the build tasks in the file (didn't find a way how to centralise that setting)
- Open the makefile and adjust the path to your Arduino installation (ARDUINO_BASE) and the path to TyCommander (UPL_BASE_TYCMD) if you want to use it.
- The file flags.mk contains the board specific settings, you can change that manually or use Board2Make for auto generating it (https://github.com/luni64/Board2Make)
You can compile / upload with CTRL + SHIFT + B (or via Tasks|Run Build Tasks) which gives you the following options:
- Build -> this will build the sketch
- Clean -> deletes all generated binaries -> the next build will start from scratch
- Rebuild User Code -> rebuilds everything but the teensy core.
- Upload with Teensy uploader
- Upload with TyCommander
Tested this with Arduino 1.8.5
Hope somebody can use this as a starter
View attachment test.zip
Last edited by a moderator: