I'm having trouble getting it to load when calling loadp2.
I have my environmental variable FlexPropPath set to C:\######\flexprop\bin and have set the PATH variable with the additional entry: C:\######\flexprop\bin
@Wuerfel_21 said:
Try explicitly specifying the port (i.e. add a -pCOM7 or whatever your board comes up with to the command line). Is a good idea, anyways.
I'm very excited about using a single IDE to try multiple programming languages, so thank you for Stephen Moraco and all the folks helping out on this. Hats off to you all.
I've worked my way through the VS Code - User-wide Defined Tasks and I've hit a road block.
Here are the details.
My project is in C:\VSCode Projects\Hello World
My project file contains:
main.c
settings.json
My settings.json looks like
{
"topLevel": "main"
}
It's resulted in the following error when I select CompileTopP2 "Variable ${config:toplevel} can not be resolved because setting 'topLevel' not found.
Oddly enough I get the same error when I try to DownloadP2 or FlashP2 after I successfully CompileP2.
Workarounds found: #1
1) I noticed that I didn't have a .vscode folder, so I created one ...\Hello World\.vscode. Apparently it's a requirement but I missed that part.
2) I moved my settings.json into it.
This changed my error messages, but I was getting compiler errors.
#2
In tasks.json,, around line 50 looks like this... "args": ["-2", "-Wabs-paths", "-Wmax-errors=99", "${fileBasename}.spin2"],
since I'm using a P1 and C, I edited it to "args": ["-Wabs-paths", "-Wmax-errors=99", "${fileBasename}.c"],
Now it appears to work as expected except I don't have a terminal connected to my P1.
I now have VS Code functioning for the P1 and C. My intention is to migrate from SimpleIDE to VS Code, but I don't have a P2 yet so I needed to make some adjustments.
I also think it's a bad idea to try and learn two new things at the same time.
I've made some 'temporary' modifications to the tasks.json file. Because I'm only using Windows, and plan to migrate to P2 soon, I limited the changes to only those required.
I don't have the machines to test OSX and Linux.
I understand that there is a plan to expand VS Code to the P1. My efforts are crude to what Stephen Moraco does!.
I also kept the 'label' unchanged. When I select 'CompileP2', I know it will actually compile my P1.
Here are my changes.
Under "label": "compileP2", about 11 lines down, find the line
"args": [ "-2" , "-Wabs-paths", "-Wmax-errors=99", "${fileBasename}. spin2 "], and modify it to
"args": ["-Wabs-paths", "-Wmax-errors=99", "${fileBasename}. c" ]
Under "label": "compileTopP2", about 11 lines down, find the line
"args": [ "-2", "-Wabs-paths", "-Wmax-errors=99", "${config:topLevel}. spin2 "], and modify it to
"args": ["-Wabs-paths", "-Wmax-errors=99", "${config:topLevel}. c "],
Under "label": "downloadP2", about 7 lines down, find the 2 lines
"command": "loadp2.exe",
"args": ["-b230400", "${config:topLevel}.binary", "-t"] and replace them with
"command": "proploader.exe",
"args": ["-pCOM12", "${config:topLevel}.binary", "-t"] <-- don't forget to replace COM12 with your COM port
Under "label": "flashP2", about 7 lines down, find two lines
"command": "loadp2.exe",
"args": ["-b230400", "@0=${env:FlexSpinPath}/board/P2ES_flashloader.bin,@8000+${config:topLevel}.binary", "-t", "-k"] and replace them with
"command": "proploader.exe",
"args": ["-pCOM12", "-e", "-r", "${config:topLevel}.binary", "-t"] <-- don't forget to so course replace COM12 with your COM port
The other loader that I've tried was Payloader by @RossH. It has some nice features but it doesn't currently support WIFI transfers.
Comments
@"Stephen Moraco"
I'm having trouble getting it to load when calling loadp2.
I have my environmental variable
FlexPropPath
set toC:\######\flexprop\bin
and have set the PATH variable with the additional entry:C:\######\flexprop\bin
My
tasks.json
It stays trying to execute the loadp2 task:
Is there something wrong in my configuration?
Try explicitly specifying the port (i.e. add a
-pCOM7
or whatever your board comes up with to the command line). Is a good idea, anyways.Yes! Thanks @Wuerfel_21!!! That was it.
This is the modified task in
tasks.json
:@"Stephen Moraco" may I suggest that the instructions for Windows in github be modified to account for this?
I'm very excited about using a single IDE to try multiple programming languages, so thank you for Stephen Moraco and all the folks helping out on this. Hats off to you all.
I've worked my way through the VS Code - User-wide Defined Tasks and I've hit a road block.
Here are the details.
My project file contains:
My settings.json looks like
It's resulted in the following error when I select CompileTopP2 "Variable ${config:toplevel} can not be resolved because setting 'topLevel' not found.
Oddly enough I get the same error when I try to DownloadP2 or FlashP2 after I successfully CompileP2.
Workarounds found:
#1
1) I noticed that I didn't have a .vscode folder, so I created one ...\Hello World\.vscode. Apparently it's a requirement but I missed that part.
2) I moved my settings.json into it.
This changed my error messages, but I was getting compiler errors.
#2
In tasks.json,, around line 50 looks like this...
"args": ["-2", "-Wabs-paths", "-Wmax-errors=99", "${fileBasename}.spin2"],
since I'm using a P1 and C, I edited it to
"args": ["-Wabs-paths", "-Wmax-errors=99", "${fileBasename}.c"],
Now it appears to work as expected except I don't have a terminal connected to my P1.
Next
Tackle the loader.
I now have VS Code functioning for the P1 and C. My intention is to migrate from SimpleIDE to VS Code, but I don't have a P2 yet so I needed to make some adjustments.
I also think it's a bad idea to try and learn two new things at the same time.
I've made some 'temporary' modifications to the tasks.json file. Because I'm only using Windows, and plan to migrate to P2 soon, I limited the changes to only those required.
I don't have the machines to test OSX and Linux.
I understand that there is a plan to expand VS Code to the P1. My efforts are crude to what Stephen Moraco does!.
I also kept the 'label' unchanged. When I select 'CompileP2', I know it will actually compile my P1.
Here are my changes.
Under "label": "compileP2", about 11 lines down, find the line
"args": [ "-2" , "-Wabs-paths", "-Wmax-errors=99", "${fileBasename}. spin2 "], and modify it to
"args": ["-Wabs-paths", "-Wmax-errors=99", "${fileBasename}. c" ]
Under "label": "compileTopP2", about 11 lines down, find the line
"args": [ "-2", "-Wabs-paths", "-Wmax-errors=99", "${config:topLevel}. spin2 "], and modify it to
"args": ["-Wabs-paths", "-Wmax-errors=99", "${config:topLevel}. c "],
Under "label": "downloadP2", about 7 lines down, find the 2 lines
"command": "loadp2.exe",
"args": ["-b230400", "${config:topLevel}.binary", "-t"] and replace them with
"command": "proploader.exe",
"args": ["-pCOM12", "${config:topLevel}.binary", "-t"] <-- don't forget to replace COM12 with your COM port
Under "label": "flashP2", about 7 lines down, find two lines
"command": "loadp2.exe",
"args": ["-b230400", "@0=${env:FlexSpinPath}/board/P2ES_flashloader.bin,@8000+${config:topLevel}.binary", "-t", "-k"] and replace them with
"command": "proploader.exe",
"args": ["-pCOM12", "-e", "-r", "${config:topLevel}.binary", "-t"] <-- don't forget to so course replace COM12 with your COM port
The other loader that I've tried was Payloader by @RossH. It has some nice features but it doesn't currently support WIFI transfers.