If you don't want to use the Arduino IDE to build an Arduino .ino
file you can use the arduino-builder
to integrate with a better IDE like IDEA, Eclipse, KDevelop, etc...
The command to build a project for the teensy 3.2 board is:
$arduino-builder -hardware hardware -tools tools -tools tools-builder -libraries /home/<user>/Arduino/libraries -fqbn teensy:avr:teensy31 /path/to/your/project.ino
Note: This assumes the working directory you're in is the folder where arduino is installed.
I also had to edit the hardware/teensy/avr/boards.txt
and add
teensy31.build.fcpu=96000000
teensy31.build.flags.ldspecs=
teensy31.build.keylayout=US_ENGLISH
teensy31.build.usbtype=USB_SERIAL
You can find the available values for fcpu, ldspecs, keylayout, etc.. by looking at the menu option specifications in build.txt
.
This is just for my own reference, you can see the great article arduino-build-errors a more detailed explaination and some other possible errors and solutions.
Happy coding!