Local build of Photon firmware freezes

I’m having issues getting the photon firmware to compile. It’s worked in the past but it’s been a few months since I last tried. Compiling from the module folder never finishes (I let it run all last night).

It seems to lock up the first time it runs the ARM GCC Archiver:

This morning I tried figuring out if anything in my tool chain had inadvertently changed.

Checked my toolchain (Tried reinstalling MinGW)

Checked my path (Highest first)

C:\utilities\GNU Tools ARM Embedded\4.9 2015q2\bin;C:\MinGW\bin;C:\utilities\GnuWin32\bin;C:\MinGW\msys\1.0\bin;

Started with a fresh repository and checkout of develop branch

git clone https://github.com/spark/firmware.git
cd firmware
git checkout develop

Then a build from the modules folder

cd modules
make clean all PLATFORM=photon program-dfu

Anyone ever seen this or have any suggestions on what to check?

If you want to build the develop branch you’d need to write this

make clean all PLATFORM=photon PARTICLE_DEVELOP=1 program-dfu

The thing with develop is that it’s not guarantied to fully work at any given time. By setting the above switch you acknowledge to be aware of this.
Maybe you do another git pull and retry, or if you don’t need develop try git checkout latest which is guarantied to work.

@ScruffR, Thanks for the advice on using latest. It builds without a problem, didn’t even think about trying that. :stuck_out_tongue:

I also have PARTICLE_DEVELOP as an environment variable but tried running the full command just to make sure it was pulling it in. Develop branch still doesn’t build. Don’t know why it doesn’t throw an error and just hangs.

I’ll have to have a try too - I pulled develop just yesterday and it built fine.

For me it builds just fine (although I’ve left out program-dfu which makes no difference for the build anyway)

Try compiling in the folder named main

@kennethlimcp, tried in main and still won’t compile. latest compiles from main but develop does not.

Gets stuck at:

Building target: ../build/target/user/platform-6-m/src/libuser.a
Invoking: ARM GCC Archiver
mkdir -p ../build/target/user/platform-6-m/src/
arm-none-eabi-gcc-ar -cr ../build/target/user/platform-6-m/src/libuser.a ../build/target/user/platform-6-m/src/src/application.o

Kinda strange. I’m good just working off latest now but it would be nice to figure out what changed.

Started digging into it: Looks like build tools have changed in develop vs latest

This may be changing what archiver it is pointing to. I’ll keep digging and update soon.

Compiles just fine if the only thing I change in the develop branch is from:


back to:


Assuming this changes from pointing from arm-none-eabi-ar.exe to arm-none-eabi-gcc-ar.exe but other than that I don’t know why it fixes it.

You beat me to it! I was going to suggest that change - it’s there to support ARM GCC 5.2.1. I’ll double check with the developer to find out why the change was needed and if we can find an alternative solution that doesn’t use gcc-ar.