Po-util... How I do this on Spark Core V1.0 & Redbear Duo?

@nrobinson2000. How do I do this?

   $ po sparkcore dfu
    
    Please choose "photon", "P1", "electron", or "pi", or choose a proper command.
    
    Common commands include:
    build, flash, clean, ota, dfu, serial, init, config, setup, library
2 Likes

Hi @ParticleIce,

po-util does not currently support the Spark Core. This is for two reasons.

  • First, po-util was conceived post-Core, and Particle is no longer selling the Core.
  • Second, I don’t really have a Core to test po-util with.

However, I will gladly add support for the Core. I will first need the full output when you flash firmware to the Core with:

particle flash --usb SOME_FIRMWARE.bin

This is so that I can add the correct dfu-util data for the Core to po-util.

I will then enable support for the Core in po-util.

@harrisonhjones Do you know how to recompile and flash the system firmware for the Core? Compiling modules/ with program-dfu does not seem to work.

UPDATE:
Do I just do:

make clean all PLATFORM=core program-dfu

In the root of the firmware?

Also, how can firmware be compiled for the Redbear Duo?

RedBear Duo does have a modified system firmware which is “based” on the Particle firmware but does lag behind several releases and has other major additions to support BLE, so it won’t be an “easy” task to incorporate a system build, but the application firmware can be built pretty similar.

For the Core things are a bit easier as it’s based on the same system and can be built from that repo, just be aware that the Core only supports monolithic firmware.

1 Like

Great. So I won’t have to implement $ po core upgrade because the firmware is monolithic?

Also, I assume the changed magic baud rate to trigger DFU mode will work?

Yup!

1 Like

@ScruffR

Do you by any chance know the dfu address of the Core and the full dfu-util command that is run when:

particle flash --usb SOME_FIRMWARE.bin

Is done?

If you mean the VID/PID combo for the Core that’s 1D50:607F (at least for the V1.0 Cores).

1 Like

I got the VID/PID combo from:

There is a second argument thingy that dfu-util requires I think.

It looks like 0x080A0000 when I flash to a Photon.

dfu-util -d 2b04:D006 -a 0 -i 0 -s 0x080A0000:leave -D firmware.bin

I see
dfu-util -d 1d50:607f -a 0 -s 0x08005000:leave -D .\core-firmware\build\core-firmware.bin

1 Like

@ParticleIce,

I have added support for "core" to po-util.

Do:

$ po update

To update po-util.

1 Like

I wonder if it would be worth it to add all known compounds (redbear) with a message that says “this compound isn’t supported yet” ?

1 Like

I just added this. “redbear”, “oak”, and “bluz” trigger a “This compound is not supported yet.” message.

3 Likes

Sounds good. Might be worth it to create a github issue, tagged as an enhancement or “will not fix”, and explain the message and then add a link to the issue in the `This compound is not supported yet" message

1 Like

I added this.

1 Like

This is so cool. Thanks.

Firmware Binary not found!
Perhaps you need to build your firmware?
po core dfu

Expects a firmware.bin in a bin/ directory.

You should really make a project folder first.

$ mkdir someProject
$ cd someProject
$ po init core

Your firmware is kept in firmware/main.cpp

To build the firmware just do:

$ po core build

Or to build and flash automatically over USB do:

$ po core flash

You will need to manually put the Core into DFU mode the first time you flash to it.

1 Like