Toolchain for Windows Installer

Your installer saved me a bunch of time - THANKS!

Quick question: In your v0.4.3a update notes you mention “Added Update capability” What is this?

@mumblepins, Thank you so much for taking the time to make that installer, and sharing it with the rest of us!
It is friggen awesome!

I made a video to do the same long ago, but this is far, far better.

After being away from Spark/Particle for a long time now I am getting back into with with my Photon. I looked into this and everything I have tried has not worked until I bumped into your post here.

I do have one question that for one reason or another I have not quite figured out yet, and that is how to set up netbeans for compiling my app. I am not sure if I should tell it to use the makefile in the Main folder or the user folder.
Might you have any explanation how to go through this process to create a new project ?

1 Like

He already has a project. You just need to open it and build it.

I can’t remember the location in the folder structure. I am on my phone …

Waring: noob

Thank You @mumblepins for this loader.

I have used the on-line IDE and the ATOM IDE and was able to download code to my Photon.
I am now lost on how to down load code in this configuration.

Is there a web page that has instructions on how to download code ?
Even better, is there a way to link this local compiler to the ATOM IDE ?

I am not interested in modifying the base firmware, I want to be able to use the updated libraries that will not be updated to the on-line IDE for awhile yet.

Thank You

Which directory is this project located ?

Unless you want to change the system code, or desperately want to use the latest version of it, you shouldn't have to compile locally. Using the Particle Dev will allow you to use any directory you like. Simply copy & paste them in :slight_smile:

I could not understand/make work my previous install on another machine work.
So I started again on another machine that has never has any of the components installed before.

It appears everything has installed OK, but the compile does not work.

If someone can help me decode the message I get, maybe there is still has a chance for this working for me.

I press build with clean and I get these messages:

C:/Particle/toolchain/Make/bin/make -C …/modules/photon/user-part clean
2 [main] sh 1876 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2D0000) != child(0x3D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 780 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2D0000) != child(0x3D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 1776 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2D0000) != child(0x5D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 4812 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2D0000) != child(0x5D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 2116 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x2D0000) != child(0x390000)
/usr/bin/sh: fork: Resource temporarily unavailable
2 [main] sh 4756 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 5972 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x510000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 4828 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 5136 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 3332 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000)
/usr/bin/sh: fork: Resource temporarily unavailable
2 [main] sh 4808 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x3D0000) != child(0x370000)
/usr/bin/sh: fork: retry: No child processes
2 [main] sh 912 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x3D0000) != child(0x370000)
/usr/bin/sh: fork: retry: Resource temporarily unavailable
2 [main] sh 2580 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x3D0000) != child(0x380000)
/usr/bin/sh: fork: retry: No child processes
make[1]: Entering directory C:/Particle/firmware/modules/photon/user-part' C:/Particle/toolchain/Make/bin/make -C ../../../user clean 2 [main] sh 2680 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x350000) != child(0x310000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 2340 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x350000) != child(0x510000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 6016 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x350000) != child(0x3D0000) /usr/bin/sh: fork: retry: No child processes 3 [main] sh 1164 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x350000) != child(0x390000) /usr/bin/sh: fork: retry: No child processes 3 [main] sh 4900 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x350000) != child(0x510000) /usr/bin/sh: fork: Resource temporarily unavailable 505 [main] sh 3284 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x510000) != child(0x4D0000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 2672 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 1208 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x3D0000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 400 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x310000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 4920 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x510000) /usr/bin/sh: fork: retry: No child processes 2 [main] sh 5648 child_info_fork::abort: C:\Particle\Tools\Cygwin\bin\cyggcc_s-1.dll: Loaded to different address: parent(0x4D0000) != child(0x510000) /usr/bin/sh: fork: Resource temporarily unavailable C:/Particle/firmware/build/arm-tools.mk:42: *** "ARM gcc version 4.8.4 or later required, but found ". Stop. make[1]: *** [clean_user] Error 2 make: *** [clean_modules/photon/user-part] Error 2 make[2]: Entering directoryC:/Particle/firmware/user’
make[2]: Leaving directory C:/Particle/firmware/user' make[1]: Leaving directoryC:/Particle/firmware/modules/photon/user-part’

CLEAN FAILED (exit value 2, total time: 1m 8s)

I hope there is something obvious to someone here.

Don

PS: This is a Win10 machine

You should be in the main folder

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 ?

Thanks

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:

Thanx!!

Minor thread necromancy here, but I noticed that the msys-make was starting quite slowly.
Googling yielded this: http://stackoverflow.com/questions/8571657/mingw-make-starts-very-slowly

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.

Thanks!

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:

1 Like

@kennethlimcp @mumblepins @Moors7

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

The error message is : Mingw.zip - 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 Mingw.zip 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 https://github.com/spark/firmware.git 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 https://github.com/spark 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.