Compile with --saveto option

Hi,

I run this command inside my project directory.

particle compile photon --saveTo software.bin

it gives me error
"I couldn’t find that: --saveTo"

Is there any alternative command to this?

Thanks

Try particle compile photon * --saveTo software.bin

It’s missing the parameter of the directory to compile for.

Actually I tried that also.

I couldn’t find that: *

Works for me. Are you in the directory containing the files?

KENMBP:oled-dht22 kennethlimcp$ particle compile p * --saveTo x.bin

Compiling code for photon

Including:
    Adafruit_GFX.cpp
    Adafruit_GFX.h
    Adafruit_SSD1306.cpp
    Adafruit_SSD1306.h
    PietteTech_DHT.cpp
    PietteTech_DHT.h
    oled-dht22.ino
attempting to compile firmware 
pushing file: Adafruit_GFX.cpp
pushing file: Adafruit_GFX.h
pushing file: Adafruit_SSD1306.cpp
pushing file: Adafruit_SSD1306.h
pushing file: PietteTech_DHT.cpp
pushing file: PietteTech_DHT.h
pushing file: oled-dht22.ino
Memory use: 
   text	   data	    bss	    dec	    hex	filename
  18980	   1220	    584	  20784	   5130	/spark/compile_service/shared/workspace/6_platform_6_20_1/firmware/2defb9b2c2425813d0e0399e005ba656b2b1683ea2d0b7a9ff8870378696/2defb9b2c2425813d0e0399e005ba656b2b1683ea2d0b7a9ff8870378696.elf

grabbing binary from: https://api.particle.io/v1/binaries/56670323acd9a1043a1fc7c2
Compile succeeded.
Saved firmware to: /Users/kennethlimcp/Desktop/particle/oled-dht22/x.bin
1 Like

I’d prefer this version

particle compile p . --saveTo x.bin

as the single dot (.) denotes the current directory more explicitly than the astersik (*) which usually denotes a multi-place-wildcard.

2 Likes

@kennethlimcp I think * not works because of Windows OS.

@ScruffR thanks for the solution it worked for me.

Also particle compile p *.* --saveTo x.bin works

1 Like