Really liking working in Visual Code with Workbench. Realize Workbench is still in Alpha and may lag a little, but any idea when device OS 1.0.0 may be available in Workbench?
To elaborate based on my experience - last workbench update when I heard “soon” it was a few days (maybe 3-5 business days). I’m guessing there’s a handful of things for the v1.0.0 release that may take a little time to tidy up. I’m guessing within the week at the latest though.
I was essentially asking the same thing in terms of having the Workbench plugin allow us to add custom device firmware in my post here.
It’ll be better to just wait for the official release, but there is a way currently to add firmware builds, by editing your Particle VISX extension manually. I’m on macOS so you’ll need to figure out your platform’s VSCode extensions path.
-
Download any released firmware source code from Particle-iot:
https://github.com/particle-iot/device-os/releases -
Unzip the downloaded source code folder to
~/.particle/toolchains/deviceOS/x.x.x/firmware-x.0.0
(where x = version number of your firmware source, including any RCs you might be using. Just follow what you already see in the other existing folders as a naming guide). -
Edit the manifest file to include this new firmware:
nano ~/.vscode/extensions/particle.particle-vscode-core-1.0.0-alpha.6/src/compiler/toolchain/manifest.json
- In the JSON file, insert a new entry in
toolchains
:
"toolchains": [
{
"platforms": [6, 8, 10],
"firmware": "deviceOS@1.0.0",
"compilers": "gcc-arm@5.3.1",
"tools": "buildtools@1.0.1",
"scripts": "buildscripts@1.0.1"
},
...
(note: this is where things might break in the future as we are assuming the build tools and scripts are unchanged)
- Further down in the JSON file, insert a new entry in
firmware
:
"firmware": [
{
"name": "deviceOS",
"version": "1.0.0",
"main": "./firmware-1.0.0",
"url": "https://binaries.particle.io/device-os/v1.0.0.tar.gz",
"sha256": "0bef98643b3669f826b9399cc3ee5d7ee5ef6d3a179385b3c1acbf1e3f3cbc54"
},
...
- Save the JSON file, reload the Workbench extension and Configure Workspace for Device. You should now be able to compile on v1.0.0. Initial build will take longer as the makefile in the source code folder is processed.
Hope this helps. I do agree it’s been quite a good experience developing on VSCode and Particle is onto something good here. My suggestion to Particle is to make this firmware management easier, via workspace settings or the extension.
That is excellent information to know @chuank
I’ve gone back to Particle Dev for now waiting for the Workbench update. Seems like compilation is now working more reliably in Particle Dev since 1.0.0 came out. Before I frequently had time outs that would go on for days, then work sporadically and then stop again.
Thanks - I see it has been released this morning.