helloo
I'm trying to find a way to compile an Arduino .ino file and obtain the output HEX/ELF file, from command line (on windows). Uploading to the board will be done via JTAG and a programmer, so I don't need the TeensyLoader.
So far I've come across the following:
Any suggestions on what direction to proceed on would be appreciated a lot! Many thanks
I'm trying to find a way to compile an Arduino .ino file and obtain the output HEX/ELF file, from command line (on windows). Uploading to the board will be done via JTAG and a programmer, so I don't need the TeensyLoader.
So far I've come across the following:
- There is the Teensy loader, command line. However I understand it that is only for loading already compiled code onto the Teensy Board, not for compiling .ino files. So that is of no use.
- Then there is the GCC compiler for Teensy. That would mean using a make file. I'm not very familiar with using Make, would I then still be able to compile an arduino file? Or does it only work with .c or .cpp files? Besides, it seems to cover teensy 2 only. Would it also work for T3.2? I came across this discussion, but it doesn't show anything about .ino files. It's also from more than 5 years ago so things could've changed since then.
- I've tried copying the first line from verbose output from Arduino IDE upload, and pasting that in the CMD/Powershell.
The command is this:
Code:"C:\Program Files (x86)\Arduino\arduino-builder" -dump-prefs -logger=machine -hardware "C:\Program Files (x86)\Arduino\hardware" -hardware "C:\Users\xxxe\AppData\Local\Arduino15\packages" -tools "C:\Program Files (x86)\Arduino\tools-builder" -tools "C:\Program Files (x86)\Arduino\hardware\tools\avr" -tools "C:\Users\xxxx\AppData\Local\Arduino15\packages" -built-in-libraries "C:\Program Files (x86)\Arduino\libraries" -libraries "C:\Users\xxx\Documents\Arduino\libraries" -fqbn=teensy:avr:teensy31:usb=serial,speed=96,opt=o2std,keys=en-us -ide-version=10813 -build-path "C:\Users\xxxx~1\AppData\Local\Temp\arduino_build_755527" -warnings=none -build-cache "C:\Users\xxxx~1\AppData\Local\Temp\arduino_cache_486966" -verbose "R:\ardir\blink.ino"
Code:At line:1 char:50 + "C:\Program Files (x86)\Arduino\arduino-builder" -dump-prefs -logger= ... + ~~~~~ Unexpected token '-dump' in expression or statement. At line:1 char:55 + "C:\Program Files (x86)\Arduino\arduino-builder" -dump-prefs -logger= ... + ~~~~~~ Unexpected token '-prefs' in expression or statement. + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken
Any suggestions on what direction to proceed on would be appreciated a lot! Many thanks