Friday 18 November 2016

Particle Photon Firmware Dev Get Started Part: ARM GCC Compiler Not Found Issue


I followed this link to install my ARM GCC Toolchain:

And I followed this link to start Photon Firmware development:

BUT I stuck at:
make clean all PLATFORM=photon -s program-dfu
And I get:

/bin/sh: 1: arm-none-eabi-gcc: not found
../build/arm-tools.mk:43: *** "ARM gcc version 4.8.4 or later required, but found ".  Stop.

This is mentioned in the Common Error and the provided solution is to export the PATH. However, at the end of the first Link above, it mentions that it would be better not to do that. So here is my solution:

(1) Locate file ../build/arm-tools.mk from firmware/modules
We can see all we need to fix is to indicate GCC_ARM_PATH

(2) At the top there is a line : include $(COMMON_BUILD)/common-tools.mk
GCC_ARM_PATH must be in there.

(3) open file ../build/common-tools.mk
We can see:
# GCC_ARM_PATH can be defined to be the path of the GCC ARM compiler,
# It must include a final slash! Default is empty

So I defined right here:
GCC_ARM_PATH = /usr/local/gcc-arm-none-eabi-5_4-2016q3/bin/


No comments:

Post a Comment