Particle Desktop IDE send old firmware

Hi,
I having a problem when I use the Particle Desktop IDE(win10).
I make a change to a file, saves it and click “Compile and upload code using cloud”. When the firmware loads on the photon, it doesn’t include the latest changes.
I have to run the compile and upload once again to get the recent changes onto the device. Any one knows about this problem?
Br, Martin

That’s probably an issue addressed multiple times in that forum:

Desktop IDE does not care what file you edit but only what project folder you opened with the dedicated Open Folder ... menu.

1 Like

Yes. Organization is key.

There are a number of tips for using Particle Dev (Atom IDE) here:

Hi, I have tried to serach the forumt without any solution to my problem. It is not because of having another project open.
It might be because I use a struture like this (please, this is just an exmple of code, not my actuall logic)

#define setting1 
//#define setting2
    #ifdef setting1 
		// Particle Config1
		STARTUP(WiFi.selectAntenna(ANT_AUTO));

	#endif
    #ifdef setting2 
		// Particle Config2
		STARTUP(WiFi.selectAntenna(ANT_EXTERNAL));

	#endif

When I make a change to my #define setting1 vs #define setting2 I have to compile/download it twice.

Does the little blue dot next to the filename in the tab go away when you save? There was a problem in the past where the Save item didn’t always save.

If you try to deliberately add an obvious syntax error, does the compiler complain?

Hi, sorry for long delay with my replay.
Yes, to blue dot goes away.
If I add some syntax error I get an error right away.
Quit often I get “unexpected end of multipart data” end the firmware dosn’t flash at all, but if I click “compile in cloud and download” again the firmware download starts immediately(without compiling).

I’ve got the same thing going on here with a photon running 0.7.0. It’s a single source file (.ino) using the Project->src->file tree structure. I click on the lightning bolt to compile in cloud and upload. The compile is successful, I watch the device on my desktop go through it’s update process and I don’t have a new image.

The blue dot on the file goes away.
The compile is successful
The compile will show a syntax error immediately
I can close and open the dev app with no changes.
Created new projects as well.

There are a few simple ways to see this:
Set the D7 pin as an output and turn it on in the loop function and download. Then comment out the line that turns on the output. You can see the LED retain it’s previous setting until the 2nd download.
Or you can register a function or variable and then goto the particle console and refresh the Functions/Variables.

I’ve uploaded the simple .ino I use to make this happen. I’m using the latest desktop dev (downloaded last week.) in Atom 1.19.

/*
 * Project Simple
 * Description:
 * Author:
 * Date:
 */

/// lets play with the analog inputs.
int AssetPowerLedPin = D7;
bool AssetPowerIsOn = false;

 SYSTEM_MODE(AUTOMATIC);

 /* This function is called once at start up ----------------------------------*/
 void setup()
 {
    Particle.variable( "AssetPower", AssetPowerIsOn );

    pinMode( AssetPowerLedPin, OUTPUT );
 }

 /* This function loops forever --------------------------------------------*/
void loop()
{
  //This will run in a loop

  //digitalWrite( AssetPowerLedPin, HIGH );
}

You may have an incompatible bootloader on your device.

Post the output of particle serial inspect

I’m going to need more information on how Serial Inspect works, preferably explicit instructions, as I keep getting the same error:

PS C:\Users\xxx\AppData\Local\particle> particle serial inspect
Could not get inspect device: Serial timed out

I’m running Particle CLI 1.35.2

However some serial commands do seem to work:

PS C:\Users\xxx\AppData\Local\particle> particle serial list
Found 1 device connected via serial:
COM6 - Photon
PS C:\Users\xxx\AppData\Local\particle> particle serial monitor
Opening serial monitor for com port: "COM6"
Serial monitor opened successfully:
Caught Interrupt.  Cleaning up.
Serial connection closed.

I’ve done a cursory search of the forums for more info on how to execute this command and found nothing that gets me any further.
I’ve also looked in the reference docs Serial Docs and noticed that the docs are missing the majority of the commands, including the one you’d like me to execute. i.e. docs only discuss:
wifi
list
monitor
flash

PS C:\Users\xxx\AppData\Local\particle> particle serial
Simple serial interface to your devices
Usage: particle serial <command>
Help:  particle help serial <command>

Commands:
  list      Show devices connected via serial to your computer
  monitor   Connect and display messages from a device
  identify  Ask for and display device ID via serial
  wifi      Configure Wi-Fi credentials over serial
  mac       Ask for and display MAC address via serial
  inspect   Ask for and display device module information via serial
  flash     Flash firmware over serial using YMODEM protocol
  claim     Claim a device with the given claim code

Global Options:
  -v, --verbose  Increases how much logging to display                                                           [count]
  -q, --quiet    Decreases how much logging to display                                                           [count]

If you can’t get the inspect to work (which is odd - you have had the device in Listening Mode tho’?) you can just try a shot in the dark.
Download the bootloader

# in DFU Mode
particle flash --usb tinker -v
particle update
# in Listening Mode 
particle serial inspect
particle flash --serial bootloader-0.7.0-photon.bin -v

(which is odd - you have had the device in Listening Mode tho’?)

So you want the photon to be in Listening mode for this command? I tried the serial commands in both the Looking For Internet and the Connected modes. The results were the same in both (what I detailed above.)

Well there you go. Has to be in Listening mode. I’d suggest you folks take some time to update your reference documentation to avoid these issues in the future.

Here’s the data from the inspect command:

PS C:\Users\bryan.roth\AppData\Local\particle> particle serial inspect
Platform: 6 - Photon
Modules
  Bootloader module #0 - version 101, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: B267D1E3471-----------------------------28C9722D2
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 207
  empty - factory location, 131072 bytes max size

Good job that I’m not a Particle employee so I can speak my mind: “We don’t take orders but are donating our free time for the benefit of the community”

Other community members tend to express appreciation for when they get responses that try to be helpful.

Apologize for making an assumption that you were an employee, wasn’t intentional.

And as I am not an employee either, my documentation comment stands, albeit redirected to any employee that might be listening.

Again, I’m sorry that you took it personally but as it was directed toward the company I’m confused as to why you might.

To follow up:
I updated the bootloader which was successful but there appears to be no change in the output of the Inspect command (at least non that I noticed):

PS C:\Users\xxx\AppData\Local\particle> particle serial inspect
Platform: 6 - Photon
Modules
  Bootloader module #0 - version 101, main location, 16384 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #1 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
  System module #2 - version 207, main location, 262144 bytes max size
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #1 - version 207
      Bootloader module #0 - version 101
  User module #1 - version 5, main location, 131072 bytes max size
    UUID: -----
    Integrity: PASS
    Address Range: PASS
    Platform: PASS
    Dependencies: PASS
      System module #2 - version 207
  empty - factory location, 131072 bytes max size

Same download 2x problem exists.