I wanted to move the examples to the Workbench IDE as projects by creating projects for each so that I would not to use the Electron’s SIM minutes and to test the environment. I am working on a Linux system. The WebIDE flashes the examples properly. I copy the source code of a WebIDE example to the file created under the SRC directory of the project. I can compile and flash via the CLI command this file, but not this MotionPublish.bin . Neither the flash button or the >Particle: Compile application(local) command flash properly. Result is the magenta and blue LED are pulsing. I would like to get the IDE compiles to work properly. The correct device is set and the latest compiler is selected. The tools for the first example
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$ particle serial flash MotionPublish.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: MotionPublish.bin
Error writing firmware: Transfer cancelled
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$ cd ..
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish$ particle serial flash electron_firmware_1554824674527.bin
! PROTIP: Hold the SETUP button on your device until it blinks blue!
? Press ENTER when your device is blinking BLUE
sending file: electron_firmware_1554824674527.bin
$ Flash success!
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish
Run a check particle binary inspect MotionPublish.bin, particle binary inspect electron_firmware_1554824674527.bin and particle serial inspect (with the Electron in Listening Mode) and post all three results here.
BTW, you have two binaries MotionPublish.bin and electron_firmware_1554824674527.bin.
Why and which is the correct one?
electron_firmware_1554824674527.bin works, but is not generated by the Workbench IDE compile. It may have come from a cloud compile I ran. MotionPublish.bin is generated by the compile. There is also a MotionPublish.dfu file generated by the flash button compile.
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish$ particle binary inspect electron_firmware_1554824674527.bin
electron_firmware_1554824674527.bin
CRC is ok (3dadb2bd)
Compiled for electron
This is an application module number 1 at version 5
It depends on a system module number 2 at version 1002
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish$
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$ particle binary inspect MotionPublish.bin
MotionPublish.bin
CRC is ok (cb5a7134)
Compiled for photon
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$ particle serial inspect
Platform: 10 - Electron
Modules
Bootloader module #0 - version 201, main location, 16384 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 1002, main location, 131072 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #3 - version 1002
System module #2 - version 1002, main location, 131072 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #1 - version 1002
Bootloader module #0 - version 201
System module #3 - version 1002, main location, 131072 bytes max size
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 110
User module #1 - version 5, main location, 131072 bytes max size
UUID: A4038BFFABB6705AE32A51365B7D9A36801ECE59ED7FE171C88CBDEDC7D4DBF4
Integrity: PASS
Address Range: PASS
Platform: PASS
Dependencies: PASS
System module #2 - version 1002
empty - factory location, 131072 bytes max size
john@john-Precision-M4600:~/ProjectsforParticleIO/WorkspacesLocal/MotionPublish/target$
So just to recheck, again I selected the electron device via Particle: Configure Workspace for Device and select Electron. The indicator at the bottom of the screen shows Electron and the correct device name of EI. Yet I still get the same results blue and red magenta. I don’t know of any other way to select the Electron. I think it is selecting the photon to compile in spite of Electron being selected.
Try Particle: Clean application (local) and then build via Particle: Compile application (local) and run particle binary inspect again for the new binary (you may remove the target folder before compiling).
Can you also post a screenshot of your Workbench status bar?
I deleted the files in the target folder, cleaned application (local), and compiled application (local) and then flashed application (local). Then it worked. Then I flashed again using the flash upper right-hand corner button and it worked.
So when copying an application to a new project to the source folder, one must be sure to Particle: Configure Workspace for Device and Particle: Clean application (local). Alternatively the device can be selected from the status bar.
Thanks much.