Upload sketch form commandline

Status
Not open for further replies.

o5i

Member
Hi have build a system whit a rpi communicating whit teensy 3 using Uart. But it is a embeded system where i need to do the maintainance remotely. Because of this i need to upload sketches on the board but im not sure how to do it. Is it possible to do it from commandline? I am using some librarys too, because of that i need to include them in the file i upload, but i probably have to create it on the pc first. If somone is familiar how to do this im happy to hear..
Thanks
 
Last edited:
Another option I have played around with on Odroid, which should also work on RPI is if you setup to run VNC to your RPI, you can now install Arduino installation on the RPI as well as you can install Teensyduino. Then you can simply load up the IDE and build on the RPI and have it program your Teensy...

But probably the easiest is to build on your PC, and have the IDE Keep the binary. (Export Compiled Binary), they copy the binary to your RPI however you normally do that (I typically use WinSCP) on my PC and then from a command line (PuTTy or now KiTTY), use the teensy_loader_cli to program the Teensy.
 
TYQT has a command line tool as well. Additionally it can identify a connected Teensy by Serial # and upload to a specific device in the case where more than one is connected as well.

oops - not sure if TYQT is usable on 32 bit rpi.
 
Last edited:
Note, I didn't think the Odroid shipped the 32-bit libraries that you need for running the arm ide/teensy_loader_cli. But it looks like it may be simple to instlall them: http://forum.odroid.com/viewtopic.php?f=135&t=18806
I am able to install Arduino and run on most Odroids (C1+, Xu3 lite, and XU4), as these are 32 bit processors.
However with Odroid C2, which is 64 bits, I have been able to get most of the things running, although still some issues with Terminal Monitor... Alternatively not sure if TYQT runs on RPIs? if so could try on C2 as well to see if has everything... If Interested more on Odroid C2 issue on the thread: http://forum.odroid.com/viewtopic.php?f=136&t=21249 (as well as one up here...)

But sorry that I am off topic as I believe you are running RPI. Not sure which one from description. But my guess is even if RPI3 probably running 32 bit OS.
 
Indeed for ongoing compatibility the RPI3 is still using a 32 bit OS. Updated my post with an opps on TYQT - I missed that this was looking for an rpi solution, AFAIK the TYQT for non-windows is 64 bit.
 
Thanks for the solutions.. I probably try teensy loader, but i have watched some youtube videos about platformio.. I noticed that it supports flashing over the air and some other things. Is it possible to flash the microcontroller connected to the rpi from a remote pc using ssh whitout interacting on the rpi? That would be great
 
Indeed for ongoing compatibility the RPI3 is still using a 32 bit OS. Updated my post with an opps on TYQT - I missed that this was looking for an rpi solution, AFAIK the TYQT for non-windows is 64 bit.
TyQt builds/works perfectly fine on 32-bit Linux. Qt works on the RPI, so I don't see why TyQt wouldn't.

@o5i:
I would use TyQt. You have a GUI and a command line version. You can list connected boards, reboot them, boot them into bootloader/programming mode, flash them and connect to the USB serial console. Everything will work over ssh.

Since you mentioned UART, you can't use a serial port for firmware updates, you need a USB connection to the Teensy.
 
Status
Not open for further replies.
Back
Top