Usage

ok, you just installed cuwire utility. What's next?

Help

Help command list all commands and options. Options depends on context, you probably don't need to pass sketch folder option when listing serial ports. But you can use board name instead of com port name for upload purpose. Below you can see some most important examples.

$ cuwire help

Build error: no runtimes found #noRuntimesErr. You'll need to install Arduino IDE.

$ cuwire build
cuwire no runtimes found #noRuntimesErr

Board list command.

$ cuwire boards
cuwire no runtimes found #noRuntimesErr
cuwire boards available:
RFduino Boards (RFDuino:arm)
RFduino (RFduino)
Arduino AVR Boards (arduino:avr) 1.5.8
LilyPad Arduino USB (LilyPadUSB)
Arduino NG or older (atmegang, models: cpu:atmega168 [ATmega168], cpu:atmega8 [ATmega8])
Arduino BT (bt, models: cpu:atmega328 [ATmega328], cpu:atmega168 [ATmega168])
Arduino Duemilanove or Diecimila (diecimila, models: cpu:atmega328 [ATmega328], cpu:atmega168 [ATmega168])
Arduino Esplora (esplora)
Arduino Ethernet (ethernet)
Arduino Fio (fio)
Arduino Leonardo (leonardo)
LilyPad Arduino (lilypad, models: cpu:atmega328 [ATmega328], cpu:atmega168 [ATmega168])
Arduino Mega or Mega 2560 (mega, models: cpu:atmega2560 [ATmega2560 (Mega 2560)], cpu:atmega1280 [ATmega1280])

Port list command.

Usually lists port path/name. Also (if available) USB vendorId:productId, matching arduino board name, USB device serial, manufacturer name.

$ cuwire ports
cuwire using runtime from /Applications/devel/Arduino.app/Contents/Java
cuwire serial ports available:
/dev/cu.Bluetooth-Modem
/dev/cu.wchusbserial14520 0x1a86:0x7523
/dev/cu.usbmodem14541 Arduino Uno uno #752323334353519072E1 Arduino (www.arduino.cc)
/dev/cu.SLAB_USBtoUART 0x10c4:0xea60  #00897CA6 Silicon Labs
/dev/cu.usbserial-DC008W8T 0x0403:0x6015  #DC008W8T FTDI

Sketch compilation, then upload. You can use -p (port) parameter to define port.

Or use -b (board) parameter to automatically guess port name (limitations).

$ cuwire upload -s samples/ArduinoVoltage/ArduinoVoltage.ino -b uno
cuwire using runtime from /Applications/devel/Arduino.app/Contents/Java
cuwire compilation of samples/ArduinoVoltage/
build folder: /var/folders/r4/d4l8c_ts4rsdc670pdkbtr0m0000gp/T/ArduinoVoltage-cuwire-b7034700
core     compile arduino:avr CDC.cpp
mkdir    done 24/24
...
compile  done
cuwire upload samples/ArduinoVoltage/ using port /dev/cu.usbmodem14541
upload done

Serial monitor. You can use -r to define baudrate, -p (port) parameter to define port.

Or use -b (board) parameter to automatically guess port name (limitations).

$ cuwire console -b uno
cuwire using runtime from /Applications/devel/Arduino.app/Contents/Java
...
4708 mV
4688 mV
1
Now delay is 1 second
...

Compile sketch samples/ArduinoVoltage/ArduinoVoltage.ino, targeting pro mini board model 16MHzatmega328.

$ cuwire build -s samples/ArduinoVoltage/ArduinoVoltage.ino -b pro -m cpu:16MHzatmega328
cuwire using runtime from /Applications/devel/Arduino.app/Contents/Java
cuwire compilation of samples/ArduinoVoltage/
build folder: /var/folders/r4/d4l8c_ts4rsdc670pdkbtr0m0000gp/T/ArduinoVoltage-cuwire-b7034700
core     compile arduino:avr CDC.cpp
mkdir    done 24/24
core     archive arduino:avr CDC.cpp
core     compile arduino:avr HID.cpp
core     archive arduino:avr HID.cpp
core     compile arduino:avr HardwareSerial.cpp
core     archive arduino:avr HardwareSerial.cpp
core     compile arduino:avr HardwareSerial0.cpp
core     archive arduino:avr HardwareSerial0.cpp
core     compile arduino:avr HardwareSerial1.cpp
core     archive arduino:avr HardwareSerial1.cpp
core     compile arduino:avr HardwareSerial2.cpp
core     archive arduino:avr HardwareSerial2.cpp
core     compile arduino:avr HardwareSerial3.cpp
core     archive arduino:avr HardwareSerial3.cpp
core     compile arduino:avr IPAddress.cpp
core     archive arduino:avr IPAddress.cpp
core     compile arduino:avr Print.cpp
core     archive arduino:avr Print.cpp
core     compile arduino:avr Stream.cpp
core     archive arduino:avr Stream.cpp
core     compile arduino:avr Tone.cpp
core     archive arduino:avr Tone.cpp
core     compile arduino:avr USBCore.cpp
core     archive arduino:avr USBCore.cpp
core     compile arduino:avr WInterrupts.c
core     archive arduino:avr WInterrupts.c
core     compile arduino:avr WMath.cpp
core     archive arduino:avr WMath.cpp
core     compile arduino:avr WString.cpp
core     archive arduino:avr WString.cpp
core     compile arduino:avr abi.cpp
core     archive arduino:avr abi.cpp
core     compile arduino:avr hooks.c
core     archive arduino:avr hooks.c
core     compile arduino:avr main.cpp
core     archive arduino:avr main.cpp
core     compile arduino:avr new.cpp
core     archive arduino:avr new.cpp
core     compile arduino:avr wiring.c
core     archive arduino:avr wiring.c
core     compile arduino:avr wiring_analog.c
core     archive arduino:avr wiring_analog.c
core     compile arduino:avr wiring_digital.c
core     archive arduino:avr wiring_digital.c
core     compile arduino:avr wiring_shift.c
core     archive arduino:avr wiring_shift.c
core     compile arduino:avr wiring_pulse.c
core     archive arduino:avr wiring_pulse.c
core     done 48/48
project  compile ArduinoVoltage.cpp
project  done 1/1
link     all together
link     done 1/1
obj-eep  objcopy eep
obj-hex  objcopy hex
obj-eep  done 1/1
obj-hex  done 1/1
size     determine compiled size
size     text 3706/30720 data 220/2048 eeprom 0
size     done 1/1
compile  done