Linker Error: nonconstant expression for origin

Hello,

I am attempting to pull in the latest 0.7.0-rc.1 firmware into my local build. I have been successfully using 0.6.1 firmware. After performing:

git pull https://github.com/spark/firmware.git develop

into my local develop branch (I had to fix a small merge conflict in build/checks.mk) , and then attempting:

make PLATFORM=P1 APP=local_build clean all

I see the error:

... ./linker.ld:5: nonconstant expression for origin collect2.exe: error: ld returned 1 exit status make[1]: *** [../../../build/target/user-part/platform-8-m/wake.elf] Error 1 make[1]: Leaving directory `C:/firmware/modules/photon/user-part' make: *** [C:/firmware/modules/photon/user-part/makefile] Error 2

Is it possible my gcc toolchain is out of date?

Thank you.

If you want to build the develop branch you also need to say so in the build command PARTICLE_DEVELOP=1
https://github.com/spark/firmware/blob/develop/docs/build.md#building-the-develop-branch

Yes, you need to upgrade to gcc-arm 0.5.3 with the latest 0.7.0 or develop.

2 Likes