Blinking Green Question

@nrobinson2000 why would po build electron try and build a different directory than pwd? It’s like it just keeps trying to build from the first directory that I ever successfully ran the command in… if I put set -x at the top of po-util.sh I can see that $FIRMWAREDIR is being set to some other directory than the one I am in (in fact a directory that no longer exists because I deleted it). I may be wrong about that, is there some global Makefile could get borked? Like I’m seeing it do this:

make all -s -C /home/vic/github/particle/firmware/main APPDIR=/home/vic/git/project/firmware 

TARGET_DIR=/home/vic/git/project/firmware/../bin PLATFORM=electron
make[2]: *** No rule to make target '/home/vic/git/temp/firmware/main.cpp', needed by '../build/target/user/platform-10-m/firmware/main.o'.  Stop.

… and /home/vic/git/temp/ is not a thing, but it was at one point… where is this Makefile it’s trying to use?

You need to run

po DEVICE clean

When you change directory or device.

This is not po-util’s fault, but the fault of how the makefiles are setup.

thanks … good to know :+1:

1 Like

I just installed po-util successfully on Cloud9, which uses nvm.

nvm install stable
nvm use stable
bash <( curl -sL https://raw.githubusercontent.com/nrobinson2000/po-util/master/po-util.sh ) install

Thanks for being so responsive and helping me out over the last day or two! For today I’ve gone with a hybrid strategy of using po-util to upgrade system firmware, and using particle compile and flash to load user firmware. The important thing to note about this strategy is that it’s super important to pass --target 0.6.0 to particle compile electron.

The green flashing turned out to be something of a red herring, when I installed an activated SIM card, I got dropped into safe mode after the Electron before specifying the target. I think I just got bitten by some bad luck with particle system firmware version changing (release/stable) under my feet and ending up with a latent incompatibility between po-util and particle-cli.

The thing I need to do is stop using this hybrid tooling and exclusively use po-util. The tidbit about using po electron clean is probably the rosetta stone to making that transition for me.

I have a general comment, and you can take it or leave it, but perhaps po DEVICE clean should be implied by po DEVICE build somehow in po-util. The current behavior is fairly opaque imho.

1 Like

Once you switch over to po-util, you can just use po electron flash, which will put the electron into dfu mode, build your firmware, and then flash the firmware with dfu-util.


I have been thinking about this, the main reason I haven't done so is because I don't want to po-util to clean when not necessary because this would add a lot of delay to the experience. I would need a way to check if it is necessary to clean.