VisualTeensy upgraded to support Teensy 4 projects

why not create a plugin for vscode out of visual teensy

When I started this project a couple of years ago I was thinking of a plugin as well. I decided to not make a plugin/extension because of two reasons:

  1. I didn't want a dependency on the used editor (editors tend to come and go and change...(*) ).
    As you might have noticed, besides the convenience that you have intellisense and can start building and upload with the standard vsCode menu, the generated project actually does not depend on vsCode at all. If you like, you can simply type "make all" or "make upload" etc. in the project folder to build/upload without even starting vsCode.
  2. Probably more important: I have a physical aversion to untyped programing languages :).

But I do understand that for some users it might be more convenient to have this as a vsCode extension. On the other hand, if one is happy with a plugin, why wouldn't he/she use PIO?

Then Paul @ PJRC only need to have a TeensyDuino installer that don't require that Arduino Is installed
Actually your plugin could simply clone the TeensyDuino repo, it contains everything you need to compile for Teensy. Well, unfortunately you need to grab boards.txt and platform.txt somewhere but those are pretty stable and don't change often. The compiler can be downloaded from ARM and just needs to be unzipped. (see here https://github.com/TeensyUser/doc/wiki/GCC#Switching-between-different-toolchains for more info). TyCommander and (if you prefer) Teensy.exe are also available to download.


Feel free to fork the code base and transform it to a plugin, it is under MIT license. Looking forward to test your plugin.

---
(*) Well, VIM might be an exception but probably only because once you started it you won't find out anymore :p https://stackoverflow.blog/2017/05/23/stack-overflow-helping-one-million-developers-exit-vim/
 
Last edited:
1. I don't think VSCODE will die any time soon.

2. actually the extensions are written in TypeScript which is a typed language, so the "precompiler"(or what to call it) warns when using non typed objects.
then they are converted to javascript in the background (but are not most languages translated/compiled into something non typed in the "background"?)

PIO takes additional space (239MB) to install and can feel big and clumsy.
Maybe 239MB is not that much but with a full install with teensy it takes 731MB,
which is strange as the TeensyDuino installed into a "fake arduino installation" (did only contain the required files to make the teensy installer install)
take 163MB
and 163+239 = 402MB (so there is 329MB extra that maybe not belong to teensy)

the conclusion is that:
When a user only want to program a teensy
the space requirement for
using a specific teensy vscode extension would only take 163MB for the teensy SDK + around 2MB for the extension (it's currently at 1MB)

I checked my VM ubtuntu there platformio takes 372MB



TeensyDuino repo.? do mean https://github.com/PaulStoffregen/Arduino-1.8.13-Teensyduino

that only contains the Arduino IDE modifications

off course it would be nice to just be able install the extension and then it takes care of the installation of all the required files
just like PIO does.


But in the end I would rather have separate installation provided by PJRC
as links can die/change.


Right now I could just provide the fakeArduinoInstall (4.29MB) as a workaround.

I tried with that (the fake Arduino) and it compiled just fine using VisualTeensy.


The code base is not really necessary as I have already done a "boards menu" in
the new "Design Tool" https://manicken.github.io/
The only things I will use is the makefile (which is a very good template)
and the different json files also required.


Yeah as read above writing a custom extension gui is done using html
so porting the already menu is a simple task,

then to interface it with VSCODE I will use the existing WebServer that I start in my extension
this would look like it's overcomplicated, but I would need the "interface" for the
Design Tool anyway (as stated in prev. post)

(using the provided API from microsoft is surely a nightmare anyway)
 
Back
Top