The file upload does not work. It can see the port and connect but when I try to upload a file all I see is things happening on the PicoCalc screen (to fast to actually understand what) and in the end the file is not there.
Hi!
I think it’s an excellent idea—especially because of the possibility of connecting the real device and sending/running programs directly on the hardware.
Unfortunately, I’m not able to create the VSIX file to install it in VS Code. Is there any chance you could share a ready-to-use VSIX file?
Thank you so much for this!!! I managed to get a test running. It is extremely satisfying to see the code being uploaded in real time and things happening on the picocalc. Thank you again. Ace work. Bravo!!
@DNSGeek Do I need to prepare the Pico to communicate with vscode?
I tried following your instructions. VSCode connects to the Pico, but when I send code to the device, on the Pico I see the basic program being typed onto the screen rather than sending a file.
I don’t have experience using VSCode, so I’m sure i’m doing something wrong.
Looks nice. But somehow more complicated than MMEdit5. I don’t really want to learn keyboard shortcuts to transfer the program to the Picocalc and start it. The transfer doesn’t work properly. Only at 115,400 baud do reasonably meaningful characters arrive, and then the Picocalc throws up various error messages because characters are swallowed during the transfer.
This should be transferred:
OPTION EXPLICIT
OPTION DEFAULT NONE
'### Clear screen
cls
'### Define variables
dim intKona as integer
dim intMG4 as integer
dim intPhotovoltaik as integer
dim intWaermepumpe as integer
dim intWallbox as integer
dim strFehler as string
dim strTaste as string
'### Display start screen
gui frame #1, “Input of measured values”, 0, 5, 320, 315, rgb(WHITE)
color rgb(white), rgb(midgreen)
GUI DISPLAYBOX #3, 20, 20, 280, 18, rgb(WHITE), rgb(fuchsia)
ctrlval(3) = “The measured values”
GUI DISPLAYBOX #4, 20, 45, 280, 18, rgb(WHITE), rgb (grey)
I updated the extension to add remote debugging and file browsing (upload, download, view files, delete files, etc) on both A and B drives and updated the syntax and tooltips for 6.02.00
Thank you for creating this useful VSCode extension.
I tested it with PicoMite V6 / PicoCalc and found that the existing upload workflow is almost correct.
The current uploadFile() flow is:
NEW
sendProgram()
SAVE "filename"
This makes sense for MMBasic.
However, on PicoMite V6, a program sent over the serial console needs to be received using AUTOSAVE mode. Without AUTOSAVE, the incoming program text may be treated as console input instead of being stored correctly as a program.
I modified src/serialPortManager.ts, specifically async sendProgram(), to use:
NEW
AUTOSAVE
program text
Ctrl-Z
After adding AUTOSAVE and ending it with Ctrl-Z, uploadFile() worked correctly on my PicoCalc / PicoMite V6 setup.
The existing fileBrowserProvider.ts uploadFile() workflow did not need to be changed.
The essential change is like this:
// PicoMite V6 requires AUTOSAVE for serial program upload.
this.port!.write('AUTOSAVE' + lineEnding);
await this.delay(100);
// existing line sending loop...
// End AUTOSAVE mode with Ctrl-Z.
this.port!.write('\x1A');
await this.delay(500);
I hope this helps.
If possible, it would be great if this change could be included in the extension.