News:

Let's find out together what makes a PIC Tick!

Main Menu

VSCode Positron

Started by atomix, Nov 27, 2021, 09:05 PM

Previous topic - Next topic

atomix

Positron extension for VSCode IDE.

VSCode is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS and Linux. Positron extension implements basic language features of Positron for Visual Studio Code and provide not only syntax highlighting, but also basic snippets integration and auto indentation rules.

  • Install VSCode
  • Install extension Positron
  • Open your file with code (*.bas)
  • You may change codepage (pic.gif - 3) and change language mode (pic.gif - 4)
  • Click icon "Compile" or "Compile and Program" or "Program" (pic.gif - 1) or click item context menu (pic.gif - 2)

A brief overview of the possibilities VSCode


atomix

#1
New Release 0.9.4

atomix

New Release 0.9.5

Added list of device
Fix statement declare

diebobo

Hi Atomix,

U Already have something in place for to be able to use a programmer from VSC ?

atomix


atomix

New Release 0.9.7

Added action and settings for compile and program devices
Removed dependence on the extension "Code Runner"

trastikata

atomix, is there a way to display the Assembler code?

diebobo

#7
Quote from: atomix on Dec 05, 2021, 09:00 AMNew Release 0.9.7

Added action and settings for compile and program devices
Removed dependence on the extension "Code Runner"

Nice work, think there is an issue with arguments passing to the programmer.. My programmed command line tools keeps saying errors.. I checked with a test programmmer file to see what you are passing as arguments.. The echoing telling me you are passing the arguments between "" so it only sees as 1 argument instead of multiple..

[Running]  c:\pic\nsprog.bat p -d dsPIC33CK256MP205 -i c:\PIC\Test.hex

c:\pic>echo "p -d dsPIC33CK256MP205 -i c:\PIC\Test.hex"       
"p -d dsPIC33CK256MP205 -i c:\PIC\Test.hex"       
[Done] exited with code=0 in 0.024 seconds


The contents of my test programmer file ( .bat )

echo %1 %2 %3 %4 %5 %6 %7 %8

Also if possible, after chaning extension settings you need to reloads VSC to take affect, perhaps you can reload your extensions after settings change ?

top204

#8
Quoteatomix, is there a way to display the Assembler code?

That would be an excellent addition, and without it, I, unfortunately, cannot use the IDE because I constantly look at the assembler code produced by the compilers. I also make the assembler code very clear to read, so users can learn assembly code from writing a high level language and seeing what is produced in assembler.

The type of mechanism John has placed in his excellent IDE would be great. Where a window shows the assembler code in clarity and highlighted.

atomix

Well, I will try to do it.

atomix

New Release 0.9.8

Fix args command line
Added view assembler and listing

atomix

#11
For Les, maybe you like this:

top204

Wowwww!!!!!!

It looks superb. Many thanks Atomix.

JohnB

Positron Compilers are blessed with a plethora now of IDEs, who would have thought!
JohnB

atomix

New Release 0.9.9

Added view assembler with find by current line or selection

JonW


trastikata


top204

I know this will sound like a silly question, but how is the Positron extension added to VScode?

I have tried and tried, but it refuses to add it and just goes around in a circle adding a PlatformIO, then saying it is added, then adding it again and again and again, but never does and never shows anything to do with Positron. :-)

I've installed the latest version of Visual Studio code: "VSCodeUserSetup-x64-1.62.3.exe", and it just does not bring anything up to use.

I've added a screenshot of what I get. Is there any changce of a step through with screenshots for the installation of the Positron externsion please? I've come across this type of thing many times with modern IDEs, but always had success at some point, but not this time. :-)


Screenshot.jpg

atomix

#18
Link Positron or input "Positron" in Panel "Extensions"

top204

Many thanks Atomix, got it working and compiling.

Another silly question, because I cannot find a way to do it, and the help system on the IDE is dreadful. It's probably me, not quite understanding the convoluted methods they use these days with applications. :-)

How to change the colours of the syntax highlighting, and add keywords to the syntax etc...?

Also, how to get a sort of Code Explorer to show, so the include, header, files can be seen? i.e. A project.