I am trying to build the Firmware for Photon. For that I cloned core-firmware, core-communication-lib and core-common-lib repositories. I also downloaded and install/setup ‘make’ and GNU toolchain for Windows7 . Then I go to core-firmware/build directory and run make command. But it is giving me following error:
make: *** No targets specified and no makefile found. Stop.
This error seems obvious as there is not Makefile present in that directory. Please note, I got this direction from some document. Then I go to the core-firmware/main directory and run ‘make clean all PLATFORM=photon’, but I am getting following error:
@dhaval, for the Photon, you need to clone the develop branch and make sure you have the entire toolchain installed. The Photon firmware is comprised of a system firmware part and a user firmware part. To compile the system firmware go to the modules directory and make from there. For example, to compile the latest develop firmware and flash it to a Photon via DFU:
make clean all PARTICLE_DEVELOP=1 PLATFORM=photon program-dfu
This assumes you have a Photon connected via USB and in DFU mode (flashing yello).
To compile your app, you will find a user\application directory (under the main firmware directory). There you can create a directory and put all the files you want to compile (including libraries, etc) into that directory (no sub-directories). Then to make and flash your code to a Photon in DFU mode:
make clean all PARTICLE_DEVELOP=1 PLATFORM=photon program-dfu APP=appname
where appname is the name of the directory where you placed your files to compile.
I got it… I want to build the firmware for Photon hardware, not for the CORE. I download checkout the firmware from ‘https://github.com/spark/core-firmware.git’. Is it correct?
I want to trace the function call for analogRead() in this firmware. Can you please help me on that?
Do you get any other error or like something about stat.exe failing?
I had this once (or still have it, if I use a wrong CMD instance) and it was a problem with the PATH.
Have a look at your PATH if something looks fishy (e.g. double entries).
You could also try this installer (maybe after you removed any previous toolchain - including PATH entries)