Po-util: The Ultimate Local Particle Experience for Linux and macOS

Yeh I used the old repo.

I don’t think cloud9 likes

bash <(curl -sL get.po-util.com)

oh. I will just try the new repo above.

Cloud9 now needs a credit card just to try it. Is that still the same?

Here are the steps to get (the old) c9.io working for argon:

sudo rm -rf /.dockerenv
sudo rm -rf ~/.nvm
bash <(curl -sL get.po-util.com) # Press enter at the prompt
# For the config options (separate lines) do: v0.8.0-rc.27 duo no
# Wait for the installer to finish
po config v0.8.0-rc.27
po setup-mesh # This is when the c9 drive literally ran out of space
cd ~/workspace
po argon init .

Running this caused the c9.io workspace (2gb) to overfill.

The extra mesh dependencies are simply too large for c9.

I have a premium account so will see if it works for me.

Ok. The commands above should work.

Why are these important. They remove the docker and node virtual manager??

Yeah, deleting .dockerenv makes po-util treat c9 like a normal ubuntu system which is what we want for c9.

Deleting nvm (node version manager) makes c9 use the version of node po-util installs in order to install particle-cli successfully.

Over the last few years it would have been nice to know that little trick.

P.S. I thought I was good at bash programming, but you are at a totally different level. This stuff is amazing.

1 Like

So that was amazing.

Built the workspace-argon.bin file and used 3Gb of disk space.

I will try this on my laptop which should let me flash the code.

Thanks @nrobinson2000. Today was a very good day.

Sorry, the Disk was 2gb, the memory was 500mb. 2gb was not enough disk space.

po should install much more easily on ubuntu running on your laptop.

This is all you should need:

bash <(curl -sL get.po-util.com) # Press enter at the prompt
# For the config options (separate lines) do: v0.8.0-rc.27 duo no
# Wait for the installer to finish
po config v0.8.0-rc.27
po setup-mesh

Sorry for any confusion I really need to update the documentation. :wink:

If you need direct support again I’d recommend trying the gitter.im chatroom or sending me a PM. This thread is getting long.

Particle released Device OS v1.0.0 today. I just wanted to mention that it is supported in po-util.

To get v1.0.0 all you need to do is:

po update
po config v1.0.0
1 Like

I have added support for Particle’s official project structure to po-util. Any project created with Particle CLI or Particle Workbench can now be built using po-util.

To get the update you’ll need to run the following:

po update
po install

There are a few new commands that allow you to build the official structure:

First you must have a Particle project you want to build. If you need to make one you can do:

particle project create . --name myProject
cd myProject

The new commands are build-beta, flash-beta, and clean-beta. You can run them like so:

po PLATFORM build-beta
po PLATFORM flash-beta
po PLATFORM clean-beta

In addition, all of the options from Particle Workbench are supported:




To use the options you can use the run command.

Example: if you want to build the user firmware for a photon you could do:

po photon run compile-user

If you forget any of these options you can press the TAB key after run to autocomplete the different options. In case you didn’t know, po-util has TAB completion for nearly all commands, making it much easier to choose the arguments you want.


I’ve made a flowchart for po-util’s command line arguments with draw.io



I’ve been using this feature: very nice! But it only seems to work for flashing locally? E.g. while po boron flash-beta works, po boron ota doesn’t… It says “Firmware directory not found!”…

This command relies on building a project using the old structure.

You can still flash the .bin that gets created in target


With something like this:

particle flash YOURDEVICE target/YOURFIRMWARE.bin
1 Like

I’d like to use po-util with my own version (fork) of the device-os and I’m wondering what I need to do for that to be reasonably smooth.

I’ve been compiling locally for a boron using po boron flash-beta and that worked great. But now I’d like to expose a few additional “system calls” from the device-os core so I can access the littlefs. Building the monolithic firmware works, but it’s pretty slow (erasing the flash alone takes a while), so I’m thinking of forking device-os and tweaking it. Questions:

  • Do I just go into ~/.po-util/src/particle/firmware and change the git checkout?
  • Or do I risk my version (which I’ll be editing) being updated or messed with (possibly by accident if I type the wrong po-util command)?
  • Is there something simple I can do so it won’t mess with that dir?
  • I haven’t dug into the po-util code, is the worst case a git checkout to the std branch or is there code that rm’s the whole subtree and re-downloads?

Thanks for an awesome tool!

The easiest way would be to edit ~/.po-util/config and change FIRMWARE_PARTICLE to the path of your device-os version.

po-util does do git stash on the device-os repo whenever you clean a project or upgrade the device-os on a device (which makes sense for official device-os but may be a problem for you).

I’m planning on slimming down po-util in the future, letting particle-cli and the workbench makefile do most of the work.

1 Like

Thanks for the quick reply. Yes, leveraging the particle stuff more seems to make sense and should reduce your maintenance task!

1 Like

Sorry to resurrect this old thread, but to anyone who’s used po-util or po in the past, I hope you will be glad to hear that I’ve completely rewritten the tool using Python. It integrates directly with Workbench and Particle CLI, providing a greatly improved experience over my previous tools.

Here is the announcement thread:

Here is the repository: