Argon Device OS flashing

I have a problem with flashing Device OS.
I compile branch feature/gen3_spi_transfer/ch50466 without changes and flash

particle usb dfu e00fce68300279b8bd04d2d2
make all PLATFORM=argon -s program-dfu

After that device enter to safe mode and restore firmware :frowning:

{"Event":"spark\/status\/safe-mode","DeviceID":"e00fce68300279b8bd04d2d2","Data":"{\"p\":12,\"m\":[{\"s\":49152,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"b\",\"n\":\"0\",\"v\":1003,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":1102,\"_\":\"\"}]},{\"s\":671744,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"s\",\"n\":\"1\",\"v\":2007,\"d\":[{\"f\":\"b\",\"n\":\"0\",\"v\":1003,\"_\":\"\"},{\"f\":\"a\",\"n\":\"0\",\"v\":202,\"_\":\"\"}]},{\"s\":131072,\"l\":\"m\",\"vc\":30,\"vv\":26,\"u\":\"D48011B012F729248078243B5F35482F27FF357DE194BCF156669AAEE1612B6F\",\"f\":\"u\",\"n\":\"1\",\"v\":6,\"d\":[{\"f\":\"s\",\"n\":\"1\",\"v\":2008,\"_\":\"\"}]},{\"s\":1536000,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"c\",\"n\":\"0\",\"v\":5,\"d\":[]},{\"s\":192512,\"l\":\"m\",\"vc\":30,\"vv\":30,\"f\":\"a\",\"n\":\"0\",\"v\":202,\"d\":[]}],\"f\":[],\"v\":{}}","Time":"2020-12-09 08:59::02+0200","TTL":60}

This sounds as if you were trying to flash a device that is or has been part of a product and hence the device will return to its product firmware as soon it goes online again.

If you want to flash non-product firmware to such a device you first have to set it free from the product.

You also forgot to mention from what device OS version you intent to go to.

This could be an alternative reason for the observed behaviour:
If you have some application firmware on the device that requires a device OS version not supported by your device OS branch the device will make sure that the feature-set required for the application will be provided by the device OS on the board.

1 Like

Thanks for answer!
Device OS 2.0.0-rc.4
I don't know how to set it free from the product if it is the reason.

Have you got a product in console.particle.io/products?
If so, click on that. There you should find the devices assigned to that product with an option to remove any given device from it.

1 Like


I didn’t have any products

You could try this

  • put the device in DFU Mode
  • run particle flash --usb tinker -v
  • run particle update -v

After that your device should stay on 2.0.0 with Tinker (targeted at common denominator device OS version) and not auto-update anything.

Once that is established you have excluded the “product” theory.

Then you can try to flash your own code again and see whether the problem comes back.

Device-OS version is 2.0.0 after update. But after we installed our user code, the Device-OS version is 2.0.0-rc.4.

code in out main.cpp is the next:

#include "Particle.h"

TCPClient client;
byte mac[6];
SerialLogHandler logHandler;

void setup()
{
    Serial.begin(9600);
    waitFor(Serial.isConnected, 30000);
}

void loop()
{

}

run commands via shell script:

echo start
particle usb dfu e00fce68300279b8bd04d2d2
make all PLATFORM=argon -s program-dfu
sleep 2.5
particle compile argon particle --saveTo particle.bin
particle usb dfu e00fce68300279b8bd04d2d2
particle flash --usb particle.bin

Are you flashing a monolithic firmware or calling Particle: Flash application and DeviceOS (local) (if using Particle Workbench) or such?

And for clarification, why are you using that branch and not the actual release firmware?
Have you checked the change log whether the 2.0.0 release already covers that base?

Can you run particle serial inspect after particle update -v (installing 2.0.0) but before flashing your code?
Then after flashing your code again.
Also particle binary inspect particle.bin of your application and post the respective logs here.
And what size is your binary?

1 Like

result of particle binary inspect particle.bin

particle.bin
 CRC is ok (c60984de)
 Compiled for argon
 This is an application module number 1 at version 6
 It depends on a system module number 1 at version 2008

result of particle serial inspect
Could not get inspect device: Serial timed out
I thought that particle serial inspect doesn't work with gen3

why are you using that branch and not the actual release firmware?

Which branch can I use for argon gen3?

Are you flashing a monolithic firmware or calling Particle: Flash application and DeviceOS

I flash Device OS by using
make all PLATFORM=argon -s program-dfu
And flash user code by using

particle compile argon particle --saveTo particle.bin
particle usb dfu e00fce68300279b8bd04d2d2
particle flash --usb particle.bin

size of particle.bin 13.376 bytes

So, we try to use release branch and it’s already works :slight_smile: Maybe some part was not installed or updated properly before. Thanks for help.

1 Like