Compiling Sketches in Visual Studio Code - installation issue

Discussions about Z-Way software and Z-Wave technology in general
davidtheITGuy
Posts: 25
Joined: 24 Sep 2021 03:55

Compiling Sketches in Visual Studio Code - installation issue

Post by davidtheITGuy »

Hello,

Newbie here. I want to compile sketches in VS Code and am having problems, I've installed the extension which shows as activated. However, when I edit a sketch and try to run any commands I get "command not found" errors such as

Code: Select all

Command: Z-Uno.Verify resulted in an error (command zuno.verify not found)
Basically, none of the extension's commands work. Does anyone know what I am doing incorrectly?

Thanks in advance!

-David
amatilda
Posts: 60
Joined: 26 Sep 2021 22:09

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by amatilda »

Good evening.
After installing the plugin, you need to restart vs code and add a folder to the vs code - after that the plugin will work.

If all of the above has been done, what operating system is used? And is it possible to screen vs code with an error?
davidtheITGuy
Posts: 25
Joined: 24 Sep 2021 03:55

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by davidtheITGuy »

Hi thanks so much for this information. Creating a default workspace for the extension was all that was needed to get the commands to finish downloading and to install properly.

The only issues I am seeing now on my Win32 platform running Vis Code Studio is some intellisene problems and deciding whether or not to use the default compiler or try to install a gcc variant.
amatilda
Posts: 60
Joined: 26 Sep 2021 22:09

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by amatilda »

"intellisene problems" - can you be more detailed?
"try to install a gcc variant" - Исходный текст
the plugin itself essentially pumps gcc, this is done at least for automation and convenience. But I would like to know what reason prompted you to use your own gcc?
davidtheITGuy
Posts: 25
Joined: 24 Sep 2021 03:55

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by davidtheITGuy »

I've included two screenshots. One is of the intellisense problems. But this is minor and related to syntax suggestions.
The other screenshot is of the compiler that the ZUno extension is using. This is a MSFT Win32 compiler and it DOES seem to work. The Adrduino IDE uses a GCC variant (I think) and it made sense to me that VS Code would also use a GCC variant but I have been unable to locate a good GCC compiler to use. I am not sure that I need GCC at this point...

Intellisense:
Intellisense.png
Intellisense.png (146.89 KiB) Viewed 2733 times
Compiler:
Compiler.png
Compiler.png (252.38 KiB) Viewed 2733 times
amatilda
Posts: 60
Joined: 26 Sep 2021 22:09

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by amatilda »

"One is of the intellisense problems. But this is minor and related to syntax suggestions." - As for me, this is just one of the significant advantages of vs code.
"This is a MSFT Win32 compiler and it DOES seem to work" - Actually gcc is used))

Why is the settings so awkward? - a not very good solution seems to have been chosen with the addition of settings for zuno to intellisense - now an additional setting named "Zuno" is added - I think this is a better solution. Update - now those problems shouldn't be.
davidtheITGuy
Posts: 25
Joined: 24 Sep 2021 03:55

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by davidtheITGuy »

So you were correct about the compiler. I must select Zuno as the configuration in Studio (not Win32) and it uses gcc. My sketch compiles correctly from Studio. But it will not upload. Here is where the error is:

Code: Select all

Openning port                            ..............................
Openning port                            ..............................                            OK

Syncing with Z-Uno                       ..............................
Syncing with Z-Uno                       ..............................Traceback (most recent call last):
  File "\\vmware-host\Shared Folders\Code\ZUno\G2\ZMEToolchain\zme_make.py", line 828, in uploadFunc
  File "zme_sapi.py", line 550, in readBoardInfo
IndexError: list index out of range
                            OK
[Error] Exit with code: 3
Have you seen this error before? It works from Arduino IDE but not from Studio.

Note the file path \\vmware-host\Shared Folders..., that is not from my system!
amatilda
Posts: 60
Joined: 26 Sep 2021 22:09

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by amatilda »

What exactly are you stitching? Which board is selected in Arduino?
davidtheITGuy
Posts: 25
Joined: 24 Sep 2021 03:55

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by davidtheITGuy »

There is no board selection in the Visual Code extension for Z-Uno. I will say that I have an older Z-Uno board (about 3 years old) I wonder if this has anything to do with the upload .BIN failing from the Python script... This all works in the Arduino IDE though...
amatilda
Posts: 60
Joined: 26 Sep 2021 22:09

Re: Compiling Sketches in Visual Studio Code - installation issue

Post by amatilda »

Now it's all clear.
Plugin vs code - works with new zuno - that's why such an error pops up.
Unfortunately, this is not indicated in the plugin description - it will be changed.
Post Reply