For windows 7 users, compiling locally, how I got it to work.
Before you begin remove the following packages, if installed:
Gcc compilers,
make,
node.js,
dfu-util,
with Zadig:libusbK (v3.0.7.0).
reboot.
Yeah a bit drastic but necessary to clean up.
Software:
download node.js, to the default directory, Program Files (x86\nodejs
install Toolchain from @mumblepins
Driver: install spark_core.inf
Now the tricky part:
Edit with eveditor the user path.
add:
C:\Particle\Tools\Git\cmd;
C:\Program Files (x86)\nodejs\;
C:\Particle\Toolchain\MinGW;
C:\Particle\Toolchain\MinGW\msys\1.0\bin;
C:\Particle\Tools\DFU-util;
C:\particle\Toolchain\GCC-ARM\bin;
C:\particle\Toolchain\Make\bin;
C:\Particle\Tools\Git\cmd;
Why? even if you do this from the command line, or via an installer the path will not be altered, some of the times. That behaviour costed me a lot of time.
Next: set the following USER environment variables with evedit:
PLATFORM = photon
PLATFORM_NAME = photon
PYTHON = C:\Particle\Tools\Python27
PYTHON_PATH = C:\Particle\Tools\Python27
It sounds like doing things double, maybe, but it works.
Save variables with the SET ‘button’ left mid of the screen of eveditor
Exit
REBOOT
And then automagically:
- Particle command line interface works.
- DFU-util works.
- Compile from command window with particle works.
- Compiling of the complete source from C:\particle\firmware works (make clean all)
However:
I could not tame Netbeans. As soon as the compiler is invoked it start’s to wine that it can not find a file. This is the error message:
make.exe[3]: Entering directory `C:/Particle/firmware/user'
Building file: src/application.cpp
Invoking: ARM GCC CPP Compiler
mkdir -p ../build/target/user/platform-6-m/src/src/
arm-none-eabi-gcc
...... I cut out the flags to save space .....
-fno-exceptions -fno-rtti -fcheck-new -c -o ../build/target/user/platform-6-m/src/src/application.o src/application.cpp
arm-none-eabi-gcc: error: CreateProcess: No such file or directory
make.exe[3]: *** [../build/target/user/platform-6-m/src/src/application.o] Fel 1
make.exe[3]: Leaving directory `C:/Particle/firmware/user'
make.exe[2]: *** [user] Fel 2
make.exe[2]: Leaving directory `C:/Particle/firmware/modules/photon/user-part'
make.exe[1]: *** [modules/photon/user-part] Fel 2
make.exe[1]: Leaving directory `C:/Particle/firmware/main'
make.exe : *** [main] Fel 2
BUILD FAILED (exit value 2, total time: 18s)
My make.exe decided to speak swedish, so don’t mind the ‘Fel’
If anyone can help from this point on, please let me know.
And a question to more experienced makefile guru’s:
I would like to have a rule that compiles and links only the user part. See the makefile in Particle\firmware
I hope this helps others to get going in Windows, hmm a contradiction in terms, I know…