Error while building firmware

I’m getting an error while building Photon firmware with “make PLATFORM=photon”

src/protocol_defs.h:3:22: fatal error: functional: No such file or directory
#include

if I perform make in /firmware/main folder following error occurs:

…/wiring/inc/spark_wiring_constants.h:31:23: fatal error: type_traits: No such file or directory
#include <type_traits>

I have followed all prerequisites and dependencies instructions:
arm-none-eabi-gcc (15:4.9.3+svn227297-1) 4.9.3 20150529 (prerelease)
OS is Ubuntu 15.10

Thank you

Normally you build from the modules directory. You can’t really cd into arbitrary directory and build it, because not everything will be set up properly.

cd modules
make clean all PLATFORM=photon
1 Like

Try make clean all PLATFORM=photon
If you want to use the develop branch, you’d also need to add PARTICLE_DEVELOP=1

Thanks for your replies,

running make from modules folder gives the same result.
Here the output of make command:

http://paste.ubuntu.com/15230603/

Thanks again

I’d double check your gcc-arm toolchain installation. functional is a toolchain header, not a Particle header.

$ cd /usr/local/bin/gcc-arm/
$ find . -name functional -print
./arm-none-eabi/include/c++/5.2.1/experimental/functional
./arm-none-eabi/include/c++/5.2.1/ext/functional
./arm-none-eabi/include/c++/5.2.1/functional
./arm-none-eabi/include/c++/5.2.1/tr1/functional
1 Like

Hi rickkas7,

it was effectively a toolchain issue. I installed mantained package of arm-none-eabi-gcc and not the embedded one as described in prerequisites. Package is not available for Ubuntu 15.10 so I switched to 14.04 and everything now works fine.

Thank you again

1 Like