IceTube Clock - Compiling a firmware from all those files?

by Fiddy27 on Fri Sep 21, 2012 7:28 am

G'day,

Bought a ice tube clock after my mate got one, mine runs good, but his has came with a newer firmware with auto dimming.
So i bought a usbtiny, 10k resistor and a LDR.

So i figured out how to load on a .hex firmware with AVRdude, cool. Now all they other firmwares i find have multiple files that you must combined somehow.

How do i do that?

AVRdude has a sub program called makefile in it, that i attempted to use but have no luck.

Can someone show me the light?


Cheers! Mitch.
Fiddy27
 
Posts: 4
Joined: Fri Sep 21, 2012 7:22 am

Re: IceTube Clock - Compiling a firmware from all those files?

by adafruit_support_rick on Fri Sep 21, 2012 9:56 am

Which firmware are you referring to? The Adafruit firmware is available for download as a .hex file, which is ready to use with avrdude.
User avatar
adafruit_support_rick
 
Posts: 8585
Joined: Tue Mar 15, 2011 10:42 am
Location: Buffalo, NY

Re: IceTube Clock - Compiling a firmware from all those files?

by adafruit_support_bill on Fri Sep 21, 2012 12:08 pm

You need to use WinAVR to compile it. Download and install WinAVR as described here: http://www.ladyada.net/learn/avr/programming.html
Then navigate to the folder where the makefile is and type "make" on the command line.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: IceTube Clock - Compiling a firmware from all those files?

by Fiddy27 on Fri Sep 21, 2012 10:29 pm

adafruit_support wrote:You need to use WinAVR to compile it. Download and install WinAVR as described here: http://www.ladyada.net/learn/avr/programming.html
Then navigate to the folder where the makefile is and type "make" on the command line.



Which part of WinAVR do i use?

Under WinAVR i have, Mfile, AVR insight and programmers notepad?

Also where is the command line?
Fiddy27
 
Posts: 4
Joined: Fri Sep 21, 2012 7:22 am

Re: IceTube Clock - Compiling a firmware from all those files?

by adafruit_support_bill on Sat Sep 22, 2012 5:25 am

Also where is the command line?

Look here under "Prerequisites. There are links to tutorials on command lines for various operating systems.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: IceTube Clock - Compiling a firmware from all those files?

by Fiddy27 on Sat Sep 22, 2012 11:33 pm

ok so i got it going, seems i dont have to do anything with the makefile just upload the .hex file...

anyway, can you tell me if the auto dim menu will come up if i dont have the LDR and 10K resistor installed?
Fiddy27
 
Posts: 4
Joined: Fri Sep 21, 2012 7:22 am

Re: IceTube Clock - Compiling a firmware from all those files?

by adafruit_support_bill on Sun Sep 23, 2012 4:59 am

can you tell me if the auto dim menu will come up if i dont have the LDR and 10K resistor installed?

I would guess it probably does. But I am not familiar with this particular modification.
There are many user-developed hardware & software modifications to this clock. We can only support the version we developed.
You should contact the author for more information.
User avatar
adafruit_support_bill
 
Posts: 25556
Joined: Sat Feb 07, 2009 9:11 am

Re: IceTube Clock - Compiling a firmware from all those files?

by Fiddy27 on Tue Sep 25, 2012 5:23 am

Can someone tell me step by step how to compile the .c and .h files into a .hex so i can load a firmware?

I plan to modify a firmware but Ive had a go and each time i get errors, errors even using the authors unmodified firmware files supplied in the firmware packages, so im doing something wrong somewhere.

I get these errors when compiling:

Image
Fiddy27
 
Posts: 4
Joined: Fri Sep 21, 2012 7:22 am

Re: IceTube Clock - Compiling a firmware from all those files?

by wbp on Wed Sep 26, 2012 2:29 pm

You appear to be using something called "AtmelStudio". That's not WinAVR. You can't just compile the .c file without something to define all the dependencies. That's what the makefile is for.

If you install WinAVR you can use AVRDUDE as per the tutorial Lady Ada provided to load the .hex file from my firmware. Bring up a cmd window and run "make" to compile. "make" by itself will compile the firmware, "make program" will load it into the clock if you have it connected properly via a USBtiny.

There are newer versions of my firmware but what you have should work for auto dimming.
User avatar
wbp
 
Posts: 213
Joined: Mon Mar 07, 2011 12:18 pm