Dev Compile Works, CLI Compile Fails (FastLED?)

particle-cli Version 1.14.2
Particle Dev Version: 1.7.3
Mac OSX 10.11.5

I have a project that compiles fine in Dev, but fails when using cli. I can compile a bare minimum sketch fine using cli. My project is using FastLED and when I add the FastLED folder to a bare minimum sketch it fails, so I believe that is the issue. Just not sure how cli/dev differ with compilation.

Anybody know what’s going on or how I can get a more detailed error message?

particle compile photon .

Compiling code for photon

Including:
    /Users/User/Code/PhotonTest/test.ino
    /Users/User/Code/PhotonTest/FastLED/bitswap.h
    /Users/User/Code/PhotonTest/FastLED/chipsets.h
    /Users/User/Code/PhotonTest/FastLED/clockless_arm_stm32.h
    /Users/User/Code/PhotonTest/FastLED/color.h
    /Users/User/Code/PhotonTest/FastLED/colorpalettes.h
    /Users/User/Code/PhotonTest/FastLED/colorutils.h
    /Users/User/Code/PhotonTest/FastLED/controller.h
    /Users/User/Code/PhotonTest/FastLED/delay.h
    /Users/User/Code/PhotonTest/FastLED/dmx.h
    /Users/User/Code/PhotonTest/FastLED/fastled_arm_stm32.h
    /Users/User/Code/PhotonTest/FastLED/fastled_config.h
    /Users/User/Code/PhotonTest/FastLED/FastLED.h
    /Users/User/Code/PhotonTest/FastLED/fastpin_arm_stm32.h
    /Users/User/Code/PhotonTest/FastLED/fastpin.h
    /Users/User/Code/PhotonTest/FastLED/fastspi_bitbang.h
    /Users/User/Code/PhotonTest/FastLED/fastspi_dma.h
    /Users/User/Code/PhotonTest/FastLED/FastSPI_LED2.h
    /Users/User/Code/PhotonTest/FastLED/fastspi_nop.h
    /Users/User/Code/PhotonTest/FastLED/fastspi_ref.h
    /Users/User/Code/PhotonTest/FastLED/fastspi_types.h
    /Users/User/Code/PhotonTest/FastLED/fastspi.h
    /Users/User/Code/PhotonTest/FastLED/hsv2rgb.h
    /Users/User/Code/PhotonTest/FastLED/led_sysdefs_arm_stm32.h
    /Users/User/Code/PhotonTest/FastLED/led_sysdefs.h
    /Users/User/Code/PhotonTest/FastLED/lib8tion.h
    /Users/User/Code/PhotonTest/FastLED/noise.h
    /Users/User/Code/PhotonTest/FastLED/pixeltypes.h
    /Users/User/Code/PhotonTest/FastLED/platforms.h
    /Users/User/Code/PhotonTest/FastLED/power_mgt.h
    /Users/User/Code/PhotonTest/FastLED/colorpalettes.cpp
    /Users/User/Code/PhotonTest/FastLED/colorutils.cpp
    /Users/User/Code/PhotonTest/FastLED/FastLED.cpp
    /Users/User/Code/PhotonTest/FastLED/hsv2rgb.cpp
    /Users/User/Code/PhotonTest/FastLED/lib8tion.cpp
    /Users/User/Code/PhotonTest/FastLED/noise.cpp
    /Users/User/Code/PhotonTest/FastLED/power_mgt.cpp
    /Users/User/Code/PhotonTest/FastLED/wiring.cpp
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/clockless_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/clockless_block_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/fastled_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/fastpin_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/fastspi_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/led_sysdefs_arm_k20.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/octows2811_controller.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k20/smartmatrix_t3.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k26/clockless_arm_k26.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k26/fastled_arm_k26.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k26/fastpin_arm_k26.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k26/fastspi_arm_k26.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/k26/led_sysdefs_arm_k26.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/clockless_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/clockless_block_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/fastled_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/fastpin_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/fastspi_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/arm/sam/led_sysdefs_arm_sam.h
    /Users/User/Code/PhotonTest/FastLED/platforms/avr/clockless_trinket.h
    /Users/User/Code/PhotonTest/FastLED/platforms/avr/fastled_avr.h
    /Users/User/Code/PhotonTest/FastLED/platforms/avr/fastpin_avr.h
    /Users/User/Code/PhotonTest/FastLED/platforms/avr/fastspi_avr.h
    /Users/User/Code/PhotonTest/FastLED/platforms/avr/led_sysdefs_avr.h
attempting to compile firmware
Compile failed. Exiting.

That looks like a lot of files! Are you sure the
/Users/User/Code/PhotonTest/FastLED/platforms/arm/
stuff needs to be included?

Those files come from the same repo that is used by the FastLED library available in the Web IDE. https://github.com/focalintent/FastLED-Sparkcore

Why does it compile fine via Web IDE and Dev, but not CLI?

I can’t (yet) tell you why, but can you e.g. build the Blink.ino sample with CLI?

I can, and I even removed all subdirectories under firmware (especially the examples so that the build farm doesn’t get confused by seeing multiple .ino files).

Could you give us your test.ino to try?


Output

C:\tmp\Test>particle compile photon .

Compiling code for photon

Including:
    C:/tmp/Test/Blink.ino
    C:/tmp/Test/FastLED/bitswap.h
    C:/tmp/Test/FastLED/chipsets.h
    C:/tmp/Test/FastLED/clockless_arm_stm32.h
    C:/tmp/Test/FastLED/color.h
    C:/tmp/Test/FastLED/colorpalettes.h
    C:/tmp/Test/FastLED/colorutils.h
    C:/tmp/Test/FastLED/controller.h
    C:/tmp/Test/FastLED/delay.h
    C:/tmp/Test/FastLED/dmx.h
    C:/tmp/Test/FastLED/fastled_arm_stm32.h
    C:/tmp/Test/FastLED/fastled_config.h
    C:/tmp/Test/FastLED/FastLED.h
    C:/tmp/Test/FastLED/fastpin_arm_stm32.h
    C:/tmp/Test/FastLED/fastpin.h
    C:/tmp/Test/FastLED/fastspi_bitbang.h
    C:/tmp/Test/FastLED/fastspi_dma.h
    C:/tmp/Test/FastLED/FastSPI_LED2.h
    C:/tmp/Test/FastLED/fastspi_nop.h
    C:/tmp/Test/FastLED/fastspi_ref.h
    C:/tmp/Test/FastLED/fastspi_types.h
    C:/tmp/Test/FastLED/fastspi.h
    C:/tmp/Test/FastLED/hsv2rgb.h
    C:/tmp/Test/FastLED/led_sysdefs_arm_stm32.h
    C:/tmp/Test/FastLED/led_sysdefs.h
    C:/tmp/Test/FastLED/lib8tion.h
    C:/tmp/Test/FastLED/noise.h
    C:/tmp/Test/FastLED/pixeltypes.h
    C:/tmp/Test/FastLED/platforms.h
    C:/tmp/Test/FastLED/power_mgt.h
    C:/tmp/Test/FastLED/colorpalettes.cpp
    C:/tmp/Test/FastLED/colorutils.cpp
    C:/tmp/Test/FastLED/FastLED.cpp
    C:/tmp/Test/FastLED/hsv2rgb.cpp
    C:/tmp/Test/FastLED/lib8tion.cpp
    C:/tmp/Test/FastLED/noise.cpp
    C:/tmp/Test/FastLED/power_mgt.cpp
    C:/tmp/Test/FastLED/wiring.cpp
attempting to compile firmware
downloading binary from: /v1/binaries/5755e05d9b03d7805f19c7bd
saving to: photon_firmware_1465245775949.bin
Memory use:
   text    data     bss     dec     hex filename
   5900       8     764    6672    1a10
Compile succeeded.
Saved firmware to: C:\tmp\Test\photon_firmware_1465245775949.bin

Thanks @ScruffR, I deleted the platforms folder and it builds now. Still don’t understand why it works with the folder in Dev though.

Even more odd is that I need to include them differently depending on how I’m building:

Dev:

#include "FastLED.h"

CLI:

#include "FastLED/FastLED.h"

Does anyone know if this is expected behavior? I would think Dev and CLI should be compiling in a similar way. Is there any documentation on the differences? Is there a DEFINE macro I can use to tell whether I’m using Dev or CLI?

#ifdef BUILD_DEV
#include "FastLED.h"
#else 
#include "FastLED/FastLED.h"
#endif

It just is - ParticleDev compilation requires all files in same folder, Build/web compilation requires path.

And I really like you idea of conditional include - not sure it is possible now, but nice to have for future.

Looks like this is a known issue with Dev that they are working on. Perhaps one days soon Dev’s #include handling will match cli/web.