Toolchain for Windows Installer


I am sorry, I do not understand.

I opened the project from C:\Particle\firmware as per the instructions.

How do I select the “main” folder in the Netbeans IDE ?


Ok, I now understand where “main” is.
This is compiled in a DOS window.

So, can anyone tell me why this does not work in Netbeans ?

Is there a sample project on how to compile a project in Netbeans ?



Hi @mumblepins, could you do the installer for the toolchain for Windows 7 at 64 bits? More than a question I am begging you. I am only a mortal who wants to prototype with the photons :blush: . I tried to follow @kennethlimcp steps but for x64 and now I have a lot of folders without results… :grimacing:



Minor thread necromancy here, but I noticed that the msys-make was starting quite slowly.
Googling yielded this:

Following the suggestion there, adding -r appears to have sped up make and clean operations:

make : 2m 56s
make -r : 2m 13s

clean: 49.8s
clean -r: 12.6s

Too bad Particle didn’t implement their makefiles to be completely parallel-build safe (tsk tsk), so we can’t just -j4.
(nah but this is overall a very nicely crafted piece of software!)


I get an error while downloading

I have looked at the other posts about MinGW above but this seams to be a different error but I tried to edit my path anyway but that did not help.


Is this Windows toolchain auto builder still a recommended way of installing? Any bugs that I should know about?

I just want to get started building locally but I’m not sure which instruction set will get me there with the least frustration.

I see the manual way here: [Toolchain] Windows

If anybody has taken both paths on a windows 8 machine please let me know which direction you would go if you had to start over gain.



I personally love this installer. For me it has always worked flawlessly, and has saved me a headache every now and then. Some of the included software might now not be the most recent version, but you can choose what you’d like to install :smile:


@Moors7 Thanks for the confirmation.

Did you mean to say Not instead of Now in this line:

Some of the included software might now be the most recent version, but you can choose what you’d like to install :smile:


@kennethlimcp @mumblepins @Moors7

Just tried to run the installer but I get stuck at this point:

The error message is : - Download Error. Retry?

I cancelled the install and then deselected the Mingw software so it will not download.

I assume I can manually install the into the install folder. But I have no idea where this should go.

Any advice is appreciated :smile:


My Win 10 User Path is:

and my System Path is:

So for me minGW went on root


@bpr That is very helpful! A picture is worth a thousand words. :smiley:


@RWB. Good!
This may be obvious or you may already be aware of the following but in case it helps:
There are a variety of ways you could set things up. The following works for me, may not be the best for everyone.
In my Win 10 setup, I have a folder called particle on my C: drive. I also have a subfolder off particle called appmain where I keep my application subfolders.
Note that you need to have previously installed git. Google to get git.
To get the firmware onto your computer, open the command prompt and cd to particle. The prompt should show as “c:\particle” . Type and enter "git clone develop"
This will download the firmware to the develop directory but doesn’t specify the particular firmware branch you want to use yet.
Now cd to particle\develop
Type “git checkout develop” to select the develop branch of the firmware.
(Every once in awhile- when you think the firmware repository may have changed - type “git pull” from this directory to keep it up-to-date.)

To compile an application and flash your device with it, cd to particle\develop\modules and, for example, type
"make clean all PLATFORM=electron APPDIR=…/…/appmain/electrondeepsleep TARGET_DIR=…/…/appmain/electrondeepsleep/target/ PARTICLE_DEVELOP=1 LTO=n program-dfu v=1"
Note that this would compile and flash the file electrondeepsleep.cpp if you have such an application in the particle\appmain\electrondeepsleep folder.
Note also that your device needs to be in dfu mode (flashing yellow) in order to flash the device.
Also note that with local build you must have #include “application.h” at the beginning of your application.
The docs at describe various permutations you can explore.
After you’re sure the base firmware is correctly flashed to your device you can instead run the above make command line from c:\particle\develop\main which will only compile and flash the new application code and thus be a lot quicker.


I’m not trying to hijack this thread, but since so many people are watching it… is there a Mac equivalent thread?


I’ve been out of touch with this for quite a while, but I see that people still use this, so I thought I’d update it some (while procrastinating PhD writing :-P). I’ve split the installer into two parts now, as the CLI and Toolchain are really quite independent. So, notes on the goods:

  • For everything, install defaults to C:\Particle
  • CLI Installer
    • Source
    • basically just installs NodeJS, the CLI itself, DFU-util, and downloads Zadig for your driver replacement pleasure. Puts everything in %InstallDir%\Tools\
  • Toolchain Installer
  • Source
  • Components:
    • Toolchain (GCC arm 4.9.3 right now, as 5 was giving trouble) and build tools (Includes make for windows, and mingw)
    • Git
    • Netbeans, with JDK and a NB project ready to go

Some other notes:

  • Tested with Win7 and Win10 blank virtual machines, so YMMV with other programs already installed.
  • I removed the default setup for the Netbeans compiler setup, as different versions of Netbeans kept screwing it up and it was easier to make a video showing the process (Note: May need to switch “Tool Collection Family” to Cygwin)
  • Cygwin may not be needed in Windows 7 for a successful build. Also, if you want to just build on Win10 without Cygwin, you may have to run a MSYS shell to be able to build successfully. I was getting an error in the CRC32 call in the build.

Unable to claim Photon
TV Bed Photon Control

@RWB, the default way the installer works is to unzip the MinGW-get folder (not the mingw-get installer) to the C:\particle\toolchain\mingw folder, and then run mingw-get.exe install mingw32-base mingw32-gcc-g++ msys-make mingw-developer-toolkit from the mingw\bin folder. Then $INSTDIR\Toolchain\MinGW and $INSTDIR\Toolchain\MinGW\msys\1.0\bin get added to the path. I’m guessing though, that the new installer should help, along with the updated sources list that it looks at. I’ll try to stay on the updates of at least the sources more :slight_smile:


@BulldogLowell, Mac setup should be pretty straightforward. For the toolchain itself, I’d follow the homebrew recommendation on the Github page. This page has a nice overview of how to get Make on OSX. Netbeans is available for OSX, and I’m pretty sure that the toolchain settings would be similar (though you’d need to find the right directory under /usr/local for the compilers)


Added to the Command Line Guide in the docs, thanks @mumblepins!!


is there a way to re-install everything included in the installer. I deleted a directory and the installer skips the files saying that these were already installed.


I’m not positive about this, but I’m pretty sure that if you run the uninstaller located in the root directory of where you installed the stuff, that should delete the registry entries that are make it think that those things are still there.

If you don’t want to do that or it doesn’t work, delete the registry key at:




Thank you! Removing the registry key worked.

but i get this error in NetBeans

cd 'C:\Particle\firmware'
C:\Particle\Toolchain\Make\bin\make.exe clean PLATFORM=photon
Building firmware for Production Photon, platform ID: 6, product ID: 6
/C/Particle/Toolchain/Make/bin/make.exe -C ./communication clean
process_begin: CreateProcess(NULL, /C/Particle/Toolchain/Make/bin/make.exe -C ./communication clean, ...) failed.
make (e=2): The system cannot find the file specified.

make: *** [clean_communication] Error 2

CLEAN FAILED (exit value 2, total time: 110ms)

Figured it out! spell error “ParticleToolChain” -UPDATE