# Flash binary without re-compile

**URL:** <https://community.particle.io/t/flash-binary-without-re-compile/16986>\
**Category:** General\
**Created:** [October 29, 2015, 3:38pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986 "2015-10-29T15:38:47Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![GrahamS](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@GrahamS](https://community.particle.io/u/GrahamS)\
**Post date:** [October 29, 2015, 3:38pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/1 "2015-10-29T15:38:47Z")

</div>

Hi,  
OK so I am quite happy compiling code using the Dev environment. Then I can flash into my USB-connected Photon - all goes very well.

BUT - it seems that there is then no way to send that same binary image to another Photon - withut plugging it into my USB ???. Seems I have to re-compile it every time 😮

So - OK its probably me - and I must be missing something…but I ‘think’ I have looked everywhere I can think of ???.

The problem is of course compounded if I have a version of code built with a previous firmware release (like 0.4.6 for example) as the Web IDE is the only (as yet) environment where I can define the firmware to build against ??.

What (I think) we really need is to be able to tell CLI particle flash xxxxx mycode.bin  
but it doesn’t work ☹

Don’t get me wrong - I think the Photon is a wondrous beast, and want to deploy more of them…LOTS more 😉

Thing is that I have a colleague who is testing the ‘product’ before making it live - so I need to send him a binary and say put this into all your test boards…currently he needs to plug each one into a USB 😮

Many Thanks  
BR  
Graham

---

<div class="post-metadata">

**Author:** ![bko](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/bko/32/20704_2.png) [@bko](https://community.particle.io/u/bko)\
**Post date:** [October 29, 2015, 3:42pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/2 "2015-10-29T15:42:27Z")

</div>

If you don’t want to flash via DFU-Util, you can do it over the air. Please read the doc here:

[https://docs.particle.io/reference/api/#flash-a-device-with-a-pre-compiled-binary](https://docs.particle.io/reference/api/#flash-a-device-with-a-pre-compiled-binary)

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 29, 2015, 3:50pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/4 "2015-10-29T15:50:36Z")

</div>

> [@GrahamS](#):
>
> What (I think) we really need is to be able to tell CLI _ **particle flash xxxxx mycode.bin** _

I can't quite follow this.  
If I enter `particle flash` I get this response

> [@](#):
>
> NAME:  
> particle flash
> 
> DOES:  
> flash remotely pushes a compiled firmware binary to one of your devices over the air, or directly  
> over USB / dfu. If you send it one or more source files, or a directory of source, it will compile  
> that remotely first, and push the compiled binary to your device instead, or in the case of code errors  
> will show you the errors from the server.
> 
> ```
> You can also substitute "tinker", "voodoo", or "cc3000" to flash the provided app.
> 
> particle flash --usb tinker
> particle flash my_device tinker
> 
> ```
> 
> USE:  
> _**particle flash [--usb or device\_id] firmware.bin**_  
> particle flash [--usb or device\_id] source\_folder  
> particle flash [--usb or device\_id] file1.ino file2.cpp file2.h file3.cpp

---

<div class="post-metadata">

**Author:** ![GrahamS](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@GrahamS](https://community.particle.io/u/GrahamS)\
**Post date:** [October 29, 2015, 4:32pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/5 "2015-10-29T16:32:35Z")

</div>

Hi,  
Yup I just managed to do it :-O. The first few times I tried it didn’t seem to work :-O.

Sorry I seem to have been talking out of my \*\*\*\* 😮

Mind you I also just had a 'mare getting some variables registered on the same module. Kept loading the code and it just didn’t seem to do it - nor did it report a failure…theres a Gremlin in my code somewhere…

Sorry to have bothered you again - I did try quite a few times though - honest guv’…

Mind you - your doc tells me a different way :-O.

Are you sure you didn’t just change this feature :-O. I swear that an hour or two back the following did not work !! - hence my post…

CLI particle flash xxxx mycode.bin

Now it works like a charm ;-)).

If you didn’t change it - I’m going mad - if you did GREAT - MANY THANKS 😉

Pity the evidence scrolled off my CMD window …

BR  
Graham

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [October 29, 2015, 4:36pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/6 "2015-10-29T16:36:43Z")

</div>

Has been there as long I know CLI 😉

---

<div class="post-metadata">

**Author:** ![GrahamS](https://avatars.discourse-cdn.com/v4/letter/g/7feea3/32.png) [@GrahamS](https://community.particle.io/u/GrahamS)\
**Post date:** [October 29, 2015, 4:46pm UTC](https://community.particle.io/t/flash-binary-without-re-compile/16986/7 "2015-10-29T16:46:38Z")

</div>

Hi,

So sorry - I tried this quite a few times some time back and gave up - then again this afternoon and it still didn’t seem to work.

Looks like I have 8 major problems then - 4 on each hand ☹

Thanks once again…

BR  
Graham
