Author Topic: Are there command line equivalents to compile and load for the digispark?  (Read 4172 times)

mron

  • Newbie
  • *
  • Posts: 22
I have a problem. I can program the digispark on my iMac in my office, but my electronics workbench is in the garage. I have an old g4 powerbook i can move to the workbench, but the digispark ide won't compile the sketches on it. One post suggested changing the avr crosspack to an older version, but for the g4, it would be a very old version I'm guessing "Version 2009-04-15". Going back that far will probably have issues i can't deal with.

Can I compile, link and load a sketch with command lines ( Makefile? ) in a remote shell on the iMac and upload the code object with the ide on the g4?

I could move the iMac, or I could buy a new macbook air to use in the garage.. my wife would love that. "honey i NEED a new $1300 mac book to program these cute little $12 computers that make these lights blink"

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Are there command line equivalents to compile and load for the digispark?
« Reply #1 on: February 12, 2013, 04:28:33 pm »
You can upload any compiled hex (or binary) file with this: https://github.com/Bluebie/micronucleus-t85/tree/master/commandline/builds/Mac - whether that will work on the g4 I don't know, but worth a shot.

mron

  • Newbie
  • *
  • Posts: 22
Re: Are there command line equivalents to compile and load for the digispark?
« Reply #2 on: February 12, 2013, 05:12:40 pm »
uploading a binary may not be a problem. the problem is remote compilation. can a xxx.ino file be compiled from the command line?


i'd like to try uploading a compiled sketch with the command line. where do the finished binaries live?

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Are there command line equivalents to compile and load for the digispark?
« Reply #3 on: February 12, 2013, 07:07:46 pm »
it is very possible - you'll have to explore arduino's forums and avr-gcc for more on that, or maybe someone will chime in - I'm not super familiar with exactly how arduino goes about it I do know the hex files end up in a temporary folder that varies by OS

mron

  • Newbie
  • *
  • Posts: 22
Re: Are there command line equivalents to compile and load for the digispark?
« Reply #4 on: February 12, 2013, 09:59:58 pm »
I noticed the verbose mode of the compile outputs what looks like every step of compile link and load. I'll step through those and see if I can duplicate it with a Makefile.

mron

  • Newbie
  • *
  • Posts: 22
Re: Are there command line equivalents to compile and load for the digispark?
« Reply #5 on: February 16, 2013, 10:54:47 am »
Command line compile and download works.
Thank you Bluebie for help getting micronucleus running on the g4.